Provide an interface for finding inheritance information at run time.
More...
#include <BaseInfo.h>
|
| static void * | cast (T *p, CLID clid) |
| | Cast to a base pointer.
|
| static void * | cast (T *p, const std::type_info &tinfo) |
| | Cast to a base pointer.
|
| static T * | castTo (void *p, CLID clid) |
| | Cast to a derived pointer.
|
| static T * | castTo (void *p, const std::type_info &tinfo) |
| | Cast to a derived pointer.
|
| static BaseInfoBase::castfn_t * | castfn (CLID clid) |
| | Return a function for casting to a base pointer.
|
| static BaseInfoBase::castfn_t * | castfn (const std::type_info &tinfo) |
| | Return a function for casting to a base pointer.
|
| static BaseInfoBase::castfn_t * | castfnTo (CLID clid) |
| | Return a function for casting to a derived pointer.
|
| static BaseInfoBase::castfn_t * | castfnTo (const std::type_info &tinfo) |
| | Return a function for casting to a derived pointer.
|
| static const std::vector< CLID > & | get_bases () |
| | Return the class IDs of all known bases of T (that have class IDs).
|
| static std::vector< const std::type_info * > | get_ti_bases () |
| | Return the type_info's of all known bases of T.
|
| static bool | is_base (CLID clid) |
| | Return true if clid is the ID of a class that is known to be a base of T.
|
| static bool | is_base (const std::type_info &tinfo) |
| | Return true if tinfo is the std::type_info of a class that is known to be a base of T.
|
| static bool | is_virtual (CLID clid) |
| | Return true if clid is the ID of a class that is known to be a virtual base of T.
|
| static bool | is_virtual (const std::type_info &tinfo) |
| | Return true if tinfo is the std::type_info of a class that is known to be a virtual base of T.
|
| static const BaseInfoBase & | baseinfo () |
| | Return the non-templated BaseInfoBase object for this type.
|
| static void | maybeInit () |
|
| static BaseInfoImpl< T > & | instance () |
| | Return a reference to the (singleton) implementation object for this class.
|
template<class T>
class SG::BaseInfo< T >
Provide an interface for finding inheritance information at run time.
See the file comments for full details.
Definition at line 750 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.
◆ baseinfo()
◆ cast() [1/2]
Cast to a base pointer.
- Parameters
-
| p | The pointer to cast. |
| clid | ID of the class to which to cast. |
- Returns
- The pointer cast to the requested type, returned as a void*. clid must be known to be a base of T; otherwise, 0 will be returned.
◆ cast() [2/2]
template<class T>
| void * SG::BaseInfo< T >::cast |
( |
T * | p, |
|
|
const std::type_info & | tinfo ) |
|
static |
Cast to a base pointer.
- Parameters
-
| p | The pointer to cast. |
| clid | type_info of the class to which to cast. |
- Returns
- The pointer cast to the requested type, returned as a void*. tinfo must be known to be a base of T; otherwise, 0 will be returned.
◆ castfn() [1/2]
Return a function for casting to a base pointer.
- Parameters
-
| clid | ID of the class to which to cast. |
- Returns
- A function to convert a pointer to a
T to a pointer to the type identified by clid. clid must be known to be a base of T; otherwise, 0 will be returned.
◆ castfn() [2/2]
Return a function for casting to a base pointer.
- Parameters
-
| clid | type_info of the class to which to cast. |
- Returns
- A function to convert a pointer to a
T to a pointer to the type identified by tinfo. tinfo must be known to be a base of T; otherwise, 0 will be returned.
◆ castfnTo() [1/2]
Return a function for casting to a derived pointer.
- Parameters
-
| clid | ID of the class B from which to cast. |
- Returns
- A function to convert a pointer to a
T to a pointer to a T. clid must be known to be a base of T; otherwise, 0 will be returned. 0 will also be returned if the dynamic_cast fails.
◆ castfnTo() [2/2]
Return a function for casting to a derived pointer.
- Parameters
-
| clid | type_info of the class B from which to cast. |
- Returns
- A function to convert a pointer to a
B to a pointer to a T. tinfo must be known to be a base of T; otherwise, 0 will be returned. 0 will also be returned if the dynamic_cast fails.
◆ castTo() [1/2]
Cast to a derived pointer.
- Parameters
-
| p | The pointer to cast. |
| clid | ID of the class B from which to cast. |
- Returns
- The pointer cast to a T*. B must be known to be a base of T; otherwise, 0 will be returned. 0 will also be returned if the dynamic_cast fails.
◆ castTo() [2/2]
template<class T>
| T * SG::BaseInfo< T >::castTo |
( |
void * | p, |
|
|
const std::type_info & | tinfo ) |
|
static |
Cast to a derived pointer.
- Parameters
-
| p | The pointer to cast. |
| clid | type_info of the class B from which to cast. |
- Returns
- The pointer cast to a T*. B must be known to be a base of T; otherwise, 0 will be returned. 0 will also be returned if the dynamic_cast fails.
◆ get_bases()
Return the class IDs of all known bases of T (that have class IDs).
The list will include T itself.
◆ get_ti_bases()
template<class T>
| std::vector< const std::type_info * > SG::BaseInfo< T >::get_ti_bases |
( |
| ) |
|
|
static |
Return the type_info's of all known bases of T.
The list will include T itself.
◆ instance()
Return a reference to the (singleton) implementation object for this class.
◆ is_base() [1/2]
Return true if clid is the ID of a class that is known to be a base of T.
T is considered to be its own base for this purpose.
- Parameters
-
| clid | The ID of the class to test. |
◆ is_base() [2/2]
template<class T>
| bool SG::BaseInfo< T >::is_base |
( |
const std::type_info & | tinfo | ) |
|
|
static |
Return true if tinfo is the std::type_info of a class that is known to be a base of T.
T is considered to be its own base for this purpose.
- Parameters
-
| tinfo | The std::type_info of the class to test. |
◆ is_virtual() [1/2]
Return true if clid is the ID of a class that is known to be a virtual base of T.
(This will always be false for T itself.)
- Parameters
-
| clid | The ID of the class to test. |
◆ is_virtual() [2/2]
template<class T>
| bool SG::BaseInfo< T >::is_virtual |
( |
const std::type_info & | tinfo | ) |
|
|
static |
Return true if tinfo is the std::type_info of a class that is known to be a virtual base of T.
(This will always be false for T itself.)
- Parameters
-
| tinfo | The std::type_info of the class to test. |
◆ maybeInit()
◆ RegisterAddBaseInit
template<class T>
template<class D, class B>
◆ RegisterAddCopyConversionInit
template<class T>
template<class D, class B>
◆ ATLAS_THREAD_SAFE
The documentation for this class was generated from the following file: