33 const std::string& name) {
35 throw std::runtime_error(std::string(
"Parameter \"") + name +
"\" already assigned");
37 throw std::runtime_error(
"Setting invalid parent object!");
39 throw std::runtime_error(
"Invalid name: length 0");
45 AbstractParameter::~AbstractParameter() {
68 if (pf.
isSet(paramName)) {
69 std::string refName = pf.
get<std::string>(paramName);
70 if(refName.size() > 0 && refName.substr(0,1) ==
"@") {
71 refName = refName.erase(0,1);
ParameteredObject * _parent
Parent ParameteredObject.
void init(ParameteredObject *parent, const std::string &name)
Initialize new parameter.
std::ostream & operator<<(std::ostream &os, const AbstractParameter ¶meter)
Parameter stream output operator.
charon_core_LOCAL AbstractParameter(const AbstractParameter &)
Forbid copying.
This class serves to store parameters used within the Charon Project.
Parameter object handling.
std::string _followLink(const ParameterFile &pf, const std::string paramName) const
Follow reference to targeted parameter.
Base class for serializable objects.
std::string getName() const
Get parameter name.
virtual void intoStream(std::ostream &os) const =0
Inserts the value of the Parameter at the end of a stream.
std::string _name
Parameter name.
T get(std::string parameter) const
Get the value of a specified parameter.
bool isSet(std::string parameter) const
Check if a givem parameter has already been set.
Implementation of the template class ParameterFile.
ParameteredObject & getParent()
get parent object
Implementation of the abstract class AbstractParameter and template classes Parameter and ParameterLi...