1
0
mirror of https://github.com/Rogiel/PacketBuffer synced 2025-12-06 00:13:04 +00:00

Improve the documentation on the binary format of arrays, sets and vectors

This commit is contained in:
2018-02-03 14:46:05 -02:00
parent a9f823b31f
commit 09fe9e0e41
3 changed files with 61 additions and 0 deletions

View File

@@ -44,6 +44,16 @@ namespace PacketBuffer {
* when serialized. Further changing the size of the array will cause a
* change in the binary format of the packet.
*
* Serialized data takes the format as:
* @code
* (
* T: first,
* T: second,
* ...
* T: last
* )
* @endcode
*
* @tparam T the array type
* @tparam S the array fixed size
*/
@@ -75,6 +85,16 @@ namespace PacketBuffer {
* when serialized. Further changing the size of the array will cause a
* change in the binary format of the packet.
*
* Serialized data takes the format as:
* @code
* (
* T: first,
* T: second,
* ...
* T: last
* )
* @endcode
*
* @tparam T the array type
* @tparam S the array fixed size
*/
@@ -100,6 +120,16 @@ namespace PacketBuffer {
* when serialized. Further changing the size of the array will cause a
* change in the binary format of the packet.
*
* Serialized data takes the format as:
* @code
* (
* T: first,
* T: second,
* ...
* T: last
* )
* @endcode
*
* @tparam T the array type
* @tparam S the array fixed size
*/

View File

@@ -42,6 +42,16 @@ namespace PacketBuffer {
* comparison functor of type <tt>Compare</tt> and using an allocator
* of type <tt>Allocator</tt>.
*
* @code
* (
* uint64_t: size
* T: element[0]
* T: element[1]
* ...
* T: element[size-1]
* )
* @endcode
*
* @tparam T the set element key
* @tparam Compare the set comparison functor
* @tparam Allocator the set allocator type
@@ -76,6 +86,16 @@ namespace PacketBuffer {
* <tt>T</tt>, hash functor of type <tt>Hash</tt>, predicate of type
* <tt>Predicate</tt> and using an allocator of type <tt>Allocator</tt>.
*
* @code
* (
* uint64_t: size
* T: element[0]
* T: element[1]
* ...
* T: element[size-1]
* )
* @endcode
*
* @tparam T the set element key
* @tparam Hash the set hash functor
* @tparam Predicate the set predicate functor

View File

@@ -40,6 +40,17 @@ namespace PacketBuffer {
* A ObjectSerializer for std::vector with elements of type <tt>R</tt>
* using an allocator of type <tt>Allocator</tt>.
*
* Serialized data takes the format as:
* @code
* (
* uint64_t: size
* T: element[0]
* T: element[1]
* ...
* T: element[size-1]
* )
* @endcode
*
* @tparam T the vector element type
* @tparam Allocator the vector allocator type
*/