OnixS C++ ICE Binary Order Entry Handler 1.1.1
API Documentation
Loading...
Searching...
No Matches
SbeGroupList< BinarySize > Class Template Reference

Public Member Functions

 SbeGroupList (void *binary, BinarySize size, SchemaVersion version) noexcept
bool empty () const noexcept
template<class Group>
Group head () const noexcept
template<class Group>
SbeGroupList tail () const noexcept
template<class Group>
SbeVariableLengthFieldList< BinarySize > variableLengthFields () const noexcept
template<class Group>
SbeGroupList checkTail () const
template<class Group>
SbeVariableLengthFieldList< BinarySize > checkVariableLengthFields () const

Detailed Description

template<class BinarySize>
class OnixS::ICE::BOE::Messaging::SbeGroupList< BinarySize >

Definition at line 1019 of file SbeMessage.h.

Constructor & Destructor Documentation

◆ SbeGroupList()

template<class BinarySize>
SbeGroupList ( void * binary,
BinarySize size,
SchemaVersion version )
inlinenoexcept

Initializes the list over the memory block.

Definition at line 1024 of file SbeMessage.h.

1025 : binary_(binary)
1026 , size_(size)
1027 , version_(version)
1028 {
1029 }

Member Function Documentation

◆ checkTail()

template<class BinarySize>
template<class Group>
SbeGroupList checkTail ( ) const
inline

Checks the list consistency.

Returns
the list of groups that follow the head.

Definition at line 1076 of file SbeMessage.h.

1077 {
1078 const BinarySize headSize = checkHead<Group>();
1079
1080 return SbeGroupList(advanceByBytes(binary_, headSize), size_ - headSize, version_);
1081 }
ONIXS_ICEBOE_FORCEINLINE Type * advanceByBytes(Type *pointer, ptrdiff_t distance) noexcept
Advances the pointer to a given offset (distance) in bytes.
Definition Memory.h:110

◆ checkVariableLengthFields()

template<class BinarySize>
template<class Group>
SbeVariableLengthFieldList< BinarySize > checkVariableLengthFields ( ) const
inline

Checks the variable length fields list consistency.

Returns
the list of fields that follow the head.

Definition at line 1087 of file SbeMessage.h.

1088 {
1089 const BinarySize headSize = checkHead<Group>();
1090
1091 return SbeVariableLengthFieldList<BinarySize>(advanceByBytes(binary_, headSize), size_ - headSize, version_);
1092 }

◆ empty()

template<class BinarySize>
bool empty ( ) const
inlinenoexcept
Returns
true if the list is empty, otherwise - false.

Definition at line 1032 of file SbeMessage.h.

1033 {
1034 return (0 == size_);
1035 }

◆ head()

template<class BinarySize>
template<class Group>
Group head ( ) const
inlinenoexcept
Returns
the head group.

Definition at line 1039 of file SbeMessage.h.

1040 {
1041 assert(!empty());
1042
1043 return Group(binary_, size_, version_);
1044 }

◆ tail()

template<class BinarySize>
template<class Group>
SbeGroupList tail ( ) const
inlinenoexcept
Returns
the list of groups that follow the head.

Definition at line 1048 of file SbeMessage.h.

1049 {
1050 assert(!empty());
1051
1052 const BinarySize headSize = head<Group>().binarySize();
1053
1054 assert(headSize <= size_);
1055
1056 return SbeGroupList(advanceByBytes(binary_, headSize), size_ - headSize, version_);
1057 }

◆ variableLengthFields()

template<class BinarySize>
template<class Group>
SbeVariableLengthFieldList< BinarySize > variableLengthFields ( ) const
inlinenoexcept
Returns
variable length fields.

Definition at line 1061 of file SbeMessage.h.

1062 {
1063 assert(!empty());
1064
1065 const BinarySize headSize = head<Group>().binarySize();
1066
1067 assert(headSize <= size_);
1068
1069 return SbeVariableLengthFieldList<BinarySize>(advanceByBytes(binary_, headSize), size_ - headSize, version_);
1070 }