1 #ifndef __CPPLUGINS__INTERFACE__PARAMETERS__H__
2 #define __CPPLUGINS__INTERFACE__PARAMETERS__H__
7 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
15 class cpPlugins_Interface_EXPORT Parameters
18 typedef Parameters Self;
41 typedef unsigned long TUint;
43 typedef std::string TString;
45 typedef std::pair< Self::Type, TString > TParameter;
46 typedef std::map< TString, TParameter > TParameters;
50 Parameters( const Self& other );
51 virtual ~Parameters( );
53 Self& operator=( const Self& other );
56 void Configure( const Self::Type& type, const TString& name );
57 void SetValueAsString( const TString& name, const TString& v );
58 void SetValueAsBool( const TString& name, const TBool& v );
59 void SetValueAsInt( const TString& name, const TInt& v );
60 void SetValueAsUint( const TString& name, const TUint& v );
61 void SetValueAsReal( const TString& name, const TReal& v );
62 void SetValueAsIndex( const TString& name, const TUint& n, ... );
63 void SetValueAsPoint( const TString& name, const TUint& n, ... );
65 void AddValueToStringList( const TString& name, const TString& v );
66 void AddValueToBoolList( const TString& name, const TBool& v );
67 void AddValueToIntList( const TString& name, const TInt& v );
68 void AddValueToUintList( const TString& name, const TUint& v );
69 void AddValueToRealList( const TString& name, const TReal& v );
70 void AddValueToIndexList( const TString& name, const TUint& n, ... );
71 void AddValueToPointList( const TString& name, const TUint& n, ... );
73 void ClearStringList( const TString& name );
74 void ClearBoolList( const TString& name );
75 void ClearIntList( const TString& name );
76 void ClearUintList( const TString& name );
77 void ClearRealList( const TString& name );
78 void ClearIndexList( const TString& name );
79 void ClearPointList( const TString& name );
81 std::vector< TString > GetParameters( ) const;
82 Self::Type GetParameterType( const TString& name ) const;
83 const TString& GetRawValue( const TString& name ) const;
84 const TString& GetValueAsString( const TString& name ) const;
85 TBool GetValueAsBool( const TString& name ) const;
86 TInt GetValueAsInt( const TString& name ) const;
87 TUint GetValueAsUint( const TString& name ) const;
88 TReal GetValueAsReal( const TString& name ) const;
91 I GetValueAsIndex( const TString& name ) const;
94 P GetValueAsPoint( const TString& name ) const;
96 void GetValueAsStringList(
97 std::vector< TString >& lst, const TString& name
99 void GetValueAsBoolList(
100 std::vector< TBool >& lst, const TString& name
102 void GetValueAsIntList(
103 std::vector< TInt >& lst, const TString& name
105 void GetValueAsUintList(
106 std::vector< TUint >& lst, const TString& name
108 void GetValueAsRealList(
109 std::vector< TReal >& lst, const TString& name
113 void GetValueAsIndexList(
114 std::vector< I >& lst, const TString& name
118 void GetValueAsPointList(
119 std::vector< P >& lst, const TString& name
124 TParameters m_Parameters;
131 #include <cpPlugins/Interface/Parameters.hxx>
133 #endif // __CPPLUGINS__INTERFACE__PARAMETERS__H__