78 std::string _followLink(
93 virtual ~AbstractParameter();
102 std::string getName()
const;
106 virtual std::string guessType()
const = 0;
130 virtual std::string getDefaultString() = 0;
139 virtual void intoStream(std::ostream & os)
const = 0;
152 template <
typename T>
187 virtual operator T()
const;
191 void setDefault(
const T& value);
207 virtual void intoStream(std::ostream & os)
const;
212 template <
typename T>
235 void setDefault(
const std::string& value);
242 virtual std::vector<T>& operator=(
const std::vector<T>& B);
252 operator std::vector<T>()
const;
255 std::vector<T>& operator()();
258 const std::vector<T>& operator()()
const;
266 virtual std::size_t
size()
const;
267 virtual const T&
operator[](std::size_t pos)
const;
276 virtual void intoStream(std::ostream & os)
const;
279 #endif // _Parameter_H
virtual std::string getDefaultString()=0
Get default value.
ParameteredObject * _parent
Parent ParameteredObject.
virtual std::string guessType() const =0
Try to guess type.
This class serves to store parameters used within the Charon Project.
#define charon_core_PUBLIC
Preprocessor macro to define this class/function as public visible, i.e.
Parameter object handling.
Common interface for read-write access to multiple data members like arrays etc.
Base class for serializable objects.
virtual std::size_t size() const =0
Access to number of members.
#define charon_core_LOCAL
Preprocessor macro to define this class/function as hidden, i.e.
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.
virtual T & operator=(const T &B)=0
data assignment operator
T _defaultValue
default value
Interface for data assignment and readout.
Implementation of the AbstractParameter interface for one single parameter.
virtual T & operator[](std::size_t pos)=0
Access to specific member (read-write).
virtual void save(ParameterFile &pf) const =0
Save to ParameterFile.
Implementation of the AbstractParameter interface for a list of parameters.
#define charon_core_DLL_PUBLIC
Preprocessor macro to define this class/function as public visible, i.e.
std::ostream charon_core_DLL_PUBLIC & operator<<(std::ostream &os, const AbstractParameter ¶m)
Parameter stream output operator.
Dynamic library API import/export prprocessor macros.
std::vector< T > _value
Internal value (list).
virtual T & operator()()=0
Call operator.
virtual void load(const ParameterFile &pf)=0
Load from ParameterFile.
std::string _defaultValue
Default value, string representation, separated by ";".
Declaration and implementation of the abstract class AbstractData.