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 );
52 void Configure( const Self::Type& type, const TString& name );
53 void SetValueAsString( const TString& name, const TString& v );
54 void SetValueAsInt( const TString& name, const TInt& v );
55 void SetValueAsUint( const TString& name, const TUint& v );
56 void SetValueAsReal( const TString& name, const TReal& v );
57 void SetValueAsIndex( const TString& name, const TUint& n, ... );
58 void SetValueAsPoint( const TString& name, const TUint& n, ... );
61 void SetValueAsStringList(
62 const TString& name, const I& b, const I& e
66 void SetValueAsIntList(
67 const TString& name, const I& b, const I& e
71 void SetValueAsUintList(
72 const TString& name, const I& b, const I& e
76 void SetValueAsRealList(
77 const TString& name, const I& b, const I& e
81 void SetValueAsIndexList(
82 const TString& name, const I& b, const I& e
86 void SetValueAsPointList(
87 const TString& name, const I& b, const I& e
90 std::vector< TString > GetParameters( ) const;
91 Self::Type GetParameterType( const TString& name ) const;
92 const TString& GetValueAsString( const TString& name ) const;
93 TInt GetValueAsInt( const TString& name ) const;
94 TUint GetValueAsUint( const TString& name ) const;
95 TReal GetValueAsReal( const TString& name ) const;
98 I GetValueAsIndex( const TString& name ) const;
101 P GetValueAsPoint( const TString& name ) const;
103 void GetValueAsStringList(
104 std::vector< TString >& lst, const TString& name
106 void GetValueAsIntList(
107 std::vector< TInt >& lst, const TString& name
109 void GetValueAsUintList(
110 std::vector< TUint >& lst, const TString& name
112 void GetValueAsRealList(
113 std::vector< TReal >& lst, const TString& name
117 void GetValueAsIndexList(
118 std::vector< I >& lst, const TString& name
122 void GetValueAsPointList(
123 std::vector< P >& lst, const TString& name
128 TParameters m_Parameters;
135 #include <cpPlugins/Interface/Parameters.hxx>
137 #endif // __CPPLUGINS__INTERFACE__PARAMETERS__H__