Collage  1.0.1
Object-Oriented C++ Network Library
customICommand.h
1 
2 /* Copyright (c) 2012, Daniel Nachbaur <danielnachbaur@gmail.com>
3  *
4  * This file is part of Collage <https://github.com/Eyescale/Collage>
5  *
6  * This library is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License version 2.1 as published
8  * by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef CO_CUSTOMICOMMAND_H
21 #define CO_CUSTOMICOMMAND_H
22 
23 #include <co/iCommand.h> // base class
24 
25 namespace co
26 {
27 
28 namespace detail { class CustomICommand; }
29 
34 class CustomICommand : public ICommand
35 {
36 public:
38  CO_API CustomICommand( const ICommand& command );
39 
41  CO_API CustomICommand( const CustomICommand& rhs );
42 
44  CO_API virtual ~CustomICommand();
45 
47  CO_API const uint128_t& getCommandID() const;
48 
49 private:
50  CustomICommand();
51  CustomICommand& operator = ( const CustomICommand& );
52  detail::CustomICommand* const _impl;
53 
54  void _init();
55 };
56 
57 CO_API std::ostream& operator << ( std::ostream& os, const CustomICommand& );
58 
59 }
60 
61 #endif //CO_CUSTOMICOMMAND_H
A class managing received commands.
Definition: iCommand.h:43
virtual CO_API ~CustomICommand()
Destruct a custom command.
An input command specialization for custom commands.