17 template <
typename Container,
typename Pred>
18 auto findLink( Container& c, Pred pred ) {
19 auto i = std::find_if(
c.begin(),
c.end(), pred );
20 return i !=
c.end() ? *i :
nullptr;
34 if ( pReg )
return pReg->
address();
50 return pObject ? findLink(
m_linkVector, [=](
auto* j ) {
return j->object() == pObject; } ) :
nullptr;
54 return pObject ? findLink(
m_linkVector, [=](
auto* j ) {
return j->object() == pObject; } ) :
nullptr;
59 return !path.empty() ? findLink(
m_linkVector, [=](
auto* j ) {
return j->path() == path; } ) :
nullptr;
62 return !path.empty() ? findLink(
m_linkVector, [=](
auto* j ) {
return j->path() == path; } ) :
nullptr;
70 if ( pO && pO == pObject )
return n;
71 if ( lnk->path() == path ) {
72 if ( pObject && pObject != pO ) { lnk->setObject(
const_cast<DataObject*
>( pObject ) ); }
A DataObject is the base class of any identifiable object on any data store.
Opaque address interface definition.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
Embedded class defining a symbolic link Note: No explicit copy constructor; implicit compiler generat...
IOpaqueAddress * address()
Access to the object's address.
DataObject * m_pObject
Pointer to object behind the link.
long addLink(const std::string &path, const DataObject *pObject)
Add link by object reference and path.
~LinkManager()
Standard Destructor.
std::vector< Link * > m_linkVector
@ TODO: replace by std::vector<std::unique_ptr<Link>> once ROOT does 'automatic' schema conversion fr...
const Link * link(long id) const
Retrieve symbolic link identified by ID.