Equalizer  1.13.0
Parallel Rendering Framework
fabric/client.h
1 
2 /* Copyright (c) 2010-2012, Stefan Eilemann <eile@eyescale.ch>
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 EQFABRIC_CLIENT_H
20 #define EQFABRIC_CLIENT_H
21 
22 #include <eq/fabric/api.h>
23 #include <eq/fabric/types.h> // basic types
24 #include <co/localNode.h> // base class
25 
26 namespace eq
27 {
28 namespace fabric
29 {
30 namespace detail { class Client; }
31 
33 class Client : public co::LocalNode
34 {
35 public:
45  EQFABRIC_API bool connectServer( co::NodePtr server );
46 
54  EQFABRIC_API bool disconnectServer( co::NodePtr server );
55 
60  EQFABRIC_API void processCommand( const uint32_t timeout =
61  LB_TIMEOUT_INDEFINITE );
62 
64  virtual co::CommandQueue* getMainThreadQueue() = 0;
65 
67  EQFABRIC_API virtual bool dispatchCommand( co::ICommand& command );
68 
69 protected:
71  EQFABRIC_API Client();
72 
74  EQFABRIC_API virtual ~Client();
75 
76 private:
77  detail::Client* _impl;
78 };
79 }
80 }
81 
82 #endif // EQFABRIC_CLIENT_H
EQFABRIC_API bool connectServer(co::NodePtr server)
Open and connect an Equalizer server to the local client.
Defines export visibility macros for library EqualizerFabric.
EQFABRIC_API bool disconnectServer(co::NodePtr server)
Disconnect and close the connection to an Equalizer server.
EQFABRIC_API void processCommand(const uint32_t timeout=LB_TIMEOUT_INDEFINITE)
Get and process one pending command from the node command queue.
virtual co::CommandQueue * getMainThreadQueue()=0
The Equalizer client library.
Definition: eq/agl/types.h:23
A client represents a network node of the application in the cluster.
Definition: fabric/client.h:33
virtual EQFABRIC_API ~Client()
Destruct the client.
EQFABRIC_API Client()
Construct a new client.