Collage  1.1.2
High-performance C++ library for developing object-oriented distributed applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
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  CO_API ObjectICommand( const ICommand& command );
40 
42  CO_API ObjectICommand( const ObjectICommand& rhs );
43 
45  CO_API virtual ~ObjectICommand();
46 
48  const uint128_t& getObjectID() const;
49 
51  uint32_t getInstanceID() const;
52 
53 private:
54  ObjectICommand();
55  ObjectICommand& operator = ( const ObjectICommand& );
56  detail::ObjectICommand* const _impl;
57 
58  void _init();
59 };
60 
62 CO_API std::ostream& operator << ( std::ostream& os, const ObjectICommand& );
63 }
64 
65 #endif //CO_OBJECTICOMMAND_H
static void swap(T &v)
Byte-swap a plain data item.
Definition: dataIStream.h:106
lunchbox::RefPtr< LocalNode > LocalNodePtr
A reference pointer for LocalNode pointers.
Definition: types.h:90
virtual CO_API ~ObjectICommand()
Destruct an object command.
lunchbox::RefPtr< Node > NodePtr
A reference pointer for Node pointers.
Definition: types.h:86
A class managing received commands.
Definition: iCommand.h:43
An input command specialization for objects.