X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FParameters.h;h=0e54f0f7fdfae594e9fd9a55cb7042fde4a22a10;hb=9db1bda2d32466d92fcf87f263baed3b987dfde6;hp=1e840f4ed8b102e82c9608895ae567c0c78848f5;hpb=2f31ff29fdccf54267ff31b6f4755820225b668a;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Parameters.h b/lib/cpPlugins/Interface/Parameters.h index 1e840f4..0e54f0f 100644 --- a/lib/cpPlugins/Interface/Parameters.h +++ b/lib/cpPlugins/Interface/Parameters.h @@ -2,6 +2,7 @@ #define __CPPLUGINS__INTERFACE__PARAMETERS__H__ #include +#include #include #include #include @@ -14,26 +15,35 @@ namespace cpPlugins */ class cpPlugins_Interface_EXPORT Parameters { + // ------------------------------------------------------------------- + friend std::ostream& operator<<( + std::ostream& os, const Parameters& p + ) + { + Parameters::TParameters::const_iterator pIt = + p.m_Parameters.begin( ); + for( ; pIt != p.m_Parameters.end( ); ++pIt ) + { + os + << pIt->first << ": (" + << pIt->second.first << ", " + << pIt->second.second << ")" + << std::endl; + + } // rof + return( os ); + } + public: typedef Parameters Self; enum Type { - String = 0, - Bool, - Int, - Uint, - Real, - Index, - Point, - StringList, - BoolList, - IntList, - UintList, - RealList, - IndexList, - PointList, - NoType + String , Bool , Int , + Uint , Real , Index , + Point , StringList , BoolList , + IntList , UintList , RealList , + IndexList , PointList , NoType }; typedef bool TBool; @@ -119,6 +129,20 @@ namespace cpPlugins std::vector< P >& lst, const TString& name ) const; + bool HasStringValue( const TString& name ) const; + bool HasBoolValue( const TString& name ) const; + bool HasIntValue( const TString& name ) const; + bool HasUintValue( const TString& name ) const; + bool HasRealValue( const TString& name ) const; + bool HasIndexValue( const TString& name ) const; + bool HasPointValue( const TString& name ) const; + bool HasStringListValue( const TString& name ) const; + bool HasBoolListValue( const TString& name ) const; + bool HasIntListValue( const TString& name ) const; + bool HasUintListValue( const TString& name ) const; + bool HasRealListValue( const TString& name ) const; + bool HasIndexListValue( const TString& name ) const; + bool HasPointListValue( const TString& name ) const; protected: TParameters m_Parameters;