13#ifndef ATHLINKS_DATALINKBASE_H
14#define ATHLINKS_DATALINKBASE_H
153 const EventContext& ctx);
Exceptions that can be thrown from AthLinks.
Manage DataProxy reference in ElementLink/DataLink.
uint32_t CLID
The Class ID type.
bool operator==(const DataLinkBase &other) const
Compare for equality.
void toIdentifiedObject(sgkey_t key, CLID clid, IProxyDict *sg)
Set the link to an object given by a hashed key.
void toIdentifiedObject(const ID_type &dataID, CLID clid, IProxyDict *sg)
Set the link to an object given by a string key.
bool toPersistent()
Prepare this link for writing.
void throwInvalidLink() const
Throw a ExcInvalidLink exception for this link.
friend class ElementLinkBase
bool toTransient(const ID_type &dataID, CLID link_clid, IProxyDict *sg=0)
Finish initialization like the link as just been read from root, but with a specified key.
DataLinkBase(const_pointer_t obj, CLID link_clid, IProxyDict *sg)
Constructor from pointer to object.
SG::DataProxyHolder::sgkey_t sgkey_t
Type of hashed keys.
SG::DataProxyHolder::const_pointer_t const_pointer_t
bool isDefault() const
Test to see if we're in the default state.
SG::DataProxyHolder::castfn_t castfn_t
Function casting from a SG::DataProxy to a pointer.
friend class DataLinkBase_test
For component testing.
DataLinkBase(const ID_type &dataID, CLID link_clid, IProxyDict *sg)
Constructor from a string key.
SG::DataProxy * proxy(bool nothrow=false) const
Return the DataProxy for this link.
void clear()
Clear the link (make it null).
bool toTransient(const EventContext &ctx)
Finish initialization after link has been read.
DataLinkBase()
Default constructor.
bool toPersistentNoRemap()
Prepare this link for writing.
sgkey_t m_persKey
The hashed key for this link.
DataLinkBase(sgkey_t key, CLID link_clid, IProxyDict *sg)
Constructor from a hashed key.
const ID_type & dataID() const
Return the SG key that we reference, as a string.
IProxyDict * source() const
Return the data source for this reference.
void * storableBase(castfn_t *castfn, const CLID &clid, bool isConst) const
Return a pointer to the currently-referenced object.
bool operator!=(const DataLinkBase &other) const
Compare for inequality.
DataLinkBase(sgkey_t key, const SG::DataProxyHolder &holder)
Constructor from a hashed key and a proxy holder object.
bool toTransient(IProxyDict *sg=0)
Finish initialization after link has been read.
sgkey_t key() const
Return the SG key that we reference, as a hash.
SG::DataProxyHolder::ID_type ID_type
Type of string keys.
bool toTransient(const ID_type &dataID, CLID link_clid, const EventContext &ctx)
Finish initialization like the link as just been read from root, but with a specified key.
SG::DataProxyHolder::pointer_t pointer_t
void toStorableObject(const_pointer_t obj, CLID clid_in, IProxyDict *sg)
Set the link to an object given by a pointer.
SG::DataProxyHolder m_proxy
SG proxy for this link.
Manage DataProxy reference in ElementLink/DataLink.
SG::sgkey_t sgkey_t
Type of hashed keys.
void * castfn_t(SG::DataProxy *)
Function casting from a SG::DataProxy to a pointer.
void * pointer_t
Generic pointer type.
std::string ID_type
Type of string keys.
const void * const_pointer_t
Generic base class for ElementLinks.