A packet payload builder for creating payloads composed of heterogeneous data.
More...
A packet payload builder for creating payloads composed of heterogeneous data.
◆ PacketPayloadBuilder() [1/2]
catapult::ionet::PacketPayloadBuilder::PacketPayloadBuilder |
( |
PacketType |
type | ) |
|
|
inlineexplicit |
Creates builder for a packet with the specified type.
◆ PacketPayloadBuilder() [2/2]
catapult::ionet::PacketPayloadBuilder::PacketPayloadBuilder |
( |
PacketType |
type, |
|
|
uint32_t |
maxPacketDataSize |
|
) |
| |
|
inlineexplicit |
Creates builder for a packet with the specified type and max packet data size (maxPacketDataSize).
◆ appendEntities()
template<typename TEntity >
bool catapult::ionet::PacketPayloadBuilder::appendEntities |
( |
const std::vector< std::shared_ptr< TEntity >> & |
entities | ) |
|
|
inline |
Appends all entities to the payload.
◆ appendEntity()
template<typename TEntity >
bool catapult::ionet::PacketPayloadBuilder::appendEntity |
( |
const std::shared_ptr< TEntity > & |
pEntity | ) |
|
|
inline |
Appends a single entity (pEntity) to the payload.
◆ appendGeneratedEntities()
template<typename TEntityGenerator >
bool catapult::ionet::PacketPayloadBuilder::appendGeneratedEntities |
( |
TEntityGenerator && |
generator | ) |
|
|
inline |
Appends all entities produced by generator to the payload.
◆ appendGeneratedValues()
template<typename TValueGenerator >
bool catapult::ionet::PacketPayloadBuilder::appendGeneratedValues |
( |
TValueGenerator && |
generator | ) |
|
|
inline |
Appends all values produced by generator to the payload.
- Note
- generator is expected to produce pointers to fixed-size data.
◆ appendRange()
template<typename TEntity >
bool catapult::ionet::PacketPayloadBuilder::appendRange |
( |
model::EntityRange< TEntity > && |
range | ) |
|
|
inline |
Appends a fixed size range to the payload.
◆ appendValue()
template<typename TValue >
bool catapult::ionet::PacketPayloadBuilder::appendValue |
( |
const TValue & |
value | ) |
|
|
inline |
Appends a fixed size value to the payload.
◆ appendValues()
template<typename TValue >
bool catapult::ionet::PacketPayloadBuilder::appendValues |
( |
const std::vector< TValue > & |
values | ) |
|
|
inline |
Appends fixed size values to the payload.
◆ build()
Builds the packet payload.
◆ increaseSize()
bool catapult::ionet::PacketPayloadBuilder::increaseSize |
( |
uint32_t |
numBytes | ) |
|
|
inlineprivate |
◆ m_hasError
bool catapult::ionet::PacketPayloadBuilder::m_hasError |
|
private |
◆ m_maxPacketDataSize
uint32_t catapult::ionet::PacketPayloadBuilder::m_maxPacketDataSize |
|
private |
◆ m_payload
The documentation for this class was generated from the following file: