DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Handle class describing a constant (define) object in description. More...
#include <Objects.h>
Public Member Functions | |
Constant ()=default | |
Default constructor. More... | |
Constant (const Constant ©)=default | |
Constructor to be used for assignment from a handle. More... | |
template<typename Q > | |
Constant (const Handle< Q > &e) | |
Constructor to be used when reading the already parsed DOM tree. More... | |
Constant (const std::string &name) | |
Constructor to be used when creating a new DOM tree. More... | |
Constant (const std::string &name, const std::string &val, const std::string &typ="number") | |
Constructor to be used when creating a new DOM tree. More... | |
Constant & | operator= (const Constant ©)=default |
Copy assignment. More... | |
bool | operator== (const Constant &rhs) const |
Equality operator. More... | |
std::string | dataType () const |
Access the constant. More... | |
std::string | toString () const |
String representation of this object. More... | |
Public Member Functions inherited from dd4hep::Handle< ConstantObject > | |
Handle ()=default | |
Default constructor. More... | |
Handle (Handle< ConstantObject > &&element)=default | |
Copy constructor. More... | |
Handle (const Handle< ConstantObject > &element)=default | |
Copy constructor. More... | |
Handle (ConstantObject *element) | |
Initializing constructor from pointer. More... | |
Handle (Q *element) | |
Initializing constructor from unrelated pointer with type checking. More... | |
Handle (const Handle< Q > &element) | |
Initializing constructor from unrelated handle with type checking. More... | |
Handle< ConstantObject > & | operator= (Handle< ConstantObject > &&element)=default |
Assignment move operator. More... | |
Handle< ConstantObject > & | operator= (const Handle< ConstantObject > &element)=default |
Assignment copy operator. More... | |
bool | operator== (const Handle< ConstantObject > &element) const |
Boolean operator == used for RB tree insertions. More... | |
bool | operator< (const Handle< ConstantObject > &element) const |
Boolean operator < used for RB tree insertions. More... | |
bool | operator> (const Handle< ConstantObject > &element) const |
Boolean operator > used for RB tree insertions. More... | |
bool | isValid () const |
Check the validity of the object held by the handle. More... | |
bool | operator! () const |
Check the validity of the object held by the handle. More... | |
Handle< ConstantObject > & | clear () |
Release the object held by the handle. More... | |
ConstantObject * | operator-> () const |
Access the held object using the -> operator. More... | |
operator ConstantObject & () const | |
Automatic type conversion to an object references. More... | |
ConstantObject & | operator* () const |
Access the held object using the * operator. More... | |
ConstantObject * | ptr () const |
Access to the held object. More... | |
Q * | _ptr () const |
Access to an unrelated object type. More... | |
Q * | data () const |
Access to an unrelated object type. More... | |
Q & | object () const |
Access to an unrelated object type. More... | |
ConstantObject * | access () const |
Checked object access. Throws invalid handle runtime exception if invalid handle. More... | |
const char * | name () const |
Access the object name (or "" if not supported by the object) More... | |
const char * | name () const |
const char * | name () const |
void | assign (Object *n, const std::string &nam, const std::string &title) |
Assign a new named object. Note: object references must be managed by the user. More... | |
void | assign (_Segmentation *s, const std::string &n, const std::string &) |
void | assign (NamedObject *p, const std::string &n, const std::string &t) |
void | destroy () |
Destroy the underlying object (be careful here: things are not reference counted)! More... | |
Additional Inherited Members | |
Public Types inherited from dd4hep::Handle< ConstantObject > | |
typedef ConstantObject | Object |
Extern accessible definition of the contained element type. More... | |
typedef Handle< ConstantObject > | Base |
Self type: used by sub-classes. More... | |
Static Public Member Functions inherited from dd4hep::Handle< ConstantObject > | |
static void | bad_assignment (const std::type_info &from, const std::type_info &to) |
Helper routine called when unrelated types are assigned. More... | |
Public Attributes inherited from dd4hep::Handle< ConstantObject > | |
ConstantObject * | m_element |
Single and only data member: Reference to the actual element. More... | |
Handle class describing a constant (define) object in description.
Constant objects are parsed by the expression evaluator and are subsequently available for expression evaluation.
|
default |
Default constructor.
|
default |
Constructor to be used for assignment from a handle.
|
inline |
Constant::Constant | ( | const std::string & | name | ) |
Constructor to be used when creating a new DOM tree.
Definition at line 143 of file Objects.cpp.
Constant::Constant | ( | const std::string & | name, |
const std::string & | val, | ||
const std::string & | typ = "number" |
||
) |
Constructor to be used when creating a new DOM tree.
Definition at line 138 of file Objects.cpp.
std::string Constant::dataType | ( | ) | const |
Access the constant.
Definition at line 148 of file Objects.cpp.
|
inline |
std::string Constant::toString | ( | ) | const |
String representation of this object.
Definition at line 156 of file Objects.cpp.