#include <ParameterMap.hpp>
Public Types | |
|
typedef SymTab< std::string, ParameterSharedPtr, true > | TabParams |
|
typedef boost::shared_ptr < TabParams > | TabParamsPtr |
Public Member Functions | |
| ParameterSharedPtr | get (const ParameterContext &inContext, const std::string &inName) const throw () |
| void | set (const ParameterContext &inContext, const std::string &inName, const ParameterSharedPtr &inParam) throw () |
| void | getAllParameters (const ParameterContext &inContext, std::map< std::string, ParameterSharedPtr > &outParams) const throw () |
| void | getOverriddenParameters (const ParameterContext &inContext, std::map< std::string, ParameterSharedPtr > &outParams) const throw () |
| template<typename _Action> | |
| void | applyOnAllParameters (const ParameterContext &inContext, const _Action &action) throw (Error) |
| template<typename _Action> | |
| void | applyOnOverriddenParameters (const ParameterContext &inContext, const _Action &action) throw (Error) |
| ParameterContext | getNewContext () throw () |
| void | registerContext (const ParameterContext &inContext, const ParameterContext &inParentContext=ParameterContext()) throw (Error) |
| bool | isContextRegistered (const ParameterContext &inContext) const throw () |
| void | unregisterContext (const ParameterContext &inContext) throw () |
| ParameterMap (const ParameterMap &source) throw () | |
| ParameterMap & | operator= (const ParameterMap &source) throw () |
Private Types | |
|
typedef boost::shared_ptr < ParamData > | ParamDataPtr |
Private Attributes | |
|
SymTab< ParameterContext, ParamDataPtr > | mParameters |
| ParameterContext | mNextContext |
Classes | |
| struct | ParamData |
Definition at line 37 of file ParameterMap.hpp.
| ParameterSharedPtr torc::generic::ParameterMap::get | ( | const ParameterContext & | inContext, | |
| const std::string & | inName | |||
| ) | const throw () |
Get a named parameter or null if none exists
Definition at line 31 of file ParameterMap.cpp.
| void torc::generic::ParameterMap::set | ( | const ParameterContext & | inContext, | |
| const std::string & | inName, | |||
| const ParameterSharedPtr & | inParam | |||
| ) | throw () |
Saves a parameter by name. Overrides existing parameters if it exists.
| [in] | inContext | the context for which the param is valid |
| [in] | inName | name of param |
| [in] | inParam | pointer to the parameter |
Definition at line 56 of file ParameterMap.cpp.
| void torc::generic::ParameterMap::getAllParameters | ( | const ParameterContext & | inContext, | |
| std::map< std::string, ParameterSharedPtr > & | outParams | |||
| ) | const throw () |
Get all parameter name-value-pairs
| [in] | inContext | the context for which the param is valid |
| [out] | outParams | Map to be populated |
Definition at line 73 of file ParameterMap.cpp.
| void torc::generic::ParameterMap::getOverriddenParameters | ( | const ParameterContext & | inContext, | |
| std::map< std::string, ParameterSharedPtr > & | outParams | |||
| ) | const throw () |
Get all parameter name-value-pairs that have been overridden in this context. For a view context this will return an empty map.
| [in] | inContext | the context for which the param is valid |
| [out] | outParams | Map to be populated |
Definition at line 114 of file ParameterMap.cpp.
| void torc::generic::ParameterMap::applyOnAllParameters | ( | const ParameterContext & | inContext, | |
| const _Action & | action | |||
| ) | throw (Error) [inline] |
Apply action on all parameters.
| [in] | inContext | the context for which the param is valid |
| [in] | action | Action to be applied |
Definition at line 145 of file ParameterMap.hpp.
| void torc::generic::ParameterMap::applyOnOverriddenParameters | ( | const ParameterContext & | inContext, | |
| const _Action & | action | |||
| ) | throw (Error) [inline] |
Apply action on overridden parameters
| [in] | inContext | the context for which the param is valid |
| [in] | action | Action to be applied |
Definition at line 177 of file ParameterMap.hpp.
1.5.6