ATLAS Offline Software
Loading...
Searching...
No Matches
SG::SymlinkDataObject Class Reference

Helper for symLink_impl. More...

Inheritance diagram for SG::SymlinkDataObject:
Collaboration diagram for SG::SymlinkDataObject:

Public Member Functions

 SymlinkDataObject (CLID clid, void *obj)
virtual const CLIDclID () const override
virtual void * object () override
virtual const std::type_info & tinfo () const override
 Return the type_info for the stored object.
virtual void * cast (CLID, SG::IRegisterTransient *, bool) override
 Return the contents of the DataBucket, converted to type given by clid.
virtual void * cast (const std::type_info &, SG::IRegisterTransient *, bool) override
 Return the contents of the DataBucket, converted to type given by std::type_info.
virtual void relinquish () override
 Give up ownership of the DataBucket contents.
virtual void lock () override
 If the held object derives from ILockable, call lock() on it.
template<class T>
T * cast (SG::IRegisterTransient *irt=0, bool isConst=true)
 Return the contents of the DataBucket, converted to type T.
virtual void * cast (CLID clid, const std::type_info &tinfo, SG::IRegisterTransient *irt=0, bool isConst=true)
 Return the contents of the DataBucket, converted to type given by clid.

Private Attributes

CLID m_clid
void * m_obj

Detailed Description

Helper for symLink_impl.

A simple DataBucket that holds an arbitrary pointer/clid. We stub out everything else that we don't use.

Definition at line 87 of file StoreGate/src/VarHandleBase.cxx.

Constructor & Destructor Documentation

◆ SymlinkDataObject()

SG::SymlinkDataObject::SymlinkDataObject ( CLID clid,
void * obj )
inline

Member Function Documentation

◆ cast() [1/4]

virtual void * DataBucketBase::cast ( CLID clid,
const std::type_info & tinfo,
SG::IRegisterTransient * irt = 0,
bool isConst = true )
virtual

Return the contents of the DataBucket, converted to type given by clid.

Note that only derived->base conversions are allowed here.

Parameters
clidThe class ID to which to convert.
tinfoThe std::type_info of the type to which to convert.
irtTo be called if we make a new instance.
isConstTrue if the object being converted is regarded as const.

This allows the callee to choose whether to use clid or tinfo. By default, this uses type_info.

Reimplemented from DataBucketBase.

◆ cast() [2/4]

virtual void * SG::SymlinkDataObject::cast ( CLID clid,
SG::IRegisterTransient * irt,
bool isConst )
inlineoverridevirtual

Return the contents of the DataBucket, converted to type given by clid.

Note that only derived->base conversions are allowed here.

Parameters
clidThe class ID to which to convert.
irtTo be called if we make a new instance.
isConstTrue if the object being converted is regarded as const.

Implements DataBucketBase.

Definition at line 96 of file StoreGate/src/VarHandleBase.cxx.

96{ std::abort(); }

◆ cast() [3/4]

virtual void * SG::SymlinkDataObject::cast ( const std::type_info & tinfo,
SG::IRegisterTransient * irt,
bool isConst )
inlineoverridevirtual

Return the contents of the DataBucket, converted to type given by std::type_info.

Note that only derived->base conversions are allowed here.

Parameters
tinfoThe std::type_info of the type to which to convert.
irtTo be called if we make a new instance.
isConstTrue if the object being converted is regarded as const.

Implements DataBucketBase.

Definition at line 97 of file StoreGate/src/VarHandleBase.cxx.

97{ std::abort(); }

◆ cast() [4/4]

template<class T>
T * DataBucketBase::cast ( SG::IRegisterTransient * irt = 0,
bool isConst = true )

Return the contents of the DataBucket, converted to type T.

Note that only derived->base conversions are allowed here. T must have a valid Class ID for this to work.

Parameters
irtTo be called if we make a new instance.
isConstTrue if the object being converted is regarded as const.

◆ clID()

virtual const CLID & SG::SymlinkDataObject::clID ( ) const
inlineoverridevirtual

Definition at line 92 of file StoreGate/src/VarHandleBase.cxx.

92{ return m_clid; }

◆ lock()

virtual void SG::SymlinkDataObject::lock ( )
inlineoverridevirtual

If the held object derives from ILockable, call lock() on it.

Implements DataBucketBase.

Definition at line 99 of file StoreGate/src/VarHandleBase.cxx.

99{ }

◆ object()

virtual void * SG::SymlinkDataObject::object ( )
inlineoverridevirtual

Implements DataBucketBase.

Definition at line 93 of file StoreGate/src/VarHandleBase.cxx.

93{ return m_obj; }

◆ relinquish()

virtual void SG::SymlinkDataObject::relinquish ( )
inlineoverridevirtual

Give up ownership of the DataBucket contents.

This leaks the contents and it is useful mainly for error handling.

Implements DataBucketBase.

Definition at line 98 of file StoreGate/src/VarHandleBase.cxx.

98{ std::abort(); }

◆ tinfo()

virtual const std::type_info & SG::SymlinkDataObject::tinfo ( ) const
inlineoverridevirtual

Return the type_info for the stored object.

Implements DataBucketBase.

Definition at line 94 of file StoreGate/src/VarHandleBase.cxx.

94{ return typeid(void); }

Member Data Documentation

◆ m_clid

CLID SG::SymlinkDataObject::m_clid
private

Definition at line 103 of file StoreGate/src/VarHandleBase.cxx.

◆ m_obj

void* SG::SymlinkDataObject::m_obj
private

Definition at line 104 of file StoreGate/src/VarHandleBase.cxx.


The documentation for this class was generated from the following file: