TuttleOFX
1
|
00001 #ifndef _TUTTLE_HOST_CORE_ATTRIBUTE_PARAMDOUBLE_MULTIDIM_HPP_ 00002 #define _TUTTLE_HOST_CORE_ATTRIBUTE_PARAMDOUBLE_MULTIDIM_HPP_ 00003 00004 /* Most of the implementation is in the AnimatedParam template */ 00005 #include "ParamDouble.hpp" 00006 00007 #include <tuttle/host/ofx/attribute/OfxhMultiDimParam.hpp> 00008 00009 namespace tuttle { 00010 namespace host { 00011 namespace attribute { 00012 00013 template <std::size_t DIM> 00014 class ParamDoubleMultiDim : public ofx::attribute::OfxhMultiDimParam<ParamDouble, DIM > 00015 { 00016 public: 00017 typedef ofx::attribute::OfxhMultiDimParam<ParamDouble, DIM > MultiDimParamParent; 00018 00019 ParamDoubleMultiDim( const ofx::attribute::OfxhParamDescriptor& descriptor, const std::string& name, ofx::attribute::OfxhParamSet& setInstance ) 00020 : MultiDimParamParent( descriptor, name, setInstance ) 00021 {} 00022 00023 virtual ~ParamDoubleMultiDim() = 0; 00024 00025 void setValueAtIndex( const std::size_t index, const double& v, const ofx::attribute::EChange change ) OFX_EXCEPTION_SPEC 00026 { 00027 MultiDimParamParent::setValueAtIndex( index, v, change ); 00028 } 00029 void setValueAtTimeAndIndex( const OfxTime time, const std::size_t index, const double& v, const ofx::attribute::EChange change ) OFX_EXCEPTION_SPEC 00030 { 00031 MultiDimParamParent::setValueAtTimeAndIndex( time, index, v, change ); 00032 } 00033 void setValueAtIndex( const std::size_t index, const int& v, const ofx::attribute::EChange change ) OFX_EXCEPTION_SPEC 00034 { 00035 MultiDimParamParent::setValueAtIndex( index, (double)v, change ); 00036 } 00037 void setValueAtTimeAndIndex( const OfxTime time, const std::size_t index, const int& v, const ofx::attribute::EChange change ) OFX_EXCEPTION_SPEC 00038 { 00039 MultiDimParamParent::setValueAtTimeAndIndex( time, index, (double)v, change ); 00040 } 00041 }; 00042 00043 template <std::size_t DIM> 00044 ParamDoubleMultiDim<DIM>::~ParamDoubleMultiDim() {} 00045 00046 } 00047 } 00048 } 00049 00050 #endif