25 #include <co/commands.h>
26 #include <co/dataIStream.h>
31 namespace detail {
class ICommand; }
48 ConstBufferPtr buffer,
const bool swap );
49 CO_API ICommand(
const ICommand& rhs );
51 CO_API
virtual ~ICommand();
53 CO_API ICommand& operator = (
const ICommand& rhs );
60 CO_API uint32_t
getType()
const;
66 CO_API uint64_t
getSize()
const;
69 template<
typename T > T
get()
86 CO_API ConstBufferPtr getBuffer()
const;
95 CO_API
void setCommand(
const uint32_t cmd );
101 CO_API
bool operator()();
105 detail::ICommand*
const _impl;
107 friend CO_API std::ostream& operator << (std::ostream&,
const ICommand&);
111 CO_API
virtual size_t nRemainingBuffers()
const;
112 CO_API
virtual uint128_t getVersion()
const;
113 CO_API
virtual NodePtr getMaster();
114 CO_API
virtual bool getNextBuffer( uint32_t&, uint32_t&,
const void**,
121 CO_API std::ostream& operator << ( std::ostream& os,
const ICommand& );
123 #endif // CO_ICOMMAND_H
CO_API uint32_t getType() const
A class managing received commands.
CO_API NodePtr getNode() const
CO_API LocalNodePtr getLocalNode() const
lunchbox::RefPtr< LocalNode > LocalNodePtr
A reference pointer for LocalNode pointers.
static void swap(T &v)
Byte-swap a plain data item.
A wrapper to register a function callback on an object instance.
lunchbox::RefPtr< Node > NodePtr
A reference pointer for Node pointers.
A std::istream-like input data stream for binary data.
CO_API bool isValid() const
CO_API uint64_t getSize() const
CO_API uint32_t getCommand() const