Marlin
01.17.01
|
Simple parameters class for Marlin. More...
#include <StringParameters.h>
Public Member Functions | |
StringParameters () | |
StringParameters (const StringParameters &sp) | |
void | add (const std::string &key, const std::vector< std::string > &values) |
void | add (const std::vector< std::string > &tokens) |
void | erase (const std::string &key) |
bool | isParameterSet (const std::string &key) |
int | getIntVal (const std::string &key) |
float | getFloatVal (const std::string &key) |
const std::string & | getStringVal (const std::string &key) |
IntVec & | getIntVals (const std::string &key, IntVec &intVec) |
FloatVec & | getFloatVals (const std::string &key, FloatVec &floatVec) |
StringVec & | getStringVals (const std::string &key, StringVec &stringVec) |
StringVec & | getStringKeys (StringVec &stringVec) |
virtual | ~StringParameters () |
Protected Attributes | |
ParametersMap | _map {} |
Friends | |
std::ostream & | operator<< (std::ostream &, StringParameters &) |
Simple parameters class for Marlin.
Holds named parameters as string vectors.
Definition at line 34 of file StringParameters.h.
marlin::StringParameters::StringParameters | ( | ) |
Definition at line 10 of file StringParameters.cc.
marlin::StringParameters::StringParameters | ( | const StringParameters & | sp | ) |
Definition at line 14 of file StringParameters.cc.
|
virtual |
Definition at line 18 of file StringParameters.cc.
void marlin::StringParameters::add | ( | const std::string & | key, |
const std::vector< std::string > & | values | ||
) |
Definition at line 23 of file StringParameters.cc.
References _map, and std::vector< T >::size().
Referenced by marlin::XMLParser::parametersFromNode(), marlin::Parser::parse(), marlin::XMLParser::parse(), and GParamDelegate::setModelData().
void marlin::StringParameters::add | ( | const std::vector< std::string > & | tokens | ) |
Definition at line 31 of file StringParameters.cc.
References _map, and std::vector< T >::size().
void marlin::StringParameters::erase | ( | const std::string & | key | ) |
Definition at line 39 of file StringParameters.cc.
References _map, and std::map< K, T >::erase().
Referenced by GParamDelegate::setModelData().
float marlin::StringParameters::getFloatVal | ( | const std::string & | key | ) |
Definition at line 56 of file StringParameters.cc.
References _map, and marlin::floatVal().
FloatVec & marlin::StringParameters::getFloatVals | ( | const std::string & | key, |
FloatVec & | floatVec | ||
) |
Definition at line 81 of file StringParameters.cc.
References _map, and marlin::floatVal().
int marlin::StringParameters::getIntVal | ( | const std::string & | key | ) |
Definition at line 49 of file StringParameters.cc.
References _map, and marlin::intVal().
Referenced by marlin::ProcessorEventSeeder::registerProcessor().
IntVec & marlin::StringParameters::getIntVals | ( | const std::string & | key, |
IntVec & | intVec | ||
) |
Definition at line 73 of file StringParameters.cc.
References _map, and marlin::intVal().
Definition at line 96 of file StringParameters.cc.
References _map, std::map< K, T >::begin(), std::map< K, T >::end(), and std::vector< T >::push_back().
const std::string & marlin::StringParameters::getStringVal | ( | const std::string & | key | ) |
Definition at line 64 of file StringParameters.cc.
References _map.
Referenced by marlin::ProcessorMgr::modifyEvent(), marlin::Parser::parse(), and marlin::ProcessorMgr::processEvent().
StringVec & marlin::StringParameters::getStringVals | ( | const std::string & | key, |
StringVec & | stringVec | ||
) |
Definition at line 89 of file StringParameters.cc.
References _map.
bool marlin::StringParameters::isParameterSet | ( | const std::string & | key | ) |
Definition at line 44 of file StringParameters.cc.
References _map, and std::map< K, T >::size().
|
friend |
|
protected |
Definition at line 63 of file StringParameters.h.
Referenced by add(), erase(), getFloatVal(), getFloatVals(), getIntVal(), getIntVals(), getStringKeys(), getStringVal(), getStringVals(), isParameterSet(), and marlin::operator<<().