DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members

The property class to assign options to actions. More...

#include <ComponentProperties.h>

Inheritance diagram for DD4hep::Property:
DD4hep::PropertyValue< TYPE >

Public Member Functions

 Property ()=default
 Default constructor. More...
 
 Property (const Property &p)=default
 Copy constructor. More...
 
template<typename TYPE >
 Property (TYPE &val)
 User constructor. More...
 
void * ptr () const
 Access void data pointer. More...
 
std::string type () const
 Property type name. More...
 
const PropertyGrammargrammar () const
 Access grammar object. More...
 
std::string str () const
 Conversion to string value. More...
 
Propertystr (const std::string &input)
 Conversion from string value. More...
 
Propertyoperator= (const Property &p)=default
 Assignment operator. More...
 
Propertyoperator= (const char *val)
 Assignment operator / set new balue. More...
 
template<typename TYPE >
Propertyoperator= (const TYPE &val)
 Assignment operator / set new balue. More...
 
template<typename TYPE >
TYPE value () const
 Retrieve value. More...
 
template<typename TYPE >
void value (TYPE &value) const
 Retrieve value from stack (large values e.g. vectors etc.) More...
 
template<typename TYPE >
void set (const TYPE &value)
 Set value of this property. More...
 

Static Public Member Functions

static std::string type (const Property &proptery)
 Property type name. More...
 
static std::string type (const std::type_info &proptery)
 Property type name. More...
 

Protected Member Functions

template<typename TYPE >
void make (TYPE &value)
 Setup property. More...
 

Protected Attributes

void * m_par = 0
 Pointer to the data location. More...
 
const PropertyGrammarm_hdl = 0
 Reference to the grammar of this property (extended type description) More...
 

Detailed Description

The property class to assign options to actions.

Standard implementation of a property mechanism. The data conversion mechanism between various properties uses internally boost::spirit to allow also conversions between types, which are initially unrelated such as e.g. vector<int> and list<short>.

Author
M.Frank
Version
1.0

Definition at line 86 of file ComponentProperties.h.

Constructor & Destructor Documentation

DD4hep::Property::Property ( )
default

Default constructor.

DD4hep::Property::Property ( const Property p)
default

Copy constructor.

template<typename TYPE >
DD4hep::Property::Property ( TYPE &  val)
inline

User constructor.

Definition at line 101 of file ComponentProperties.h.

References make().

Member Function Documentation

const PropertyGrammar & Property::grammar ( ) const

Access grammar object.

Definition at line 76 of file ComponentProperties.cpp.

References m_hdl.

Referenced by DD4hep::PropertyValue< TYPE >::grammar(), set(), DD4hep::PropertyManager::set(), type(), and value().

template<typename TYPE >
void DD4hep::Property::make ( TYPE &  value)
protected

Setup property.

Definition at line 32 of file ComponentProperties_inl.h.

References dd4hep::g, m_hdl, and m_par.

Referenced by Property().

Property& DD4hep::Property::operator= ( const Property p)
default

Assignment operator.

Property & Property::operator= ( const char *  val)

Assignment operator / set new balue.

Assignment operator / set new balue

Definition at line 106 of file ComponentProperties.cpp.

template<typename TYPE >
Property & DD4hep::Property::operator= ( const TYPE &  val)

Assignment operator / set new balue.

Assignment operator / set new balue

Definition at line 48 of file ComponentProperties_inl.h.

References set().

void* DD4hep::Property::ptr ( ) const
inline

Access void data pointer.

Definition at line 109 of file ComponentProperties.h.

References m_par.

Referenced by DD4hep::PropertyManager::set().

template<typename TYPE >
void DD4hep::Property::set ( const TYPE &  value)
string Property::str ( ) const
Property & Property::str ( const std::string &  input)

Conversion from string value.

Definition at line 91 of file ComponentProperties.cpp.

References DD4hep::PropertyGrammar::fromString(), m_hdl, and m_par.

string Property::type ( const Property proptery)
static

Property type name.

Definition at line 62 of file ComponentProperties.cpp.

References grammar(), DD4hep::PropertyGrammar::type(), and type().

static std::string DD4hep::Property::type ( const std::type_info &  proptery)
static

Property type name.

string Property::type ( ) const

Property type name.

Definition at line 72 of file ComponentProperties.cpp.

References grammar().

Referenced by type().

template<typename TYPE >
TYPE DD4hep::Property::value ( ) const
template<typename TYPE >
void DD4hep::Property::value ( TYPE &  value) const

Retrieve value from stack (large values e.g. vectors etc.)

Definition at line 54 of file ComponentProperties_inl.h.

References dd4hep::g, grammar(), DD4hep::PropertyGrammar::invalidConversion(), m_par, str(), and DD4hep::PropertyGrammar::type().

Member Data Documentation

const PropertyGrammar* DD4hep::Property::m_hdl = 0
protected

Reference to the grammar of this property (extended type description)

Definition at line 91 of file ComponentProperties.h.

Referenced by grammar(), make(), and str().

void* DD4hep::Property::m_par = 0
protected

Pointer to the data location.

Definition at line 89 of file ComponentProperties.h.

Referenced by make(), ptr(), set(), str(), and value().


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