lib/client/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 EQ_LAYOUT_H
00019 #define EQ_LAYOUT_H
00020 
00021 #include <eq/client/object.h>         // base class
00022 #include <eq/client/types.h>
00023 #include <eq/client/visitorResult.h>  // enum
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 // placeholder for binary-compatible changes
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
Generated on Mon Aug 10 18:58:40 2009 for Equalizer 0.9 by  doxygen 1.5.8