ComPWA
Common Partial-Wave-Analysis Framework
|
Base class for internal parameter. More...
#include <Parameter.hpp>
Public Member Functions | |
Parameter (std::string name, ParType type=ParType::UNDEFINED) | |
Constructor with name of parameter and optional type. More... | |
virtual | ~Parameter ()=default |
virtual std::string | name () const |
Getter for name of object. More... | |
virtual void | setName (std::string n) |
Getter for name of object. More... | |
virtual ParType | type () const |
Getter for type of object. More... | |
virtual std::string | className () const =0 |
Getter for typename of object, to be defined by the actual implementation. More... | |
virtual bool | isParameter () const |
void | attach (std::weak_ptr< ParObserver > newObserver) |
Attaches a new TreeNode as Observer. More... | |
void | detachExpired () |
Removes TreeNodes not needed as Observer anymore. More... | |
void | notify () |
Notify all observing TreeNodes that parameter changed. More... | |
virtual std::string | to_str () const =0 |
A public function returning a string with parameter information. More... | |
virtual std::string | val_to_str () const =0 |
A public function returning a string with parameter value. More... | |
Protected Attributes | |
std::string | Name |
Name of parameter. More... | |
ParType | Type |
Type of parameter (e.g. Double, Integer, ...) More... | |
std::vector< std::weak_ptr< ParObserver > > | ObservingNodes |
List of observers, e.g. TreeNodes. More... | |
Private Member Functions | |
template<class archive > | |
void | serialize (archive &ar, const unsigned int version) |
Friends | |
std::ostream & | operator<< (std::ostream &out, std::shared_ptr< Parameter > b) |
std::ostream & | operator<< (std::ostream &out, Parameter &b) |
Base class for internal parameter.
This class defines the internal container of a parameter. For the use in the function tree, the observer pattern is used and this class takes over the role of the Subject. Therefore the actual implementations of Parameter are the ConcreteSubjects of the observer pattern and the TreeNodes take the role of the observers.
Definition at line 79 of file Parameter.hpp.
|
inline |
Constructor with name of parameter and optional type.
Definition at line 82 of file Parameter.hpp.
|
virtualdefault |
|
inline |
Attaches a new TreeNode as Observer.
Definition at line 104 of file Parameter.hpp.
|
pure virtual |
Getter for typename of object, to be defined by the actual implementation.
Implemented in ComPWA::FunctionTree::FitParameter, and ComPWA::FunctionTree::Value< T >.
|
inline |
Removes TreeNodes not needed as Observer anymore.
Definition at line 109 of file Parameter.hpp.
|
inlinevirtual |
Reimplemented in ComPWA::FunctionTree::FitParameter.
Definition at line 99 of file Parameter.hpp.
|
inlinevirtual |
Getter for name of object.
Definition at line 88 of file Parameter.hpp.
|
inline |
Notify all observing TreeNodes that parameter changed.
Definition at line 117 of file Parameter.hpp.
|
inlineprivate |
Definition at line 156 of file Parameter.hpp.
|
inlinevirtual |
Getter for name of object.
Definition at line 91 of file Parameter.hpp.
|
pure virtual |
A public function returning a string with parameter information.
Implemented in ComPWA::FunctionTree::FitParameter, and ComPWA::FunctionTree::Value< T >.
|
inlinevirtual |
Getter for type of object.
Definition at line 94 of file Parameter.hpp.
|
pure virtual |
A public function returning a string with parameter value.
Implemented in ComPWA::FunctionTree::FitParameter, and ComPWA::FunctionTree::Value< T >.
|
friend |
Definition at line 123 of file Parameter.hpp.
|
friend |
Definition at line 128 of file Parameter.hpp.
|
protected |
Name of parameter.
Definition at line 145 of file Parameter.hpp.
|
protected |
List of observers, e.g. TreeNodes.
Definition at line 151 of file Parameter.hpp.
|
protected |
Type of parameter (e.g. Double, Integer, ...)
Definition at line 148 of file Parameter.hpp.