X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FParameters.cxx;h=4a05b4fb4763654783d4318d78233306fb739069;hb=f654620df52b811be7bd263a1775c93d29c69a65;hp=8312246c510f899def13458bd4b0b92444a6912b;hpb=2e9a8218ec2792eb36b62731e2ae0c7dbb9ef436;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Parameters.cxx b/lib/cpPlugins/Interface/Parameters.cxx index 8312246..4a05b4f 100644 --- a/lib/cpPlugins/Interface/Parameters.cxx +++ b/lib/cpPlugins/Interface/Parameters.cxx @@ -87,6 +87,7 @@ cpPlugins_Parameters_List_Configure( Uint ); cpPlugins_Parameters_List_Configure( Real ); cpPlugins_Parameters_List_Configure( Index ); cpPlugins_Parameters_List_Configure( Point ); +cpPlugins_Parameters_List_Configure( Vector ); // ------------------------------------------------------------------------- void cpPlugins::Interface::Parameters:: @@ -148,6 +149,7 @@ cpPlugins_Parameters_Has( Uint ); cpPlugins_Parameters_Has( Real ); cpPlugins_Parameters_Has( Index ); cpPlugins_Parameters_Has( Point ); +cpPlugins_Parameters_Has( Vector ); cpPlugins_Parameters_Has( StringList ); cpPlugins_Parameters_Has( BoolList ); cpPlugins_Parameters_Has( IntList ); @@ -155,6 +157,7 @@ cpPlugins_Parameters_Has( UintList ); cpPlugins_Parameters_Has( RealList ); cpPlugins_Parameters_Has( IndexList ); cpPlugins_Parameters_Has( PointList ); +cpPlugins_Parameters_Has( VectorList ); cpPlugins_Parameters_Has( Choices ); // ------------------------------------------------------------------------- @@ -226,7 +229,13 @@ GetReal( const TString& name ) const if( i != this->m_Parameters.end( ) ) { if( i->second.first == Self::Real ) - return( TReal( std::atof( i->second.second.second.c_str( ) ) ) ); + { + std::istringstream tok_str( i->second.second.second ); + float v; + tok_str >> v; + return( TReal( v ) ); + + } // fi } // fi return( TReal( 0 ) ); @@ -314,7 +323,13 @@ GetRealList( std::vector< TReal >& lst, const TString& name ) const std::istringstream str( i->second.second.second ); std::string token; while( std::getline( str, token, '#' ) ) - lst.push_back( TReal( std::atof( token.c_str( ) ) ) ); + { + std::istringstream tok_str( token ); + float v; + tok_str >> v; + lst.push_back( TReal( v ) ); + + } // elihw } // ------------------------------------------------------------------------- @@ -427,6 +442,7 @@ cpPlugins_Parameters_Clear( Uint ); cpPlugins_Parameters_Clear( Real ); cpPlugins_Parameters_Clear( Index ); cpPlugins_Parameters_Clear( Point ); +cpPlugins_Parameters_Clear( Vector ); // ------------------------------------------------------------------------- bool cpPlugins::Interface::Parameters::