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;
63 CO_API uint32_t getCommand()
const;
66 CO_API uint64_t getSize()
const;
69 template<
typename T > T
get() {
return read< T >(); }
75 CO_API
NodePtr getRemoteNode()
const override;
81 CO_API
bool isValid()
const;
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( CompressorInfo&, 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.
lunchbox::RefPtr< LocalNode > LocalNodePtr
A reference pointer for LocalNode pointers.
lunchbox::RefPtr< Node > NodePtr
A reference pointer for Node pointers.
Object-oriented network library.
A class managing received commands.
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.