Equalizer  1.4.1
fabric/frame.h
00001 
00002 /* Copyright (c) 2012, Stefan Eilemann <eile@eyescale.ch>
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 EQFABRIC_FRAME_H
00019 #define EQFABRIC_FRAME_H
00020 
00021 #include <eq/fabric/api.h>
00022 #include <eq/fabric/eye.h>    // enum
00023 #include <eq/fabric/types.h>
00024 #include <co/object.h>  // base class
00025 
00026 namespace eq
00027 {
00028 namespace fabric
00029 {
00030 namespace detail { class Frame; }
00032     class Frame : public co::Object
00033     {
00034     public:
00040         enum Buffer
00041         {
00042             BUFFER_NONE      = LB_BIT_NONE,
00043             BUFFER_UNDEFINED = LB_BIT1,  
00044             BUFFER_COLOR     = LB_BIT5,  
00045             BUFFER_DEPTH     = LB_BIT9,  
00046             BUFFER_ALL       = LB_BIT_ALL_32
00047         };
00048 
00050         enum Type
00051         {
00052             TYPE_MEMORY,    
00053             TYPE_TEXTURE    
00054         };
00055 
00057         EQFABRIC_API Frame();
00058 
00060         EQFABRIC_API virtual ~Frame();
00061 
00065         EQFABRIC_API void setName( const std::string& name );
00066 
00068         EQFABRIC_API const std::string& getName() const;
00069 
00071         EQFABRIC_API const Vector2i& getOffset() const;
00072 
00081         EQFABRIC_API void setOffset( const Vector2i& offset );
00082 
00091         EQFABRIC_API void setZoom( const Zoom& zoom );
00092 
00094         EQFABRIC_API const Zoom& getZoom() const;
00095 
00097         EQFABRIC_API const co::ObjectVersion& getDataVersion( const Eye ) const;
00099 
00101         EQFABRIC_API const std::vector< uint128_t >&
00102             getInputNodes( const Eye eye ) const;
00103 
00105         EQFABRIC_API const std::vector< uint128_t >&
00106         getInputNetNodes(const Eye eye) const;
00107 
00108     protected:
00109         virtual ChangeType getChangeType() const { return INSTANCE; }
00110         EQFABRIC_API virtual void getInstanceData( co::DataOStream& os );
00111         EQFABRIC_API virtual void applyInstanceData( co::DataIStream& is );
00112 
00114         EQFABRIC_API void _setDataVersion( const unsigned i,
00115                                            const co::ObjectVersion& ov );
00116 
00118         EQFABRIC_API std::vector< uint128_t >& _getInputNodes(const unsigned i);
00119 
00121         EQFABRIC_API std::vector< uint128_t >&
00122         _getInputNetNodes( const unsigned i);
00123 
00124     private:
00125         detail::Frame* const _impl;
00126     };
00127 
00129     EQFABRIC_API std::ostream& operator << ( std::ostream&, const Frame& );
00131     EQFABRIC_API std::ostream& operator << ( std::ostream&, const Frame::Type );
00133     EQFABRIC_API std::ostream& operator << (std::ostream&, const Frame::Buffer);
00134 }
00135 }
00136 #endif // EQFABRIC_FRAME_H
Generated on Mon Nov 26 2012 14:41:48 for Equalizer 1.4.1 by  doxygen 1.7.6.1