server/layout.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef EQSERVER_LAYOUT_H
00019 #define EQSERVER_LAYOUT_H
00020
00021 #include "visitorResult.h"
00022 #include "types.h"
00023
00024 #include <eq/client/layout.h>
00025 #include <string>
00026
00027 namespace eq
00028 {
00029 namespace server
00030 {
00031 class LayoutVisitor;
00032 class ConstLayoutVisitor;
00033 struct LayoutPath;
00034 struct ViewPath;
00035
00039 class Layout : public eq::Object
00040 {
00041 public:
00045 EQSERVER_EXPORT Layout();
00046
00048 Layout( const Layout& from, Config* config );
00049
00051 virtual ~Layout();
00052
00058 EQSERVER_EXPORT void addView( View* view );
00059
00061 bool removeView( View* view );
00062
00064 const ViewVector& getViews() const { return _views; }
00065
00073 View* findView( const std::string& name );
00074
00075 Config* getConfig() { return _config; }
00076 const Config* getConfig() const { return _config; }
00077
00079 View* getView( const ViewPath& path );
00080
00082 LayoutPath getPath() const;
00084
00095 VisitorResult accept( LayoutVisitor& visitor );
00096 VisitorResult accept( ConstLayoutVisitor& visitor ) const;
00097
00099 void unmap();
00101
00102 protected:
00104 virtual void serialize( net::DataOStream& os,
00105 const uint64_t dirtyBits );
00106
00107 private:
00108 virtual void getInstanceData( net::DataOStream& os );
00109
00111 Config* _config;
00112 friend class Config;
00113
00115 ViewVector _views;
00116
00117 union
00118 {
00119 char dummy[64];
00120 };
00121 };
00122
00123 std::ostream& operator << ( std::ostream& os, const Layout* layout);
00124 }
00125 }
00126 #endif // EQSERVER_LAYOUT_H