Collage
1.0.1
Object-Oriented C++ Network Library
|
A class for sending commands with data to local and external nodes. More...
#include <oCommand.h>
Public Member Functions | |
CO_API | OCommand (const Connections &receivers, const uint32_t cmd, const uint32_t type=COMMANDTYPE_NODE) |
CO_API | OCommand (Dispatcher *const dispatcher, LocalNodePtr localNode, const uint32_t cmd, const uint32_t type=COMMANDTYPE_NODE) |
CO_API | OCommand (const OCommand &rhs) |
virtual CO_API | ~OCommand () |
Send or dispatch this command during destruction. More... | |
CO_API void | sendHeader (const uint64_t additionalSize) |
Public Member Functions inherited from co::DataOStream | |
CO_API void | disable () |
void | enableSave () |
void | disableSave () |
CO_API bool | hasSentData () const |
CO_API const Connections & | getConnections () const |
DataOStream & | streamDataHeader (DataOStream &os) |
void | sendBody (ConnectionPtr connection, const void *data, const uint64_t size) |
uint64_t | getCompressedDataSize () const |
template<class T > | |
DataOStream & | operator<< (const T &value) |
Write a plain data item by copying it to the stream. More... | |
template<class T > | |
DataOStream & | operator<< (Array< T > array) |
Write a C array. More... | |
template<class T > | |
DataOStream & | operator<< (const lunchbox::Buffer< T > &buffer) |
Write a lunchbox::Buffer. More... | |
template<class T > | |
DataOStream & | operator<< (const std::vector< T > &value) |
Write a std::vector of serializable items. More... | |
template<class K , class V > | |
DataOStream & | operator<< (const std::map< K, V > &value) |
Write a std::map of serializable items. More... | |
template<class T > | |
DataOStream & | operator<< (const std::set< T > &value) |
Write a std::set of serializable items. More... | |
template<class K , class V > | |
DataOStream & | operator<< (const stde::hash_map< K, V > &value) |
Write a stde::hash_map of serializable items. More... | |
template<class T > | |
DataOStream & | operator<< (const stde::hash_set< T > &value) |
Write a stde::hash_set of serializable items. More... | |
template<typename C > | |
void | serializeChildren (const std::vector< C * > &children) |
template<> | |
DataOStream & | operator<< (const std::string &str) |
Write a std::string. More... | |
template<> | |
DataOStream & | operator<< (const Object *const &object) |
Write an object identifier and version. More... | |
template<> | |
DataOStream & | operator<< (const std::vector< uint8_t > &value) |
Optimized specialization to write a std::vector of uint8_t. More... | |
template<> | |
DataOStream & | operator<< (const std::vector< uint16_t > &value) |
Optimized specialization to write a std::vector of uint16_t. More... | |
template<> | |
DataOStream & | operator<< (const std::vector< int16_t > &value) |
Optimized specialization to write a std::vector of int16_t. More... | |
template<> | |
DataOStream & | operator<< (const std::vector< uint32_t > &value) |
Optimized specialization to write a std::vector of uint32_t. More... | |
template<> | |
DataOStream & | operator<< (const std::vector< int32_t > &value) |
Optimized specialization to write a std::vector of int32_t. More... | |
template<> | |
DataOStream & | operator<< (const std::vector< uint64_t > &value) |
Optimized specialization to write a std::vector of uint64_t. More... | |
template<> | |
DataOStream & | operator<< (const std::vector< int64_t > &value) |
Optimized specialization to write a std::vector of int64_t. More... | |
template<> | |
DataOStream & | operator<< (const std::vector< float > &value) |
Optimized specialization to write a std::vector of float. More... | |
template<> | |
DataOStream & | operator<< (const std::vector< double > &value) |
Optimized specialization to write a std::vector of double. More... | |
template<> | |
DataOStream & | operator<< (const std::vector< ObjectVersion > &value) |
Optimized specialization to write a std::vector of ObjectVersion. More... | |
Static Public Member Functions | |
static CO_API size_t | getSize () |
Protected Member Functions | |
virtual CO_API void | sendData (const void *buffer, const uint64_t size, const bool last) |
Protected Member Functions inherited from co::DataOStream | |
DataOStream (DataOStream &rhs) | |
CO_API lunchbox::Bufferb & | getBuffer () |
void | _initCompressor (const uint32_t compressor) |
CO_API void | _enable () |
void | flush (const bool last) |
void | _setupConnections (const Nodes &receivers) |
void | _setupConnections (const Connections &connections) |
void | _setupConnection (NodePtr node, const bool useMulticast) |
CO_API void | _setupConnection (ConnectionPtr connection) |
void | _resend () |
void | _clearConnections () |
virtual CO_API void | reset () |
A class for sending commands with data to local and external nodes.
The data to this command is added via the interface provided by DataOStream. The command is send or dispatched after it goes out of scope, i.e. during destruction.
Definition at line 40 of file oCommand.h.
|
virtual |
Send or dispatch this command during destruction.