1 #ifndef __CPPLUGINS__INTERFACE__PARAMETERS__H__
2 #define __CPPLUGINS__INTERFACE__PARAMETERS__H__
17 typedef Parameters Self;
40 typedef unsigned long TUint;
42 typedef std::string TString;
44 typedef std::pair< Self::Type, TString > TParameter;
45 typedef std::map< TString, TParameter > TParameters;
49 Parameters( const Self& other );
50 virtual ~Parameters( );
52 Self& operator=( const Self& other );
55 void Configure( const Self::Type& type, const TString& name );
56 void SetValueAsString( const TString& name, const TString& v );
57 void SetValueAsBool( const TString& name, const TBool& v );
58 void SetValueAsInt( const TString& name, const TInt& v );
59 void SetValueAsUint( const TString& name, const TUint& v );
60 void SetValueAsReal( const TString& name, const TReal& v );
61 void SetValueAsIndex( const TString& name, const TUint& n, ... );
62 void SetValueAsPoint( const TString& name, const TUint& n, ... );
64 void AddValueToStringList( const TString& name, const TString& v );
65 void AddValueToBoolList( const TString& name, const TBool& v );
66 void AddValueToIntList( const TString& name, const TInt& v );
67 void AddValueToUintList( const TString& name, const TUint& v );
68 void AddValueToRealList( const TString& name, const TReal& v );
69 void AddValueToIndexList( const TString& name, const TUint& n, ... );
70 void AddValueToPointList( const TString& name, const TUint& n, ... );
72 void ClearStringList( const TString& name );
73 void ClearBoolList( const TString& name );
74 void ClearIntList( const TString& name );
75 void ClearUintList( const TString& name );
76 void ClearRealList( const TString& name );
77 void ClearIndexList( const TString& name );
78 void ClearPointList( const TString& name );
80 std::vector< TString > GetParameters( ) const;
81 Self::Type GetParameterType( const TString& name ) const;
82 const TString& GetRawValue( const TString& name ) const;
83 const TString& GetValueAsString( const TString& name ) const;
84 TBool GetValueAsBool( const TString& name ) const;
85 TInt GetValueAsInt( const TString& name ) const;
86 TUint GetValueAsUint( const TString& name ) const;
87 TReal GetValueAsReal( const TString& name ) const;
90 I GetValueAsIndex( const TString& name ) const;
93 P GetValueAsPoint( const TString& name ) const;
95 void GetValueAsStringList(
96 std::vector< TString >& lst, const TString& name
98 void GetValueAsBoolList(
99 std::vector< TBool >& lst, const TString& name
101 void GetValueAsIntList(
102 std::vector< TInt >& lst, const TString& name
104 void GetValueAsUintList(
105 std::vector< TUint >& lst, const TString& name
107 void GetValueAsRealList(
108 std::vector< TReal >& lst, const TString& name
112 void GetValueAsIndexList(
113 std::vector< I >& lst, const TString& name
117 void GetValueAsPointList(
118 std::vector< P >& lst, const TString& name
123 TParameters m_Parameters;
130 #include <cpPlugins/Interface/Parameters.hxx>
132 #endif // __CPPLUGINS__INTERFACE__PARAMETERS__H__