Equalizer  1.4.1
oCommand.h
00001 
00002 /* Copyright (c) 2012, Daniel Nachbaur <danielnachbaur@gmail.com>
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  *
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef CO_OCOMMAND_H
00019 #define CO_OCOMMAND_H
00020 
00021 #include <co/commands.h>       // for COMMANDTYPE_NODE
00022 #include <co/dataOStream.h>    // base class
00023 
00024 
00025 namespace co
00026 {
00027 
00028 namespace detail { class OCommand; }
00029 
00037 class OCommand : public DataOStream
00038 {
00039 public:
00047     CO_API OCommand( const Connections& receivers, const uint32_t cmd,
00048                      const uint32_t type = COMMANDTYPE_NODE );
00049 
00058     CO_API OCommand( Dispatcher* const dispatcher, LocalNodePtr localNode,
00059                      const uint32_t cmd, const uint32_t type=COMMANDTYPE_NODE );
00060 
00062     CO_API OCommand( const OCommand& rhs );
00063 
00065     CO_API virtual ~OCommand();
00066 
00075     CO_API void sendHeader( const uint64_t additionalSize );
00076 
00078     CO_API static size_t getSize();
00079 
00080 protected:
00081     CO_API virtual void sendData( const void* buffer, const uint64_t size,
00082                                   const bool last );
00083 
00084 private:
00085     OCommand& operator = ( const OCommand& );
00086     detail::OCommand* const _impl;
00087 
00088     void _init( const uint32_t cmd, const uint32_t type );
00089 };
00090 }
00091 
00092 #endif //CO_OCOMMAND_H
Generated on Mon Nov 26 2012 14:41:49 for Equalizer 1.4.1 by  doxygen 1.7.6.1