ComPWA
Common Partial-Wave-Analysis Framework
ComPWA::FunctionTree::Value< T > Class Template Reference

#include <Value.hpp>

Public Member Functions

 Value (std::string name="")
 
 Value (T val)
 
 Value (std::string name, T val)
 
virtual T value () const
 
virtual T & values ()
 Reference on the value. More...
 
virtual void setValue (T inVal)
 
 operator T () const
 Conversion operator for internal type. More...
 
const T & operator() () const
 
T & operator() ()
 
virtual std::string to_str () const
 A public function returning a string with parameter information. More...
 
virtual std::string val_to_str () const
 A public function returning a string with parameter value. More...
 
- Public Member Functions inherited from ComPWA::FunctionTree::Parameter
 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 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...
 

Protected Member Functions

virtual std::string className () const
 Getter for typename of object, to be defined by the actual implementation. More...
 

Protected Attributes

Val
 
- Protected Attributes inherited from ComPWA::FunctionTree::Parameter
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...
 

Detailed Description

template<class T>
class ComPWA::FunctionTree::Value< T >

Definition at line 33 of file Value.hpp.

+ Inheritance diagram for ComPWA::FunctionTree::Value< T >:
+ Collaboration diagram for ComPWA::FunctionTree::Value< T >:

Constructor & Destructor Documentation

◆ Value() [1/3]

template<class T >
ComPWA::FunctionTree::Value< T >::Value ( std::string  name = "")
inline

Definition at line 35 of file Value.hpp.

◆ Value() [2/3]

template<class T >
ComPWA::FunctionTree::Value< T >::Value ( val)
inline

Definition at line 39 of file Value.hpp.

◆ Value() [3/3]

template<class T >
ComPWA::FunctionTree::Value< T >::Value ( std::string  name,
val 
)
inline

Definition at line 41 of file Value.hpp.

Member Function Documentation

◆ className()

template<class T >
virtual std::string ComPWA::FunctionTree::Value< T >::className ( ) const
inlineprotectedvirtual

Getter for typename of object, to be defined by the actual implementation.

Implements ComPWA::FunctionTree::Parameter.

Definition at line 76 of file Value.hpp.

◆ operator T()

template<class T >
ComPWA::FunctionTree::Value< T >::operator T ( ) const
inline

Conversion operator for internal type.

Definition at line 57 of file Value.hpp.

◆ operator()() [1/2]

template<class T >
const T& ComPWA::FunctionTree::Value< T >::operator() ( ) const
inline

Definition at line 59 of file Value.hpp.

◆ operator()() [2/2]

template<class T >
T& ComPWA::FunctionTree::Value< T >::operator() ( )
inline

Definition at line 61 of file Value.hpp.

◆ setValue()

template<class T >
virtual void ComPWA::FunctionTree::Value< T >::setValue ( inVal)
inlinevirtual

Definition at line 51 of file Value.hpp.

◆ to_str()

template<class T >
virtual std::string ComPWA::FunctionTree::Value< T >::to_str ( ) const
inlinevirtual

A public function returning a string with parameter information.

Implements ComPWA::FunctionTree::Parameter.

Definition at line 64 of file Value.hpp.

◆ val_to_str()

template<class T >
virtual std::string ComPWA::FunctionTree::Value< T >::val_to_str ( ) const
inlinevirtual

A public function returning a string with parameter value.

Implements ComPWA::FunctionTree::Parameter.

Definition at line 69 of file Value.hpp.

◆ value()

template<class T >
virtual T ComPWA::FunctionTree::Value< T >::value ( ) const
inlinevirtual

Definition at line 45 of file Value.hpp.

◆ values()

template<class T >
virtual T& ComPWA::FunctionTree::Value< T >::values ( )
inlinevirtual

Reference on the value.

In case of T = std::vector<T2> a reference to the vector is returned.

Definition at line 49 of file Value.hpp.

Member Data Documentation

◆ Val

template<class T >
T ComPWA::FunctionTree::Value< T >::Val
protected

Definition at line 80 of file Value.hpp.


The documentation for this class was generated from the following file: