-template< class I >
-void cpPlugins::Interface::Parameters::
-SetValueAsStringList( const std::string& name, const I& b, const I& e )
-{
- TParameters::iterator pIt = this->m_Parameters.find( name );
- if( pIt == this->m_Parameters.end( ) )
- return;
- if( pIt->second.first != Self::StringList )
- return;
-
- std::stringstream ss;
- for( I i = b; i != e; ++i )
- ss << *i << ":";
- pIt->second = ss.str( );
-}
-
-// -------------------------------------------------------------------------
-template< class I >
-void cpPlugins::Interface::Parameters::
-SetValueAsIntList( const std::string& name, const I& b, const I& e )
-{
- TParameters::iterator pIt = this->m_Parameters.find( name );
- if( pIt == this->m_Parameters.end( ) )
- return;
- if( pIt->second.first != Self::IntList )
- return;
-
- std::stringstream ss;
- for( I i = b; i != e; ++i )
- ss << *i << ":";
- pIt->second = ss.str( );
-}
-
-// -------------------------------------------------------------------------
-template< class I >
-void cpPlugins::Interface::Parameters::
-SetValueAsUintList( const std::string& name, const I& b, const I& e )
-{
- TParameters::iterator pIt = this->m_Parameters.find( name );
- if( pIt == this->m_Parameters.end( ) )
- return;
- if( pIt->second.first != Self::UintList )
- return;
-
- std::stringstream ss;
- for( I i = b; i != e; ++i )
- ss << *i << ":";
- pIt->second = ss.str( );
-}
-
-// -------------------------------------------------------------------------
-template< class I >
-void cpPlugins::Interface::Parameters::
-SetValueAsRealList( const std::string& name, const I& b, const I& e )
-{
- TParameters::iterator pIt = this->m_Parameters.find( name );
- if( pIt == this->m_Parameters.end( ) )
- return;
- if( pIt->second.first != Self::RealList )
- return;
-
- std::stringstream ss;
- for( I i = b; i != e; ++i )
- ss << *i << ":";
- pIt->second = ss.str( );
-}
-
-// -------------------------------------------------------------------------
-template< class I >
-void cpPlugins::Interface::Parameters::
-SetValueAsIndexList( const std::string& name, const I& b, const I& e )
-{
- // TODO
-}
-
-// -------------------------------------------------------------------------
-template< class I >
-void cpPlugins::Interface::Parameters::
-SetValueAsPointList( const std::string& name, const I& b, const I& e )
-{
- // TODO
-}
+#define cpPlugins_Interface_Parameters_SetListMacro( TYPE ) \
+ template< class I > \
+ void cpPlugins::Interface::Parameters:: \
+ SetValueAs##TYPE##List( const TString& name, const I& b, const I& e ) \
+ { \
+ TParameters::iterator pIt = this->m_Parameters.find( name ); \
+ if( pIt == this->m_Parameters.end( ) ) \
+ return; \
+ if( pIt->second.first != Self::TYPE##List ) \
+ return; \
+ std::stringstream ss; \
+ for( I i = b; i != e; ++i ) \
+ ss << *i << ":"; \
+ pIt->second = ss.str( ); \
+ }
+
+cpPlugins_Interface_Parameters_SetListMacro( String );
+cpPlugins_Interface_Parameters_SetListMacro( Int );
+cpPlugins_Interface_Parameters_SetListMacro( Uint );
+cpPlugins_Interface_Parameters_SetListMacro( Real );
+cpPlugins_Interface_Parameters_SetListMacro( Index );
+cpPlugins_Interface_Parameters_SetListMacro( Point );