#include <cpPlugins/BaseObjects/Parameters.h>
-#include <cpExtensions/Utility.h>
+#include <cpPlugins/Utility.h>
#include <tinyxml2/tinyxml2.h>
// -------------------------------------------------------------------------
this->ConfigureAsChoices( name, choices );
}
+// -------------------------------------------------------------------------
+void cpPlugins::BaseObjects::Parameters::
+ConfigureAsIntTypesChoices( const std::string& name )
+{
+ std::vector< std::string > choices;
+#ifdef cpPlugins_CONFIG_INTEGER_TYPES_char
+ choices.push_back( "char" );
+ choices.push_back( "uchar" );
+#endif // cpPlugins_CONFIG_INTEGER_TYPES_char
+#ifdef cpPlugins_CONFIG_INTEGER_TYPES_short
+ choices.push_back( "short" );
+ choices.push_back( "ushort" );
+#endif // cpPlugins_CONFIG_INTEGER_TYPES_short
+#ifdef cpPlugins_CONFIG_INTEGER_TYPES_int
+ choices.push_back( "int" );
+ choices.push_back( "uint" );
+#endif // cpPlugins_CONFIG_INTEGER_TYPES_int
+#ifdef cpPlugins_CONFIG_INTEGER_TYPES_long
+ choices.push_back( "long" );
+ choices.push_back( "ulong" );
+#endif // cpPlugins_CONFIG_INTEGER_TYPES_long
+ this->ConfigureAsChoices( name, choices );
+}
+
+// -------------------------------------------------------------------------
+void cpPlugins::BaseObjects::Parameters::
+ConfigureAsScalarTypesChoices( const std::string& name )
+{
+ std::vector< std::string > choices;
+#ifdef cpPlugins_CONFIG_INTEGER_TYPES_char
+ choices.push_back( "char" );
+ choices.push_back( "uchar" );
+#endif // cpPlugins_CONFIG_INTEGER_TYPES_char
+#ifdef cpPlugins_CONFIG_INTEGER_TYPES_short
+ choices.push_back( "short" );
+ choices.push_back( "ushort" );
+#endif // cpPlugins_CONFIG_INTEGER_TYPES_short
+#ifdef cpPlugins_CONFIG_INTEGER_TYPES_int
+ choices.push_back( "int" );
+ choices.push_back( "uint" );
+#endif // cpPlugins_CONFIG_INTEGER_TYPES_int
+#ifdef cpPlugins_CONFIG_INTEGER_TYPES_long
+ choices.push_back( "long" );
+ choices.push_back( "ulong" );
+#endif // cpPlugins_CONFIG_INTEGER_TYPES_long
+#ifdef cpPlugins_CONFIG_REAL_TYPES_float
+ choices.push_back( "float" );
+#endif // cpPlugins_CONFIG_REAL_TYPES_float
+#ifdef cpPlugins_CONFIG_REAL_TYPES_double
+ choices.push_back( "double" );
+#endif // cpPlugins_CONFIG_REAL_TYPES_double
+ this->ConfigureAsChoices( name, choices );
+}
+
// -------------------------------------------------------------------------
std::vector< std::string > cpPlugins::BaseObjects::Parameters::
GetChoices( const std::string& name ) const
if( i->second.first == ( Self::Type )( _Enum ) )
{
std::vector< std::string > tokens;
- cpExtensions::Tokenize( tokens, i->second.second, "#" );
+ cpPlugins::Tokenize( tokens, i->second.second, "#" );
for( auto t = tokens.begin( ); t != tokens.end( ); ++t )
{
if( typeid( _Type ) != typeid( std::string ) )