Collage  1.0.1
Object-Oriented C++ Network Library
types.h
1 
2 /* Copyright (c) 2006-2013, Stefan Eilemann <eile@equalizergraphics.com>
3  * 2011-2012, Daniel Nachbaur <danielnachbaur@gmail.com>
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_TYPES_H
22 #define CO_TYPES_H
23 
24 #include <co/defines.h>
25 #include <lunchbox/refPtr.h>
26 #include <lunchbox/types.h>
27 
28 #include <deque>
29 #include <vector>
30 
31 namespace co
32 {
33 
34 #define CO_SEPARATOR '#'
35 
36 #define EQ_INSTANCE_MAX LB_MAX_UINT32
37 #define EQ_INSTANCE_NONE 0xfffffffdu
38 #define EQ_INSTANCE_INVALID 0xfffffffeu
39 #define EQ_INSTANCE_ALL 0xffffffffu
40 
41 class Barrier;
42 class Buffer;
43 class CommandQueue;
44 class Connection;
45 class ConnectionDescription;
46 class ConnectionListener;
47 class CustomICommand;
48 class CustomOCommand;
49 class DataIStream;
50 class DataOStream;
51 class Global;
52 class ICommand;
53 class LocalNode;
54 class Node;
55 class OCommand;
56 class Object;
57 class ObjectICommand;
58 class ObjectDataICommand;
59 class ObjectDataIStream;
60 class ObjectDataOCommand;
61 class ObjectFactory;
62 class ObjectHandler;
63 class ObjectOCommand;
64 class QueueItem;
65 class QueueMaster;
66 class QueueSlave;
67 class Serializable;
68 class Zeroconf;
69 template< class Q > class WorkerThread;
70 struct ObjectVersion;
71 
72 using lunchbox::UUID;
73 using lunchbox::uint128_t;
74 using lunchbox::Strings;
75 using lunchbox::StringsCIter;
76 
77 typedef UUID NodeID;
78 
80 typedef lunchbox::RefPtr< Node > NodePtr;
82 typedef lunchbox::RefPtr< const Node > ConstNodePtr;
84 typedef lunchbox::RefPtr< LocalNode > LocalNodePtr;
86 typedef lunchbox::RefPtr< const LocalNode > ConstLocalNodePtr;
88 typedef lunchbox::RefPtr< Connection > ConnectionPtr;
90 typedef lunchbox::RefPtr< ConnectionDescription > ConnectionDescriptionPtr;
92 typedef lunchbox::RefPtr< const ConnectionDescription >
95 typedef std::vector< ConnectionListener* > ConnectionListeners;
96 
98 typedef std::vector< NodePtr > Nodes;
100 typedef Nodes::iterator NodesIter;
102 typedef Nodes::const_iterator NodesCIter;
103 
105 typedef std::vector< Object* > Objects;
107 typedef Objects::iterator ObjectsIter;
109 typedef Objects::const_iterator ObjectsCIter;
110 
111 typedef std::vector< Barrier* > Barriers;
112 typedef Barriers::iterator BarriersIter;
113 typedef Barriers::const_iterator BarriersCIter;
114 
116 typedef std::vector< ConnectionPtr > Connections;
118 typedef Connections::const_iterator ConnectionsCIter;
120 typedef Connections::iterator ConnectionsIter;
121 
123 typedef std::vector< ConnectionDescriptionPtr > ConnectionDescriptions;
125 typedef ConnectionDescriptions::iterator ConnectionDescriptionsIter;
127 typedef ConnectionDescriptions::const_iterator ConnectionDescriptionsCIter;
128 
130 typedef std::vector< ICommand > ICommands;
132 typedef ICommands::iterator ICommandsIter;
134 typedef ICommands::const_iterator ICommandsCIter;
135 
137 class BufferListener;
138 class MasterCMCommand;
139 class SendToken;
140 
141 typedef lunchbox::RefPtr< Buffer > BufferPtr;
142 typedef lunchbox::RefPtr< const Buffer > ConstBufferPtr;
143 
144 typedef std::vector< ObjectVersion > ObjectVersions;
145 typedef ObjectVersions::const_iterator ObjectVersionsCIter;
146 typedef std::deque< ObjectDataIStream* > ObjectDataIStreamDeque;
147 typedef std::vector< ObjectDataIStream* > ObjectDataIStreams;
150 #ifndef EQ_2_0_API
151 namespace base
152 {
153 using namespace lunchbox;
154 using co::Global;
155 }
156 #endif
157 
158 }
159 #endif // CO_TYPES_H
std::vector< ConnectionPtr > Connections
A vector of ConnectionPtr&#39;s.
Definition: types.h:116
A listener interface to buffer state changes.
UUID NodeID
A unique identifier for nodes.
Definition: types.h:77
lunchbox::RefPtr< ConnectionDescription > ConnectionDescriptionPtr
A reference pointer for ConnectionDescription pointers.
Definition: types.h:90
Nodes::const_iterator NodesCIter
A const iterator for a vector of nodes.
Definition: types.h:102
ICommands::const_iterator ICommandsCIter
A const iterator for a vector of input commands.
Definition: types.h:134
std::vector< ICommand > ICommands
A vector of input commands.
Definition: types.h:130
lunchbox::RefPtr< LocalNode > LocalNodePtr
A reference pointer for LocalNode pointers.
Definition: types.h:84
ICommands::iterator ICommandsIter
A iterator for a vector of input commands.
Definition: types.h:132
std::vector< Barrier * > Barriers
A vector of barriers.
Definition: types.h:111
std::vector< ConnectionListener * > ConnectionListeners
A vector of ConnectionListener.
Definition: types.h:95
A helper struct bundling an object identifier and version.
Definition: objectVersion.h:45
Objects::iterator ObjectsIter
A iterator for a vector of objects.
Definition: types.h:107
lunchbox::RefPtr< Node > NodePtr
A reference pointer for Node pointers.
Definition: types.h:80
lunchbox::RefPtr< const LocalNode > ConstLocalNodePtr
A reference pointer for const LocalNode pointers.
Definition: types.h:86
lunchbox::RefPtr< const Node > ConstNodePtr
A reference pointer for const Node pointers.
Definition: types.h:82
ConnectionDescriptions::iterator ConnectionDescriptionsIter
An iterator for a vector of ConnectionDescriptionPtr&#39;s.
Definition: types.h:125
A worker thread processing items out of a CommandQueue.
Definition: types.h:69
std::vector< Object * > Objects
A vector of objects.
Definition: types.h:105
Global parameter handling for the Collage library.
Definition: global.h:30
Objects::const_iterator ObjectsCIter
A const iterator for a vector of objects.
Definition: types.h:109
std::vector< ConnectionDescriptionPtr > ConnectionDescriptions
A vector of ConnectionDescriptionPtr&#39;s.
Definition: types.h:123
Connections::iterator ConnectionsIter
An iterator for a vector of ConnectionPtr&#39;s.
Definition: types.h:120
Barriers::iterator BarriersIter
Barriers iterator.
Definition: types.h:112
Nodes::iterator NodesIter
An iterator for a vector of nodes.
Definition: types.h:100
std::vector< NodePtr > Nodes
A vector of NodePtr&#39;s.
Definition: types.h:98
ConnectionDescriptions::const_iterator ConnectionDescriptionsCIter
A const iterator for a vector of ConnectionDescriptionPtr&#39;s.
Definition: types.h:127
Barriers::const_iterator BarriersCIter
Barriers const iterator.
Definition: types.h:113
Connections::const_iterator ConnectionsCIter
A const iterator for a vector of ConnectionPtr&#39;s.
Definition: types.h:118
lunchbox::RefPtr< const ConnectionDescription > ConstConnectionDescriptionPtr
A reference pointer for const ConnectionDescription pointers.
Definition: types.h:93
lunchbox::RefPtr< Connection > ConnectionPtr
A reference pointer for Connection pointers.
Definition: types.h:88