server/layout.h

00001 
00002 /* Copyright (c) 2009, Stefan Eilemann <eile@equalizergraphics.com> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef EQSERVER_LAYOUT_H
00019 #define EQSERVER_LAYOUT_H
00020 
00021 #include "visitorResult.h" // enum
00022 #include "types.h"
00023 
00024 #include <eq/client/layout.h> // base class
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 // placeholder for binary-compatible changes
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
Generated on Mon Aug 10 18:58:40 2009 for Equalizer 0.9 by  doxygen 1.5.8