|
| Handle ()=default |
| Default constructor. More...
|
|
| Handle (Handle< T > &&element)=default |
| Copy constructor. More...
|
|
| Handle (const Handle< T > &element)=default |
| Copy constructor. More...
|
|
| Handle (T *element) |
| Initializing constructor from pointer. More...
|
|
template<typename Q > |
| Handle (Q *element) |
| Initializing constructor from unrelated pointer with type checking. More...
|
|
template<typename Q > |
| Handle (const Handle< Q > &element) |
| Initializing constructor from unrelated handle with type checking. More...
|
|
Handle< T > & | operator= (Handle< T > &&element)=default |
| Assignment move operator. More...
|
|
Handle< T > & | operator= (const Handle< T > &element)=default |
| Assignment copy operator. More...
|
|
bool | operator== (const Handle< T > &element) const |
| Boolean operator == used for RB tree insertions. More...
|
|
bool | operator< (const Handle< T > &element) const |
| Boolean operator < used for RB tree insertions. More...
|
|
bool | operator> (const Handle< T > &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< T > & | clear () |
| Release the object held by the handle. More...
|
|
T * | operator-> () const |
| Access the held object using the -> operator. More...
|
|
| operator T& () const |
| Automatic type conversion to an object references. More...
|
|
T & | operator* () const |
| Access the held object using the * operator. More...
|
|
T * | ptr () const |
| Access to the held object. More...
|
|
template<typename Q > |
Q * | _ptr () const |
| Access to an unrelated object type. More...
|
|
template<typename Q > |
Q * | data () const |
| Access to an unrelated object type. More...
|
|
template<typename Q > |
Q & | object () const |
| Access to an unrelated object type. More...
|
|
T * | 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...
|
|
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 | destroy () |
| Destroy the underlying object (be careful here: things are not reference counted)! More...
|
|
void | assign (_Segmentation *s, const std::string &n, const std::string &) |
|
const char * | name () const |
|
const char * | name () const |
|
void | assign (NamedObject *p, const std::string &n, const std::string &t) |
|
template<typename T>
class dd4hep::Handle< T >
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects.
The Handle is the base class to access all objects in dd4hep. Objects, which consist ONLY of data, which are NEVER passed directly. They are ALWAYS passed using handles. Such handles are 'handy' ;-). Assignment is to and from different handles is possible using concrete type checking.
Real benefits can result from sophisticated handle subclasses, which can implement any desired user functionality with out compromising the object's data content. This leads to very flexible implementations, where the same data may be shared by many handle implementations providing different functionality to the clients.
In this sense, is the consequent use of handles to access data nothing else then the consequent application of component oriented programming using local objects from the heap.
Note: If you cannot live with this approach, it is better you get hands of this software package, because you will try to consequently fight the framework, which will frustrate you (and also me).
- Author
- M.Frank
- Version
- 1.0
Definition at line 84 of file Handle.h.