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() {
return read< T >(); }
84 CO_API ConstBufferPtr getBuffer()
const;
93 CO_API
void setCommand(
const uint32_t cmd );
99 CO_API
bool operator()();
103 detail::ICommand*
const _impl;
105 friend CO_API std::ostream& operator << (std::ostream&,
const ICommand&);
109 CO_API
size_t nRemainingBuffers()
const override;
110 CO_API uint128_t getVersion()
const override;
111 CO_API
bool getNextBuffer( uint32_t&, uint32_t&,
const void**,
112 uint64_t& )
override;
118 CO_API std::ostream& operator << ( std::ostream& os,
const ICommand& );
120 #endif // CO_ICOMMAND_H
Defines export visibility macros for library Collage.
CO_API uint32_t getCommand() const
static void swap(T &v)
Byte-swap a plain data item.
lunchbox::RefPtr< LocalNode > LocalNodePtr
A reference pointer for LocalNode pointers.
CO_API bool isValid() const
lunchbox::RefPtr< Node > NodePtr
A reference pointer for Node pointers.
Object-oriented network library.
CO_API uint64_t getSize() const
CO_API NodePtr getRemoteNode() const override
A class managing received commands.
CO_API uint32_t getType() const
A wrapper to register a function callback on an object instance.
A std::istream-like input data stream for binary data.
CommandType
The type of a Command.
CO_API LocalNodePtr getLocalNode() const override