TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/host/ofx/attribute/OfxhParamString.hpp
Go to the documentation of this file.
00001 #ifndef _TUTTLE_HOST_OFX_PARAM_PARAMSTRING_HPP_
00002 #define _TUTTLE_HOST_OFX_PARAM_PARAMSTRING_HPP_
00003 
00004 #include "OfxhParam.hpp"
00005 #include "OfxhParamDescriptor.hpp"
00006 #include "OfxhParamSet.hpp"
00007 #include "OfxhKeyframeParam.hpp"
00008 
00009 namespace tuttle {
00010 namespace host {
00011 namespace ofx {
00012 namespace attribute {
00013 
00014 class OfxhParamString
00015         : public OfxhParam
00016         , public OfxhKeyframeParam
00017 {
00018 mutable std::string _returnValue;     ///< location to hold temporary return value. Should delegate this to implementation!!!
00019 
00020 public:
00021         typedef std::string BaseType;
00022         OfxhParamString( const OfxhParamDescriptor& descriptor, const std::string& name, OfxhParamSet& setInstance ) : OfxhParam( descriptor, name, setInstance ) {}
00023 
00024         const std::string& getStringMode() const;
00025 
00026         virtual void getValue( std::string& ) const OFX_EXCEPTION_SPEC                                                  = 0;
00027         virtual void getValueAtTime( const OfxTime time, std::string& ) const OFX_EXCEPTION_SPEC                        = 0;
00028         virtual void setValue( const std::string&, const EChange change )                OFX_EXCEPTION_SPEC             = 0;
00029         virtual void setValueAtTime( const OfxTime time, const std::string&, const EChange change )  OFX_EXCEPTION_SPEC = 0;
00030 
00031 #ifndef SWIG
00032         /// implementation of var args function
00033         virtual void getV( va_list arg ) const OFX_EXCEPTION_SPEC;
00034 
00035         /// implementation of var args function
00036         virtual void getV( const OfxTime time, va_list arg ) const OFX_EXCEPTION_SPEC;
00037 
00038         /// implementation of var args function
00039         virtual void setV( va_list arg, const EChange change ) OFX_EXCEPTION_SPEC;
00040 
00041         /// implementation of var args function
00042         virtual void setV( const OfxTime time, va_list arg, const EChange change ) OFX_EXCEPTION_SPEC;
00043 #endif
00044 
00045         bool paramTypeHasData() const { return true; }
00046 
00047         std::size_t getHashAtTime( const OfxTime time ) const;
00048 
00049         std::ostream& displayValues( std::ostream& os ) const
00050         {
00051                 os << getStringValue();
00052                 return os;
00053         }
00054 };
00055 
00056 }
00057 }
00058 }
00059 }
00060 
00061 #endif
00062