Equalizer  1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
client/observer.h
1 
2 /* Copyright (c) 2009-2013, Stefan Eilemann <eile@equalizergraphics.com>
3  *
4  * This library is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU Lesser General Public License version 2.1 as published
6  * by the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11  * details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  */
17 
18 #ifndef EQ_OBSERVER_H
19 #define EQ_OBSERVER_H
20 
21 #include <eq/client/api.h>
22 #include <eq/client/types.h>
23 #include <eq/fabric/observer.h> // base class
24 
25 namespace eq
26 {
27 namespace detail { class Observer; }
28 
37  class Observer : public fabric::Observer< Config, Observer >
38  {
39  public:
41  EQ_API Observer( Config* parent );
42 
44  EQ_API virtual ~Observer();
45 
57  EQ_API virtual bool handleEvent( EventICommand& command );
59 
63  EQ_API ServerPtr getServer();
65 
66  void addView( View* ) { /* nop */ }
67  void removeView( View* ) { /* nop */ }
68 
69  protected:
79  EQ_API virtual bool configInit();
80  friend class detail::InitVisitor;
81 
83  EQ_API virtual bool configExit();
84  friend class detail::ExitVisitor;
85 
96  EQ_API virtual void frameStart( const uint32_t frameNumber );
97  friend class detail::FrameVisitor;
99 
100  private:
101  detail::Observer* const _impl;
102  };
103 }
104 #endif // EQ_OBSERVER_H
virtual EQ_API void frameStart(const uint32_t frameNumber)
Start rendering a frame.
virtual EQ_API bool handleEvent(EventICommand &command)
Handle an event.
A configuration is a visualization session driven by an application.
Definition: client/config.h:55
Base data transport class for observers.
virtual EQ_API bool configInit()
Initialize this observer.
virtual EQ_API ~Observer()
Destruct this observer.
lunchbox::RefPtr< Server > ServerPtr
A reference-counted pointer to an eq::Server.
Definition: client/types.h:214
A command specialization for config events.
Definition: eventICommand.h:38
A View is a 2D area of a Layout.
Definition: client/view.h:43
EQ_API Observer(Config *parent)
Construct a new observer.
virtual EQ_API bool configExit()
Exit this observer.
An Observer looks at one or more views from a certain position (head matrix) with a given eye separat...
EQ_API ServerPtr getServer()