TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/host/ofx/attribute/OfxhParamSetDescriptor.cpp
Go to the documentation of this file.
00001 #include "OfxhParamSetDescriptor.hpp"
00002 
00003 namespace tuttle {
00004 namespace host {
00005 namespace ofx {
00006 namespace attribute {
00007 
00008 /**
00009  * obtain a handle on this set for passing to the C api
00010  */
00011 OfxhParamSetDescriptor::OfxhParamSetDescriptor() {}
00012 
00013 OfxhParamSetDescriptor::~OfxhParamSetDescriptor()
00014 {}
00015 
00016 void OfxhParamSetDescriptor::addParam( const std::string& name, OfxhParamDescriptor* p )
00017 {
00018         _paramList.push_back( p );
00019         _paramMap[name] = p;
00020 }
00021 
00022 /**
00023  * define a param on this effect
00024  */
00025 OfxhParamDescriptor* OfxhParamSetDescriptor::paramDefine( const char* paramType,
00026                                                           const char* name )
00027 {
00028         if( !isStandardType( paramType ) )
00029                 BOOST_THROW_EXCEPTION( OfxhException( std::string( "The param type '" ) + paramType + "' is not recognize, the param '" + name + "' can't be created." ) );
00030 
00031         OfxhParamDescriptor* desc = new OfxhParamDescriptor( paramType, name );
00032         desc->initStandardParamProps( paramType );
00033         addParam( name, desc );
00034         return desc;
00035 }
00036 
00037 }
00038 }
00039 }
00040 }
00041