Equalizer  1.6.1
client/client.h
1 
2 /* Copyright (c) 2005-2013, 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; }
38  class Client : public fabric::Client
39  {
40  public:
42  EQ_API Client();
43 
45  EQ_API virtual ~Client();
46 
56  EQ_API bool connectServer( ServerPtr server );
57 
65  EQ_API bool disconnectServer( ServerPtr server );
66 
93  EQ_API virtual bool initLocal( const int argc, char** argv );
94 
96  EQ_API virtual bool exitLocal();
97 
102  EQ_API bool hasCommands();
103 
105  EQ_API virtual co::CommandQueue* getMainThreadQueue();
106 
108  const Strings& getActiveLayouts();
109 
111  const std::string& getGPUFilter() const;
112 
114  float getModelUnit() const;
115 
116  protected:
128  EQ_API virtual void clientLoop();
129 
131  EQ_API virtual void exitClient();
132 
133  private:
134  detail::Client* const impl_;
135 
137  EQ_API virtual co::NodePtr createNode( const uint32_t type );
138 
140  EQ_API virtual void notifyDisconnect( co::NodePtr node );
141 
142  bool _setupClient( const std::string& clientArgs );
143 
145  bool _cmdExit( co::ICommand& command );
146  };
147 }
148 
149 #endif // EQ_CLIENT_H
bool hasCommands()
virtual bool exitLocal()
De-initialize a local, listening node.
bool connectServer(ServerPtr server)
Open and connect an Equalizer server to the local client.
virtual co::CommandQueue * getMainThreadQueue()
lunchbox::RefPtr< Server > ServerPtr
A reference-counted pointer to an eq::Server.
virtual bool initLocal(const int argc, char **argv)
Initialize a local, listening node.
Client()
Construct a new client.
The client represents a network node of the application in the cluster.
Definition: client/client.h:38
virtual void clientLoop()
Implements the processing loop for render clients.
virtual void exitClient()
Exit the process cleanly on render clients.
A client represents a network node of the application in the cluster.
Definition: fabric/client.h:33
bool disconnectServer(ServerPtr server)
Disconnect and close the connection to an Equalizer server.
virtual ~Client()
Destruct the client.