lib/client/layout.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef EQ_LAYOUT_H
00019 #define EQ_LAYOUT_H
00020
00021 #include <eq/client/object.h>
00022 #include <eq/client/types.h>
00023 #include <eq/client/visitorResult.h>
00024
00025 #include <string>
00026
00027 namespace eq
00028 {
00029 namespace server
00030 {
00031 class Layout;
00032 }
00033 class Config;
00034 class LayoutVisitor;
00035
00046 class Layout : public Object
00047 {
00048 public:
00052 EQ_EXPORT Layout();
00053
00055 EQ_EXPORT virtual ~Layout();
00056
00062 const ViewVector& getViews() const { return _views; }
00063
00064 Config* getConfig() { return _config; }
00065 const Config* getConfig() const { return _config; }
00067
00078 EQ_EXPORT VisitorResult accept( LayoutVisitor& visitor );
00079
00081 EQ_EXPORT virtual void deregister();
00083
00084 protected:
00086 EQ_EXPORT virtual void deserialize( net::DataIStream& is,
00087 const uint64_t dirtyBits );
00088
00089 enum DirtyBits
00090 {
00091 DIRTY_VIEWS = Object::DIRTY_CUSTOM << 0,
00092 DIRTY_FILL1 = Object::DIRTY_CUSTOM << 1,
00093 DIRTY_FILL2 = Object::DIRTY_CUSTOM << 2,
00094 DIRTY_CUSTOM = Object::DIRTY_CUSTOM << 3
00095 };
00096 friend class server::Layout;
00097
00098 private:
00100 Config* _config;
00101 friend class Config;
00102
00104 ViewVector _views;
00105
00106 union
00107 {
00108 char dummy[64];
00109 };
00110
00111 void _addView( View* view );
00112 bool _removeView( View* view );
00113 };
00114
00115 std::ostream& operator << ( std::ostream& os, const Layout* layout);
00116 }
00117 #endif // EQ_LAYOUT_H