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
Namespaces | Macros
Handle.inl File Reference
#include "DD4hep/Handle.h"

Go to the source code of this file.

Namespaces

 DD4hep
 Namespace for the AIDA detector description toolkit.
 

Macros

#define DD4HEP_INSTANTIATE_HANDLE(X)
 
#define DD4HEP_INSTANTIATE_HANDLE_NAMED(X)
 
#define DD4HEP_INSTANTIATE_HANDLE_UNNAMED(X)
 

Macro Definition Documentation

#define DD4HEP_INSTANTIATE_HANDLE (   X)
Value:
namespace DD4hep { \
template <> void Handle<X>::verifyObject() const { \
if (m_element && dynamic_cast<X*>(m_element) == 0) { \
bad_assignment(typeid(*m_element), typeid(X)); \
} \
}} \
template class DD4hep::Handle<X>
void verifyObject() const
Verify the object type after a (re-)assignment.
void increment_object_validations()
Definition: Handle.cpp:243
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:87

Definition at line 62 of file Handle.inl.

#define DD4HEP_INSTANTIATE_HANDLE_NAMED (   X)
Value:
namespace DD4hep { \
template <> const char* Handle<X>::name() const \
{ return this->m_element ? this->m_element->name.c_str() : ""; } \
template <> void \
Handle<X>::assign(X* p, const std::string& n, const std::string& t){\
this->m_element = p; \
p->name = n; \
p->type = t; \
} \
template <> void Handle<X>::verifyObject() const { \
if (m_element && dynamic_cast<X*>((NamedObject*)m_element) == 0) {\
bad_assignment(typeid(*m_element), typeid(X)); \
} \
}} \
template class DD4hep::Handle<X>
const char * name() const
Access the object name (or "" if not supported by the object)
Definition: Handle.inl:36
void verifyObject() const
Verify the object type after a (re-)assignment.
void increment_object_validations()
Definition: Handle.cpp:243
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
Definition: Handle.h:87

Definition at line 72 of file Handle.inl.

#define DD4HEP_INSTANTIATE_HANDLE_UNNAMED (   X)
Value:
namespace DD4hep { \
template <> void \
Handle<X>::assign(X* n, const std::string&, const std::string&) \
{ this->m_element = n;} \
template <> const char* Handle<X>::name() const { return ""; } \
} \
const char * name() const
Access the object name (or "" if not supported by the object)
Definition: Handle.inl:36
#define DD4HEP_INSTANTIATE_HANDLE(X)
Definition: Handle.inl:62

Definition at line 90 of file Handle.inl.