Equalizer  1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
client/client.h
1 
2 /* Copyright (c) 2005-2014, Stefan Eilemann <eile@equalizergraphics.com>
3  * 2012, Daniel Nachbaur <danielnachbaur@gmail.com>
4  *
5  * This library is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License version 2.1 as published
7  * by the Free Software Foundation.
8  *
9  * This library is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12  * details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef EQ_CLIENT_H
20 #define EQ_CLIENT_H
21 
22 #include <eq/client/api.h>
23 #include <eq/client/commandQueue.h> // member
24 #include <eq/client/types.h> // basic types
25 #include <eq/fabric/client.h> // base class
26 
27 namespace eq
28 {
29 namespace detail { class Client; }
30 
39 class Client : public fabric::Client
40 {
41 public:
43  EQ_API Client();
44 
55  EQ_API bool connectServer( ServerPtr server );
56 
66  EQ_API bool disconnectServer( ServerPtr server );
67 
94  EQ_API virtual bool initLocal( const int argc, char** argv );
95 
97  EQ_API virtual bool exitLocal();
98 
103  EQ_API bool hasCommands();
104 
106  EQ_API virtual co::CommandQueue* getMainThreadQueue();
107 
109  const Strings& getActiveLayouts();
110 
112  const std::string& getGPUFilter() const;
113 
115  float getModelUnit() const;
116 
117 protected:
119  EQ_API virtual ~Client();
120 
131  EQ_API virtual void clientLoop();
132 
134  EQ_API virtual void exitClient();
135 
136 private:
137  detail::Client* const _impl;
138 
140  EQ_API co::NodePtr createNode( const uint32_t type ) override;
141 
143  EQ_API void notifyDisconnect( co::NodePtr node ) override;
144 
145  bool _setupClient( const std::string& clientArgs );
146 
148  bool _cmdExit( co::ICommand& command );
149 };
150 }
151 
152 #endif // EQ_CLIENT_H
virtual EQ_API co::CommandQueue * getMainThreadQueue()
EQ_API Client()
Construct a new client.
virtual EQ_API bool exitLocal()
De-initialize a local, listening node.
lunchbox::RefPtr< Server > ServerPtr
A reference-counted pointer to an eq::Server.
Definition: client/types.h:214
virtual EQ_API bool initLocal(const int argc, char **argv)
Initialize a local, listening node.
virtual EQ_API ~Client()
Destruct the client.
EQ_API bool disconnectServer(ServerPtr server)
Disconnect and close the connection to an Equalizer server.
virtual EQ_API void exitClient()
Exit the process cleanly on render clients.
EQ_API bool hasCommands()
A client represents a network node of the application in the cluster.
Definition: fabric/client.h:33
EQ_API bool connectServer(ServerPtr server)
Open and connect an Equalizer server to the local client.
virtual EQ_API void clientLoop()
Implements the processing loop for render clients.
The client represents a network node of the application in the cluster.
Definition: client/client.h:39