1 #ifndef __CPPLUGINS__INTERFACE__PARAMETERS__H__
2 #define __CPPLUGINS__INTERFACE__PARAMETERS__H__
17 typedef Parameters Self;
37 typedef unsigned long TUint;
39 typedef std::string TString;
41 typedef std::pair< Self::Type, TString > TParameter;
42 typedef std::map< TString, TParameter > TParameters;
46 Parameters( const Self& other );
47 virtual ~Parameters( );
49 Self& operator=( const Self& other );
51 void Configure( const Self::Type& type, const TString& name );
52 void SetValueAsString( const TString& name, const TString& v );
53 void SetValueAsInt( const TString& name, const TInt& v );
54 void SetValueAsUint( const TString& name, const TUint& v );
55 void SetValueAsReal( const TString& name, const TReal& v );
56 void SetValueAsIndex( const TString& name, const TUint& n, ... );
57 void SetValueAsPoint( const TString& name, const TUint& n, ... );
60 void SetValueAsStringList(
61 const TString& name, const I& b, const I& e
65 void SetValueAsIntList(
66 const TString& name, const I& b, const I& e
70 void SetValueAsUintList(
71 const TString& name, const I& b, const I& e
75 void SetValueAsRealList(
76 const TString& name, const I& b, const I& e
80 void SetValueAsIndexList(
81 const TString& name, const I& b, const I& e
85 void SetValueAsPointList(
86 const TString& name, const I& b, const I& e
89 std::vector< TString > GetParameters( ) const;
90 Self::Type GetParameterType( const TString& name ) const;
91 const TString& GetValueAsString( const TString& name ) const;
92 TInt GetValueAsInt( const TString& name ) const;
93 TUint GetValueAsUint( const TString& name ) const;
94 TReal GetValueAsReal( const TString& name ) const;
97 I GetValueAsIndex( const TString& name ) const;
100 P GetValueAsPoint( const TString& name ) const;
102 void GetValueAsStringList(
103 std::vector< TString >& lst, const TString& name
105 void GetValueAsIntList(
106 std::vector< TInt >& lst, const TString& name
108 void GetValueAsUintList(
109 std::vector< TUint >& lst, const TString& name
111 void GetValueAsRealList(
112 std::vector< TReal >& lst, const TString& name
116 void GetValueAsIndexList(
117 std::vector< I >& lst, const TString& name
121 void GetValueAsPointList(
122 std::vector< P >& lst, const TString& name
127 TParameters m_Parameters;
134 #include <cpPlugins/Interface/Parameters.hxx>
136 #endif // __CPPLUGINS__INTERFACE__PARAMETERS__H__