diff options
author | James Laird <jlaird@hdfgroup.org> | 2005-12-01 16:18:24 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2005-12-01 16:18:24 (GMT) |
commit | c46e4e51d9552397e31514b032e76487ef5f6b6f (patch) | |
tree | 4492bf2a0337b943a4138b96fb7464b10b5b3524 /hl/c++ | |
parent | b6d7ebf3bb3855a10598f01fc8945cfed7c82df9 (diff) | |
download | hdf5-c46e4e51d9552397e31514b032e76487ef5f6b6f.zip hdf5-c46e4e51d9552397e31514b032e76487ef5f6b6f.tar.gz hdf5-c46e4e51d9552397e31514b032e76487ef5f6b6f.tar.bz2 |
[svn-r11751] Purpose:
Cleanup
Description:
Changed comments in C++ packet table code to refer to entries as
"packets" instead of "records."
Solution:
The APIs were changed to correspond to the C API, but the documentation
wasn't. This is fixed.
Platforms tested:
mir, shanti, sleipnir
Misc. update:
This corresponds to documentation update earlier this week.
Diffstat (limited to 'hl/c++')
-rw-r--r-- | hl/c++/src/H5PacketTable.cpp | 93 | ||||
-rw-r--r-- | hl/c++/src/H5PacketTable.h | 96 |
2 files changed, 96 insertions, 93 deletions
diff --git a/hl/c++/src/H5PacketTable.cpp b/hl/c++/src/H5PacketTable.cpp index abc8015..9718e20 100644 --- a/hl/c++/src/H5PacketTable.cpp +++ b/hl/c++/src/H5PacketTable.cpp @@ -28,7 +28,7 @@ /* "Open" Constructor * Opens an existing packet table, which can contain either fixed-length or - * variable-length records. + * variable-length packets. */ PacketTable::PacketTable(hid_t fileID, char* name) { @@ -67,7 +67,7 @@ } /* ResetIndex - * Sets the "current record" to the first record in the packet table + * Sets the index to point to the first packet in the packet table */ void PacketTable::ResetIndex() { @@ -75,7 +75,7 @@ } /* SetIndex - * Sets the current record to point to the record specified by index. + * Sets the index to point to the packet specified by index. * Returns 0 on success, negative on failure (if index is out of bounds) */ int PacketTable::SetIndex(unsigned int index) @@ -84,16 +84,16 @@ } /* GetPacketCount - * Returns the number of records in the packet table. Error + * Returns the number of packets in the packet table. Error * is set to 0 on success. On failure, returns 0 and * error is set to negative. */ unsigned int PacketTable::GetPacketCount(int& error) { - hsize_t nrecords; + hsize_t npackets; - error = H5PTget_num_packets( table_id, (hsize_t *)&nrecords); - return nrecords; + error = H5PTget_num_packets( table_id, (hsize_t *)&npackets); + return npackets; } /********************************/ @@ -101,7 +101,7 @@ /********************************/ /* Constructor - * Creates a packet table in which to store fixed length records. + * Creates a packet table in which to store fixed length packets. * Takes the ID of the file the packet table will be created in, the name of * the packet table, the ID of the datatype of the set, and the size * of a memory chunk used in chunking. @@ -135,18 +135,18 @@ } /* AppendPackets (multiple packets) - * Adds multiple records to the packet table. Takes the number of records to be - * added and a pointer to their location in memory. + * Adds multiple packets to the packet table. Takes the number of packets + * to be added and a pointer to their location in memory. * Returns 0 on success, -1 on failure. */ - int FL_PacketTable::AppendPackets(unsigned int numRecords, void * data) + int FL_PacketTable::AppendPackets(unsigned int numPackets, void * data) { - return H5PTappend(table_id, numRecords, data); + return H5PTappend(table_id, numPackets, data); } /* GetPacket (indexed) * Gets a single packet from the packet table. Takes the index - * of the record (with 0 being the first record) and a pointer + * of the packet (with 0 being the first packet) and a pointer * to memory where the data should be stored. * Returns 0 on success, negative on failure */ @@ -156,9 +156,9 @@ } /* GetPackets (multiple packets) - * Gets multiple packets at once, all records between + * Gets multiple packets at once, all packets between * startIndex and endIndex inclusive. Also takes a pointer to - * the memory where these records should be stored. + * the memory where these packets should be stored. * Returns 0 on success, negative on failure. */ int FL_PacketTable::GetPackets(unsigned int startIndex, unsigned int endIndex, void * data) @@ -171,10 +171,10 @@ } /* GetNextPacket (single packet) - * Gets the next record in the packet table. Takes a pointer to - * memory where the record should be stored. - * Returns 0 on success, negative on failure. Current record - * is not advanced to the next record on failure. + * Gets the next packet in the packet table. Takes a pointer to + * memory where the packet should be stored. + * Returns 0 on success, negative on failure. Index + * is not advanced to the next packet on failure. */ int FL_PacketTable::GetNextPacket(void * data) { @@ -182,14 +182,14 @@ } /* GetNextPackets (multiple packets) - * Gets the next numRecords records in the packet table. Takes a - * pointer to memory where these records should be stored. - * Returns 0 on success, negative on failure. Current record + * Gets the next numPackets packets in the packet table. Takes a + * pointer to memory where these packets should be stored. + * Returns 0 on success, negative on failure. Index * is not advanced on failure. */ - int FL_PacketTable::GetNextPackets(unsigned int numRecords, void * data) + int FL_PacketTable::GetNextPackets(unsigned int numPackets, void * data) { - return H5PTget_next(table_id, numRecords, data); + return H5PTget_next(table_id, numPackets, data); } @@ -198,7 +198,7 @@ /********************************/ /* Constructor - * Creates a packet table in which to store variable length records. + * Creates a packet table in which to store variable length packets. * Takes the ID of the file the packet table will be created in, the name of * the packet table, and the size of a memory chunk used in chunking. */ @@ -237,19 +237,20 @@ } /* AppendPackets (multiple packets) - * Adds multiple variable-length records to the packet table. Takes the number of - * records to be added and a pointer to an array of hvl_t structs in memory. + * Adds multiple variable-length packets to the packet table. Takes the + * number of + * packets to be added and a pointer to an array of hvl_t structs in memory. * Returns 0 on success, negative on failure. */ - int VL_PacketTable::AppendPackets(unsigned int numRecords, hvl_t * data) + int VL_PacketTable::AppendPackets(unsigned int numPackets, hvl_t * data) { - return H5PTappend(table_id, numRecords, data); + return H5PTappend(table_id, numPackets, data); } /* GetPacket (indexed) - * Gets a single variable-length record from the packet table. Takes the index - * of the record (with 0 being the first record) and a pointer - * to a hvl_t struct in which to store the record's size and location. + * Gets a single variable-length packet from the packet table. Takes the + * index of the packet (with 0 being the first packet) and a pointer + * to a hvl_t struct in which to store the packet's size and location. * Returns 0 on success, negative on failure. */ int VL_PacketTable::GetPacket(unsigned int index, hvl_t * data) @@ -258,9 +259,9 @@ } /* GetPackets (multiple packets) - * Gets multiple variable-length records at once, all records between + * Gets multiple variable-length packets at once, all packets between * startIndex and endIndex inclusive. Takes a pointer to an array - * of hvl_t structs in memory in which to store pointers to the records. + * of hvl_t structs in memory in which to store pointers to the packets. * Returns 0 on success, negative on failure. */ int VL_PacketTable::GetPackets(unsigned int startIndex, unsigned int endIndex, hvl_t * data) @@ -273,10 +274,10 @@ } /* GetNextPacket (single packet) - * Gets the next record in the packet table. Takes a pointer to - * an hvl_t struct where the record should be stored. - * Returns 0 on success, negative on failure. Current record - * is not advanced to the next record on failure. + * Gets the next packet in the packet table. Takes a pointer to + * an hvl_t struct where the packet should be stored. + * Returns 0 on success, negative on failure. Index + * is not advanced to the next packet on failure. */ int VL_PacketTable::GetNextPacket(hvl_t * data) { @@ -284,21 +285,21 @@ } /* GetNextPackets (multiple packets) - * Gets the next numRecords records in the packet table. Takes a - * pointer to an array of hvl_t structs where pointers to the records + * Gets the next numPackets packets in the packet table. Takes a + * pointer to an array of hvl_t structs where pointers to the packets * should be stored. - * Returns 0 on success, negative on failure. Current record + * Returns 0 on success, negative on failure. Index * is not advanced on failure. */ - int VL_PacketTable::GetNextPackets(unsigned int numRecords, hvl_t * data) + int VL_PacketTable::GetNextPackets(unsigned int numPackets, hvl_t * data) { - return H5PTget_next(table_id, numRecords, data); + return H5PTget_next(table_id, numPackets, data); } /* FreeReadbuff - * Frees the buffers created when variable-length records are read. - * Takes the number of hvl_t structs to be freed and a pointer to their location - * in memory. + * Frees the buffers created when variable-length packets are read. + * Takes the number of hvl_t structs to be freed and a pointer to their + * location in memory. * Returns 0 on success, negative on error. */ int VL_PacketTable::FreeReadbuff(unsigned int numStructs, hvl_t * buffer) diff --git a/hl/c++/src/H5PacketTable.h b/hl/c++/src/H5PacketTable.h index b4aedde..8886deb 100644 --- a/hl/c++/src/H5PacketTable.h +++ b/hl/c++/src/H5PacketTable.h @@ -35,7 +35,7 @@ public: /* "Open" Constructor * Opens an existing packet table, which can contain either fixed-length or - * variable-length records. + * variable-length packets. */ PacketTable(hid_t fileID, char* name); @@ -59,18 +59,19 @@ public: int IsVariableLength(); /* ResetIndex - * Sets the "current record" to the first record in the packet table + * Sets the "current packet" index to point to the first packet in the + * packet table */ void ResetIndex(); /* SetIndex - * Sets the current record to point to the record specified by index. + * Sets the current packet to point to the packet specified by index. * Returns 0 on success, negative on failure (if index is out of bounds) */ int SetIndex(unsigned int index); /* GetPacketCount - * Returns the number of records in the packet table. Error + * Returns the number of packets in the packet table. Error * is set to 0 on success. On failure, returns 0 and * error is set to negative. */ @@ -90,7 +91,7 @@ class H5_HLCPPDLL FL_PacketTable : virtual public PacketTable { public: /* Constructor - * Creates a packet table in which to store fixed length records. + * Creates a packet table in which to store fixed length packets. * Takes the ID of the file the packet table will be created in, the name of * the packet table, the ID of the datatype of the set, and the size * of a memory chunk used in chunking. @@ -110,51 +111,51 @@ public: */ int AppendPacket(void * data); - /* AppendPackets (multiple records) - * Adds multiple records to the packet table. Takes the number of records to be - * added and a pointer to their location in memory. + /* AppendPackets (multiple packets) + * Adds multiple packets to the packet table. Takes the number of packets + * to be added and a pointer to their location in memory. * Returns 0 on success, -1 on failure. */ - int AppendPackets(unsigned int numRecords, void * data); + int AppendPackets(unsigned int numPackets, void * data); /* GetPacket (indexed) * Gets a single packet from the packet table. Takes the index - * of the record (with 0 being the first record) and a pointer + * of the packet (with 0 being the first packet) and a pointer * to memory where the data should be stored. * Returns 0 on success, negative on failure */ int GetPacket(unsigned int index, void * data); - /* GetPackets (multiple records) - * Gets multiple packets at once, all records between + /* GetPackets (multiple packets) + * Gets multiple packets at once, all packets between * startIndex and endIndex inclusive. Also takes a pointer to - * the memory where these records should be stored. + * the memory where these packets should be stored. * Returns 0 on success, negative on failure. */ int GetPackets(unsigned int startIndex, unsigned int endIndex, void * data); - /* GetNextPacket (single record) - * Gets the next record in the packet table. Takes a pointer to - * memory where the record should be stored. - * Returns 0 on success, negative on failure. Current record - * is not advanced to the next record on failure. + /* GetNextPacket (single packet) + * Gets the next packet in the packet table. Takes a pointer to + * memory where the packet should be stored. + * Returns 0 on success, negative on failure. Index + * is not advanced to the next packet on failure. */ int GetNextPacket(void * data); - /* GetNextPackets (multiple records) - * Gets the next numRecords records in the packet table. Takes a - * pointer to memory where these records should be stored. - * Returns 0 on success, negative on failure. Current record + /* GetNextPackets (multiple packets) + * Gets the next numPackets packets in the packet table. Takes a + * pointer to memory where these packets should be stored. + * Returns 0 on success, negative on failure. Index * is not advanced on failure. */ - int GetNextPackets(unsigned int numRecords, void * data); + int GetNextPackets(unsigned int numPackets, void * data); }; class H5_HLCPPDLL VL_PacketTable : virtual public PacketTable { public: /* Constructor - * Creates a packet table in which to store variable length records. + * Creates a packet table in which to store variable length packets. * Takes the ID of the file the packet table will be created in, the name of * the packet table, and the size of a memory chunk used in chunking. */ @@ -174,50 +175,51 @@ public: */ int AppendPacket(void * data, unsigned int length); - /* AppendPackets (multiple records) - * Adds multiple variable-length records to the packet table. Takes the number of - * records to be added and a pointer to an array of hvl_t structs in memory. + /* AppendPackets (multiple packets) + * Adds multiple variable-length packets to the packet table. Takes the + * number of packets to be added and a pointer to an array of + * hvl_t structs in memory. * Returns 0 on success, negative on failure. */ - int AppendPackets(unsigned int numRecords, hvl_t * data); + int AppendPackets(unsigned int numPackets, hvl_t * data); /* GetPacket (indexed) - * Gets a single variable-length record from the packet table. Takes the index - * of the record (with 0 being the first record) and a pointer - * to a hvl_t struct in which to store the record's size and location. + * Gets a single variable-length packet from the packet table. Takes + * the index of the packet (with 0 being the first packet) and a pointer + * to a hvl_t struct in which to store the packet's size and location. * Returns 0 on success, negative on failure. */ int GetPacket(unsigned int index, hvl_t * data); - /* GetPackets (multiple records) - * Gets multiple variable-length records at once, all records between + /* GetPackets (multiple packets) + * Gets multiple variable-length packets at once, all packets between * startIndex and endIndex inclusive. Takes a pointer to an array - * of hvl_t structs in memory in which to store pointers to the records. + * of hvl_t structs in memory in which to store pointers to the packets. * Returns 0 on success, negative on failure. */ int GetPackets(unsigned int startIndex, unsigned int endIndex, hvl_t * data); - /* GetNextPacket (single record) - * Gets the next record in the packet table. Takes a pointer to - * an hvl_t struct where the record should be stored. - * Returns 0 on success, negative on failure. Current record - * is not advanced to the next record on failure. + /* GetNextPacket (single packet) + * Gets the next packet in the packet table. Takes a pointer to + * an hvl_t struct where the packet should be stored. + * Returns 0 on success, negative on failure. Index + * is not advanced to the next packet on failure. */ int GetNextPacket(hvl_t * data); - /* GetNextPackets (multiple records) - * Gets the next numRecords records in the packet table. Takes a - * pointer to an array of hvl_t structs where pointers to the records + /* GetNextPackets (multiple packets) + * Gets the next numPackets packets in the packet table. Takes a + * pointer to an array of hvl_t structs where pointers to the packets * should be stored. - * Returns 0 on success, negative on failure. Current record + * Returns 0 on success, negative on failure. Index * is not advanced on failure. */ - int GetNextPackets(unsigned int numRecords, hvl_t * data); + int GetNextPackets(unsigned int numPackets, hvl_t * data); /* FreeReadbuff - * Frees the buffers created when variable-length records are read. - * Takes the number of hvl_t structs to be freed and a pointer to their location - * in memory. + * Frees the buffers created when variable-length packets are read. + * Takes the number of hvl_t structs to be freed and a pointer to their + * location in memory. * Returns 0 on success, negative on error. */ int FreeReadbuff(unsigned int numStructs, hvl_t * buffer); |