]> Creatis software - cpPlugins.git/blobdiff - appli/examples/Parameters.cxx
Moved to version 1.0
[cpPlugins.git] / appli / examples / Parameters.cxx
diff --git a/appli/examples/Parameters.cxx b/appli/examples/Parameters.cxx
new file mode 100644 (file)
index 0000000..ee19b49
--- /dev/null
@@ -0,0 +1,56 @@
+// =========================================================================
+// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
+// =========================================================================
+
+#include <iostream>
+#include <cpPlugins/Parameters.h>
+
+int main( int argc, char* argv[] )
+{
+  cpPlugins::Parameters p;
+
+  /* TODO
+     p.SetInValue( "a", 9.0 );
+     p.SetInValue( "b", true );
+     p.SetInValue( "c", 7 );
+     p.SetInValue( "d", -8 );
+     p.SetInValue( "e", std::string( "Hello world!" ) );
+
+     p.ConfigureInputSet< bool >( "f" );
+     p.ConfigureInputSet< char >( "g" );
+     p.ConfigureInputSet< short >( "h" );
+     p.ConfigureInputSet< int >( "i" );
+     p.ConfigureInputSet< long >( "j" );
+     p.ConfigureInputSet< unsigned char >( "k" );
+     p.ConfigureInputSet< unsigned short >( "l" );
+     p.ConfigureInputSet< unsigned int >( "m" );
+     p.ConfigureInputSet< unsigned long >( "n" );
+     p.ConfigureInputSequence< float >( "o" );
+     p.ConfigureInputSet< double >( "p" );
+     p.ConfigureInputSet< std::string >( "q" );
+
+     p.AddToInputSet( "f", true );
+     p.AddToInputSet( "f", false );
+     p.AddToInputSet( "f", true );
+     p.AddToInputSet( "g", 'z' );
+     p.AddToInputSet( "g", 'b' );
+     p.AddToInputSet( "g", 'c' );
+     p.AddToInputSet( "g", 'a' );
+     p.AddToInputSet( "g", 'b' );
+     p.AddToInputSet( "g", 'a' );
+     p.AddToInputSet( "q", std::string( "hello" ) );
+     p.AddToInputSet( "q", std::string( "world" ) );
+     p.AddToInputSet( "q", std::string( "!" ) );
+     p.AddToInputSequence( "o", -1 );
+     p.AddToInputSequence( "o", 2.1 );
+     p.AddToInputSequence( "o", -3.2 );
+     p.AddToInputSequence( "o", 4.3 );
+     p.AddToInputSequence( "o", -5.4 );
+     p.AddToInputSequence( "o", 6.5 );
+
+     std::cout << p << std::endl;
+  */
+  return( 0 );
+}
+
+// eof - $RCSfile$