TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/host/ofx/OfxhImageEffectNodeBase.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_HOST_OFX_IMAGEEFFECTNODE_BASE_HPP_
00002 #define _TUTTLE_HOST_OFX_IMAGEEFFECTNODE_BASE_HPP_
00003 
00004 #include "OfxhIObject.hpp"
00005 #include "property/OfxhSet.hpp"
00006 
00007 #include <boost/serialization/extended_type_info.hpp>
00008 #include <boost/serialization/export.hpp>
00009 
00010 namespace tuttle {
00011 namespace host {
00012 namespace ofx {
00013 
00014 // forward declare
00015 class OfxhPlugin;
00016 
00017 namespace attribute {
00018 class OfxhClipDescriptor;
00019 class OfxhClip;
00020 }
00021 
00022 namespace imageEffect {
00023 
00024 ////////////////////////////////////////////////////////////////////////////////
00025 /**
00026  * base class to both effect descriptors and instances
00027  */
00028 class OfxhImageEffectNodeBase : virtual public OfxhIObject
00029 {
00030 protected:
00031         property::OfxhSet _properties;
00032 
00033 public:
00034         OfxhImageEffectNodeBase( const property::OfxhSet& set );
00035         OfxhImageEffectNodeBase( const property::OfxhPropSpec* propSpec );
00036         virtual ~OfxhImageEffectNodeBase();
00037 
00038         bool operator==( const OfxhImageEffectNodeBase& other ) const;
00039         bool operator!=( const OfxhImageEffectNodeBase& other ) const { return !operator==( other ); }
00040 
00041         /// is my magic number valid?
00042         virtual bool verifyMagic() { return true; }
00043 
00044         /// obtain a handle on this for passing to the C api
00045         OfxImageEffectHandle getHandle() const;
00046 
00047         const property::OfxhSet& getProperties() const   { return _properties; }
00048         property::OfxhSet&       getEditableProperties() { return _properties; }
00049 
00050         /// name of the Node
00051         const std::string& getShortLabel() const;
00052 
00053         /// name of the Node
00054         const std::string& getLabel() const;
00055 
00056         /// name of the Node
00057         const std::string& getName() const;
00058 
00059         /// name of the Node
00060         void setName( const std::string& name );
00061 
00062         /// Description of the Node
00063         const std::string& getLongLabel() const;
00064 
00065         /// is the given context supported
00066         bool isContextSupported( const std::string& s ) const;
00067 
00068         /// what is the name of the group the plug-in belongs to
00069         const std::string& getPluginGrouping() const;
00070 
00071         /// is the effect single instance
00072         bool isSingleInstance() const;
00073 
00074         /// what is the thread safety on this effect
00075         const std::string& getRenderThreadSafety() const;
00076 
00077         /// should the host attempt to managed multi-threaded rendering if it can
00078         /// via tiling or some such
00079         bool getHostFrameThreading() const;
00080 
00081         #ifndef SWIG
00082         /// get the overlay interact main entry if it exists
00083         OfxPluginEntryPoint* getOverlayInteractMainEntry() const;
00084         #endif
00085 
00086         /// does the effect support images of differing sizes
00087         bool supportsMultiResolution() const;
00088 
00089         /// does the effect support tiled rendering
00090         bool supportsTiles() const;
00091 
00092         /// does this effect need random temporal access
00093         bool temporalAccess() const;
00094 
00095         /// is the given bit depth supported by the effect
00096         bool isBitDepthSupported( const std::string& s ) const;
00097 
00098         /// when field rendering, does the effect need to be called
00099         /// twice to render a frame in all circumstances (with different fields)
00100         bool fieldRenderTwiceAlways() const;
00101 
00102         /// does the effect support multiple clip depths
00103         bool supportsMultipleClipDepths() const;
00104 
00105         /// does the effect support multiple clip pixel aspect ratios
00106         bool supportsMultipleClipPARs() const;
00107 
00108         /// does changing the named param re-tigger a clip preferences action
00109         bool isClipPreferencesSlaveParam( const std::string& s ) const;
00110 
00111 private:
00112         friend class boost::serialization::access;
00113         template<class Archive>
00114         void serialize( Archive& ar, const unsigned int version )
00115         {
00116                 ar& BOOST_SERIALIZATION_NVP( _properties );
00117         }
00118 };
00119 
00120 }
00121 }
00122 }
00123 }
00124 
00125 #endif
00126