9 #ifndef _fei_ParameterSet_hpp_
10 #define _fei_ParameterSet_hpp_
67 bool maintain_unique_keys=
true);
76 const Param*
get(
const char* name)
const;
113 if (offset_ < paramarray_->
size()) {
141 return( !(*
this == rhs) );
160 int& paramValue)
const;
167 double& paramValue)
const;
173 std::string& paramValue)
const;
179 bool& paramValue)
const;
185 const void*& paramValue)
const;
198 if (
params_->empty() || name == NULL)
return( -1 );
200 std::vector<const Param*>::const_iterator
205 for(; p_iter != p_end; ++p_iter, ++i) {
206 const Param* prm = *p_iter;
217 if (param == NULL)
return( -1 );
219 return( findOffset( param->
getName().c_str() ) );
237 int index = findOffset(¶m);
240 params_->push_back(newparam);
243 if (maintain_unique_keys) {
244 delete (*params_)[index];
245 (*params_)[index] = newparam;
248 params_->push_back(newparam);
256 return( params_->size() );
262 if (params_ == NULL)
return(NULL);
264 int index = findOffset(name);
265 if (index < 0)
return(NULL);
266 return( (*params_)[index] );
const fei::Param dummyParam_
const Param * get(const char *name) const
int getVoidParamValue(const char *name, const void *¶mValue) const
bool operator==(const const_iterator &rhs)
int getBoolParamValue(const char *name, bool ¶mValue) const
int getStringParamValue(const char *name, std::string ¶mValue) const
bool operator!=(const const_iterator &rhs)
void add(const Param ¶m, bool maintain_unique_keys=true)
int getDoubleParamValue(const char *name, double ¶mValue) const
int findOffset(const fei::Param *param) const
const_iterator & operator++()
const Param & operator*() const
const_iterator(int offset, std::vector< const Param * > *params)
const std::string & getName() const
const_iterator end() const
const_iterator & operator=(const const_iterator &src)
std::vector< const Param * > * params_
const_iterator begin() const
std::vector< const fei::Param * > * paramarray_
int getIntParamValue(const char *name, int ¶mValue) const