TuttleOFX  1
OfxhParamGroup.cpp
Go to the documentation of this file.
00001 #include "OfxhParamGroup.hpp"
00002 
00003 namespace tuttle {
00004 namespace host {
00005 namespace ofx {
00006 namespace attribute {
00007 
00008 /**
00009  * setChildrens have to clone each source instance recursively
00010  */
00011 void OfxhParamGroup::setChildrens( const OfxhParamSet* childrens )
00012 {
00013         deleteChildrens();
00014 
00015         /// @todo tuttle: use clone ?
00016         for( ParamVector::const_iterator it = childrens->getParamVector().begin(), itEnd = childrens->getParamVector().end();
00017              it != itEnd;
00018              ++it )
00019         {
00020                 _paramVector.push_back( it->clone() );
00021         }
00022 }
00023 
00024 void OfxhParamGroup::addChildren( OfxhParam* children )
00025 {
00026         children->setParamSetInstance( this );
00027         _paramVector.push_back( children );
00028 }
00029 
00030 OfxhParamSet* OfxhParamGroup::getChildrens() const
00031 {
00032         return (OfxhParamSet*)this;
00033 }
00034 
00035 }
00036 }
00037 }
00038 }
00039