X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=appli%2Fexamples%2FParameters.cxx;fp=appli%2Fexamples%2FParameters.cxx;h=ee19b4954a0c5557e6e0ba08972bdf7f851a3a27;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=0000000000000000000000000000000000000000;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/appli/examples/Parameters.cxx b/appli/examples/Parameters.cxx new file mode 100644 index 0000000..ee19b49 --- /dev/null +++ b/appli/examples/Parameters.cxx @@ -0,0 +1,56 @@ +// ========================================================================= +// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) +// ========================================================================= + +#include +#include + +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$