ATLAS Offline Software
|
The non-template portion of the BaseInfo implementation. More...
#include <BaseInfo.h>
Public Types | |
typedef void * | castfn_t(void *p) |
Type of a pointer conversion function. More... | |
typedef void | init_func_t(BaseInfoBase *bib) |
Type for an initialization function. More... | |
Public Member Functions | |
CLID | clid () const |
Return the CLID for this class. More... | |
const std::type_info & | typeinfo () const |
Return the std::type_info for this class. More... | |
void * | cast (void *p, CLID clid) const |
Cast to a base pointer. More... | |
void * | cast (void *p, const std::type_info &tinfo) const |
Cast to a base pointer. More... | |
void * | castTo (void *p, CLID clid) const |
Cast to a derived pointer. More... | |
void * | castTo (void *p, const std::type_info &tinfo) const |
Cast to a derived pointer. More... | |
castfn_t * | castfn (CLID clid) const |
Return a function for casting to a base pointer. More... | |
castfn_t * | castfn (const std::type_info &tinfo) const |
Return a function for casting to a base pointer. More... | |
castfn_t * | castfnTo (CLID clid) const |
Return a function for casting to a derived pointer. More... | |
castfn_t * | castfnTo (const std::type_info &tinfo) const |
Return a function for casting to a derived pointer. More... | |
const std::vector< CLID > & | get_bases () const |
Return the class IDs of all known bases of T (that have class IDs). More... | |
std::vector< const std::type_info * > | get_ti_bases () const |
Return the type_info's of all known bases of T. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
const CopyConversionBase * | copy_conversion (const std::type_info &tinfo) const |
Search for a copy conversion to tinfo . More... | |
const CopyConversionBase * | copy_conversion (CLID clid) const |
Search for a copy conversion to clid . More... | |
void | add_copy_conversion (const std::type_info &tinfo, const CopyConversionBase *cnv) |
Add a new copy conversion. More... | |
std::vector< CLID > | get_copy_conversions () const |
Return known copy conversions. More... | |
void | add_info (const std::type_info &tinfo, castfn_t *converter, castfn_t *converterTo, bool is_virtual) |
Add information about one base class. More... | |
void | maybeInit () |
Run initializations for this class, if needed. More... | |
Static Public Member Functions | |
static const BaseInfoBase * | find (CLID clid) |
Find the BaseInfoBase instance for clid . More... | |
static const BaseInfoBase * | find (const std::type_info &tinfo) |
Find the BaseInfoBase instance for tinfo . More... | |
static void | addInit (const std::type_info *tinfo, init_func_t *init_func) |
Register an initialization function. More... | |
Protected Member Functions | |
BaseInfoBase (const std::type_info &tinfo) | |
Constructor. More... | |
~BaseInfoBase () | |
Destructor. More... | |
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 . More... | |
Private Attributes | |
BaseInfoBaseImpl * | m_impl |
Pointer to internal state. More... | |
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 450 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.
typedef void* SG::BaseInfoBase::castfn_t(void *p) |
Type of a pointer conversion function.
Definition at line 516 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.
typedef void SG::BaseInfoBase::init_func_t(BaseInfoBase *bib) |
Type for an initialization function.
Definition at line 688 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.
|
protected |
Constructor.
tinfo | The std::type_info for this class. |
Definition at line 528 of file BaseInfo.cxx.
|
protected |
|
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 440 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 479 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 672 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 166 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 183 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 236 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 254 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 272 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 290 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 201 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 219 of file BaseInfo.cxx.
CLID SG::BaseInfoBase::clid | ( | ) | const |
Return the CLID for this class.
Definition at line 141 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 423 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 405 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 569 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 632 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 585 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 304 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 455 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 326 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 344 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 359 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 373 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 388 of file BaseInfo.cxx.
void SG::BaseInfoBase::maybeInit | ( | ) |
|
private |
const std::type_info & SG::BaseInfoBase::typeinfo | ( | ) | const |
Return the std::type_info
for this class.
Definition at line 151 of file BaseInfo.cxx.
|
friend |
Definition at line 454 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.
|
friend |
Definition at line 456 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.
|
private |
Pointer to internal state.
Definition at line 734 of file Control/AthenaKernel/AthenaKernel/BaseInfo.h.