X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FParameters.h;h=def98e7ddb46dba8efc81ab3c6302596051d3d2f;hb=2361f4f97631e09d88d8a5510a369817dcaa19db;hp=65bf2a86253c56115e79bfba8ab7dd289cd26d31;hpb=1c9f0e4788ee1b1f924f369ddadb7be7c8921f8c;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/Parameters.h b/lib/cpPlugins/Interface/Parameters.h index 65bf2a8..def98e7 100644 --- a/lib/cpPlugins/Interface/Parameters.h +++ b/lib/cpPlugins/Interface/Parameters.h @@ -2,8 +2,10 @@ #define __CPPLUGINS__INTERFACE__PARAMETERS__H__ #include +#include #include #include +#include namespace cpPlugins { @@ -11,28 +13,37 @@ namespace cpPlugins { /** */ - class Parameters + class cpPlugins_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; @@ -118,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;