TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/host/ofx/attribute/OfxhClipImageDescriptor.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_HOST_OFX_ATTRIBUTE_CLIPIMAGEDESCRIPTOR_HPP_
00002 #define _TUTTLE_HOST_OFX_ATTRIBUTE_CLIPIMAGEDESCRIPTOR_HPP_
00003 
00004 #include "OfxhClipImageAccessor.hpp"
00005 #include "OfxhClipDescriptor.hpp"
00006 
00007 namespace tuttle {
00008 namespace host {
00009 namespace ofx {
00010 namespace attribute {
00011 
00012 /**
00013  * a clip image descriptor
00014  */
00015 class OfxhClipImageDescriptor
00016         : virtual public OfxhClipImageAccessor
00017         , public OfxhClipDescriptor
00018 {
00019 public:
00020         typedef OfxhClipImageDescriptor This;
00021 
00022 private:
00023         OfxhClipImageDescriptor();
00024         void init( const std::string& name );
00025 
00026 public:
00027         /// constructor
00028         OfxhClipImageDescriptor( const std::string& name );
00029 
00030         virtual ~OfxhClipImageDescriptor() {}
00031 
00032         bool operator==( const This& other ) const
00033         {
00034                 if( OfxhClipDescriptor::operator!=( other ) )
00035                         return false;
00036                 return true;
00037         }
00038 
00039         bool operator!=( const This& other ) const { return !This::operator==( other ); }
00040 
00041         /** get a handle on the clip descriptor for the C api
00042          */
00043         OfxImageClipHandle getOfxImageClipHandle() const
00044         {
00045                 return ( OfxImageClipHandle ) this;
00046         }
00047 
00048 private:
00049         friend class boost::serialization::access;
00050         template<class Archive>
00051         void serialize( Archive& ar, const unsigned int version )
00052         {
00053                 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP( OfxhClipDescriptor );
00054         }
00055 
00056 };
00057 
00058 }
00059 }
00060 }
00061 }
00062 
00063 // force boost::is_virtual_base_of value (used by boost::serialization)
00064 namespace boost {
00065 template<>
00066 struct is_virtual_base_of<tuttle::host::ofx::attribute::OfxhClipDescriptor, tuttle::host::ofx::attribute::OfxhClipImageDescriptor>: public mpl::true_ {};
00067 }
00068 
00069 #endif
00070