Collage  1.6.0
High-performance C++ library for developing object-oriented distributed applications.
objectICommand.h
1 
2 /* Copyright (c) 2012, Daniel Nachbaur <danielnachbaur@gmail.com>
3  * 2012-2014, Stefan.Eilemann@epfl.ch
4  *
5  * This file is part of Collage <https://github.com/Eyescale/Collage>
6  *
7  * This library is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU Lesser General Public License version 2.1 as published
9  * by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14  * details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef CO_OBJECTICOMMAND_H
22 #define CO_OBJECTICOMMAND_H
23 
24 #include <co/iCommand.h> // base class
25 
26 namespace co
27 {
28 namespace detail { class ObjectICommand; }
29 
31 class ObjectICommand : public ICommand
32 {
33 public:
35  CO_API ObjectICommand( LocalNodePtr local, NodePtr remote,
36  ConstBufferPtr buffer, const bool swap );
37 
39  // cppcheck-suppress noExplicitConstructor
40  CO_API ObjectICommand( const ICommand& command );
41 
43  CO_API ObjectICommand( const ObjectICommand& rhs );
44 
46  CO_API virtual ~ObjectICommand();
47 
49  const uint128_t& getObjectID() const;
50 
52  uint32_t getInstanceID() const;
53 
54 private:
55  ObjectICommand();
56  ObjectICommand& operator = ( const ObjectICommand& );
57  detail::ObjectICommand* const _impl;
58 
59  void _init();
60 };
61 
63 CO_API std::ostream& operator << ( std::ostream& os, const ObjectICommand& );
64 }
65 
66 #endif //CO_OBJECTICOMMAND_H
lunchbox::RefPtr< LocalNode > LocalNodePtr
A reference pointer for LocalNode pointers.
Definition: types.h:90
lunchbox::RefPtr< Node > NodePtr
A reference pointer for Node pointers.
Definition: types.h:86
Object-oriented network library.
Definition: barrier.h:27
A class managing received commands.
Definition: iCommand.h:43
An input command specialization for objects.