![]() |
ATLAS Offline Software
|
The non-template portion of the BaseInfo implementation. More...
#include <BaseInfo.h>
Public Types | |
| using | destroy_fn = void (void*) |
| typedef void * | castfn_t(void *p) |
| Type of a pointer conversion function. | |
| typedef void | init_func_t(BaseInfoBase *bib) |
| Type for an initialization function. | |
Public Member Functions | |
| CLID | clid () const |
| Return the CLID for this class. | |
| const std::type_info & | typeinfo () const |
Return the std::type_info for this class. | |
| void * | cast (void *p, CLID clid) const |
| Cast to a base pointer. | |
| void * | cast (void *p, const std::type_info &tinfo) const |
| Cast to a base pointer. | |
| void * | castTo (void *p, CLID clid) const |
| Cast to a derived pointer. | |
| void * | castTo (void *p, const std::type_info &tinfo) const |
| Cast to a derived pointer. | |
| castfn_t * | castfn (CLID clid) const |
| Return a function for casting to a base pointer. | |
| castfn_t * | castfn (const std::type_info &tinfo) const |
| Return a function for casting to a base pointer. | |
| castfn_t * | castfnTo (CLID clid) const |
| Return a function for casting to a derived pointer. | |
| castfn_t * | castfnTo (const std::type_info &tinfo) const |
| Return a function for casting to a derived pointer. | |
| const std::vector< CLID > & | get_bases () const |
| Return the class IDs of all known bases of T (that have class IDs). | |
| std::vector< const std::type_info * > | get_ti_bases () const |
Return the type_info's of all known bases of T. | |
| bool | is_base (CLID clid) const |
| Return true if clid is the ID of a class that is known to be a base of T. | |
| bool | is_base (const std::type_info &tinfo) const |
| Return true if tinfo is the type_info of a class that is known to be a base of T. | |
| bool | is_virtual (CLID clid) const |
| Return true if clid is the ID of a class that is known to be a virtual base of T. | |
| bool | is_virtual (const std::type_info &tinfo) const |
| Return true if tinfo is the std::type_info of a class that is known to be a virtual base of T. | |
| const CopyConversionBase * | copy_conversion (const std::type_info &tinfo) const |
Search for a copy conversion to tinfo. | |
| const CopyConversionBase * | copy_conversion (CLID clid) const |
Search for a copy conversion to clid. | |
| void | destroy (void *p) const |
| Delete an instance of the described type. | |
| void | add_copy_conversion (const std::type_info &tinfo, const CopyConversionBase *cnv) |
| Add a new copy conversion. | |
| std::vector< CLID > | get_copy_conversions () const |
| Return known copy conversions. | |
| void | add_info (const std::type_info &tinfo, castfn_t *converter, castfn_t *converterTo, bool is_virtual) |
| Add information about one base class. | |
| void | maybeInit () |
| Run initializations for this class, if needed. | |
Static Public Member Functions | |
| static const BaseInfoBase * | find (CLID clid) |
Find the BaseInfoBase instance for clid. | |
| static const BaseInfoBase * | find (const std::type_info &tinfo) |
Find the BaseInfoBase instance for tinfo. | |
| static void | addInit (const std::type_info *tinfo, init_func_t *init_func) |
| Register an initialization function. | |
Protected Member Functions | |
| BaseInfoBase (const std::type_info &tinfo, destroy_fn *destroy) | |
| Constructor. | |
| ~BaseInfoBase () | |
| Destructor. | |
Private Member Functions | |
| BaseInfoBase (const BaseInfoBase &) | |
| BaseInfoBase & | operator= (const BaseInfoBase &) |
Static Private Member Functions | |
| static BaseInfoBase * | find1 (const std::type_info &tinfo) |
Helper for find. | |
Private Attributes | |
| BaseInfoBaseImpl * | m_impl |
| Pointer to internal state. | |
Friends | |
| template<class D, class B> | |
| struct | RegisterAddBaseInit |
| template<class D, class B> | |
| struct | RegisterAddCopyConversionInit |
The non-template portion of the BaseInfo implementation.
Definition at line 457 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.
| typedef void * SG::BaseInfoBase::castfn_t(void *p) |
Type of a pointer conversion function.
Definition at line 526 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.
| using SG::BaseInfoBase::destroy_fn = void (void*) |
Definition at line 466 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.
| typedef void SG::BaseInfoBase::init_func_t(BaseInfoBase *bib) |
Type for an initialization function.
Definition at line 701 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.
|
protected |
Constructor.
| tinfo | The std::type_info for this class. |
| destroy | Destruction function for this class. |
| tinfo | The std::type_info for this class. |
Definition at line 543 of file BaseInfo.cxx.
|
protected |
Destructor.
Definition at line 567 of file BaseInfo.cxx.
|
private |
| void SG::BaseInfoBase::add_copy_conversion | ( | const std::type_info & | tinfo, |
| const CopyConversionBase * | cnv ) |
Add a new copy conversion.
| tinfo | The std::type_info of the target class. |
| cnv | A CopyConversionBase instance describing the conversion. |
The BaseInfoBase takes ownership of the cnv object.
Definition at line 454 of file BaseInfo.cxx.
| void SG::BaseInfoBase::add_info | ( | const std::type_info & | tinfo, |
| castfn_t * | converter, | ||
| castfn_t * | converterTo, | ||
| bool | is_virtual ) |
Add information about one base class.
| tinfo | The std::type_info of the base. |
| converter | Converter function. This should be able to convert a T* to a pointer to this base. |
| converterTo | Converter function. This should be able to convert a pointer to this base to a T*. |
| is_virtual | True if the derivation from this base to T is via virtual derivation. |
Definition at line 493 of file BaseInfo.cxx.
|
static |
Register an initialization function.
| tinfo | The std::type_info for the class being registered. |
| init_func | Function to initialize BaseInfo for the class. |
Definition at line 689 of file BaseInfo.cxx.
| void * SG::BaseInfoBase::cast | ( | void * | p, |
| CLID | clid ) const |
Cast to a base pointer.
| p | The pointer to cast (a T* cast to a void*). |
| clid | ID of the class to which to cast. |
Definition at line 168 of file BaseInfo.cxx.
| void * SG::BaseInfoBase::cast | ( | void * | p, |
| const std::type_info & | tinfo ) const |
Cast to a base pointer.
| p | The pointer to cast (a T* cast to a void*). |
| clid | type_info of the class to which to cast. |
Definition at line 185 of file BaseInfo.cxx.
| BaseInfoBase::castfn_t * SG::BaseInfoBase::castfn | ( | CLID | clid | ) | const |
Return a function for casting to a base pointer.
| clid | ID of the class to which to cast. |
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. Definition at line 238 of file BaseInfo.cxx.
| BaseInfoBase::castfn_t * SG::BaseInfoBase::castfn | ( | const std::type_info & | tinfo | ) | const |
Return a function for casting to a base pointer.
| clid | type_info of the class to which to cast. |
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. Definition at line 256 of file BaseInfo.cxx.
| BaseInfoBase::castfn_t * SG::BaseInfoBase::castfnTo | ( | CLID | clid | ) | const |
Return a function for casting to a derived pointer.
| clid | ID of the class B from which to cast. |
Definition at line 274 of file BaseInfo.cxx.
| BaseInfoBase::castfn_t * SG::BaseInfoBase::castfnTo | ( | const std::type_info & | tinfo | ) | const |
Return a function for casting to a derived pointer.
| clid | type_info of the class B from which to cast. |
Definition at line 292 of file BaseInfo.cxx.
| void * SG::BaseInfoBase::castTo | ( | void * | p, |
| CLID | clid ) const |
Cast to a derived pointer.
| p | The pointer to cast (a B* cast to a void*). |
| clid | ID of the class B from which to cast. |
Definition at line 203 of file BaseInfo.cxx.
| void * SG::BaseInfoBase::castTo | ( | void * | p, |
| const std::type_info & | tinfo ) const |
Cast to a derived pointer.
| p | The pointer to cast (a B* cast to a void*). |
| clid | type_info of the class B from which to cast. |
Definition at line 221 of file BaseInfo.cxx.
| CLID SG::BaseInfoBase::clid | ( | ) | const |
Return the CLID for this class.
Definition at line 143 of file BaseInfo.cxx.
| const CopyConversionBase * SG::BaseInfoBase::copy_conversion | ( | CLID | clid | ) | const |
Search for a copy conversion to clid.
| clid | The class to which we want to convert. |
Returns the conversion instance or 0.
Definition at line 425 of file BaseInfo.cxx.
| const CopyConversionBase * SG::BaseInfoBase::copy_conversion | ( | const std::type_info & | tinfo | ) | const |
Search for a copy conversion to tinfo.
| tinfo | The class to which we want to convert. |
Returns the conversion instance or 0.
Definition at line 407 of file BaseInfo.cxx.
| void SG::BaseInfoBase::destroy | ( | void * | p | ) | const |
Delete an instance of the described type.
| p | Pointer to the instance to delete (a T* cast to a void*). |
Definition at line 438 of file BaseInfo.cxx.
|
static |
Find the BaseInfoBase instance for clid.
| clid | The class ID of the class for which we want information. |
Returns 0 if no BaseInfoBase instance is available.
Definition at line 586 of file BaseInfo.cxx.
|
static |
Find the BaseInfoBase instance for tinfo.
| tinfo | The std::type_info of the class for which we want information. |
Returns 0 if no BaseInfoBase instance is available.
Definition at line 649 of file BaseInfo.cxx.
|
staticprivate |
Helper for find.
| tinfo | The std::type_info of the class for which we want information. |
Returns 0 if no BaseInfoBase instance is available.
Definition at line 602 of file BaseInfo.cxx.
Return the class IDs of all known bases of T (that have class IDs).
The list will include T itself.
Definition at line 306 of file BaseInfo.cxx.
| std::vector< CLID > SG::BaseInfoBase::get_copy_conversions | ( | ) | const |
Return known copy conversions.
Returns the CLIDs of all target classes that have been registered with this one for copy conversion.
Definition at line 469 of file BaseInfo.cxx.
| std::vector< const std::type_info * > SG::BaseInfoBase::get_ti_bases | ( | ) | const |
Return the type_info's of all known bases of T.
The list will include T itself.
Definition at line 328 of file BaseInfo.cxx.
| bool SG::BaseInfoBase::is_base | ( | CLID | clid | ) | const |
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.
| clid | The ID of the class to test. |
Definition at line 346 of file BaseInfo.cxx.
| bool SG::BaseInfoBase::is_base | ( | const std::type_info & | tinfo | ) | const |
Return true if tinfo is the 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.
| clid | The ID of the class to test. |
Definition at line 361 of file BaseInfo.cxx.
| bool SG::BaseInfoBase::is_virtual | ( | CLID | clid | ) | const |
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.)
| clid | The ID of the class to test. |
Definition at line 375 of file BaseInfo.cxx.
| bool SG::BaseInfoBase::is_virtual | ( | const std::type_info & | tinfo | ) | const |
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.)
| tinfo | The std::type_info of the class to test. |
Definition at line 390 of file BaseInfo.cxx.
| void SG::BaseInfoBase::maybeInit | ( | ) |
Run initializations for this class, if needed.
Definition at line 714 of file BaseInfo.cxx.
|
private |
| const std::type_info & SG::BaseInfoBase::typeinfo | ( | ) | const |
Return the std::type_info for this class.
Definition at line 153 of file BaseInfo.cxx.
|
friend |
Definition at line 461 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.
|
friend |
Definition at line 463 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.
|
private |
Pointer to internal state.
Definition at line 748 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.