The Gaudi Framework  v30r4 (9b837755)
IDataProviderSvc Class Referenceabstract

Data provider interface definition. More...

#include <GaudiKernel/IDataProviderSvc.h>

Inheritance diagram for IDataProviderSvc:
Collaboration diagram for IDataProviderSvc:

Public Types

enum  { SEPARATOR = '/' }
 
enum  Status : StatusCode::code_t {
  Status::IDataProviderSvc_NO_ERROR = 1, Status::DOUBL_OBJ_PATH, Status::INVALID_OBJ_PATH, Status::INVALID_ROOT,
  Status::INVALID_OBJECT, Status::INVALID_PARENT, Status::OBJ_NOT_LOADED, Status::NO_DATA_LOADER,
  Status::INVALID_OBJ_ADDR, Status::DIR_NOT_EMPTY, Status::NO_MORE_LEVELS, Status::NO_ACCESS,
  Status::LAST
}
 Status code definitions. More...
 
- Public Types inherited from IInterface
enum  Status : StatusCode::code_t {
  Status::FAILURE = 0, Status::SUCCESS = 1, Status::NO_INTERFACE, Status::VERSMISMATCH,
  Status::LAST_ERROR
}
 Return status. More...
 
using iid = Gaudi::InterfaceId< IInterface, 0, 0 >
 Interface ID. More...
 
using ext_iids = Gaudi::interface_list< iid >
 Extra interfaces. More...
 

Public Member Functions

 DeclareInterfaceID (IDataProviderSvc, 4, 0)
 InterfaceID. More...
 
StatusCode registerObject (boost::string_ref fullPath, DataObject *pObject)
 Register object with the data store. More...
 
virtual StatusCode registerObject (boost::string_ref parentPath, boost::string_ref objectPath, DataObject *pObject)=0
 Register object with the data store. More...
 
StatusCode registerObject (boost::string_ref parentPath, int item, DataObject *pObject)
 Register object with the data store. More...
 
virtual StatusCode registerObject (DataObject *parentObj, boost::string_ref objectPath, DataObject *pObject)=0
 Register object with the data store. More...
 
StatusCode registerObject (DataObject *parentObj, int item, DataObject *pObject)
 Register object with the data store. More...
 
virtual StatusCode unregisterObject (boost::string_ref fullPath)=0
 Unregister object from the data store. More...
 
StatusCode unregisterObject (boost::string_ref parentPath, boost::string_ref objPath)
 Unregister object from the data store. More...
 
StatusCode unregisterObject (boost::string_ref parentPath, int item)
 Unregister object from the data store. More...
 
virtual StatusCode unregisterObject (DataObject *pObject)=0
 Unregister object from the data store. More...
 
virtual StatusCode unregisterObject (DataObject *pParent, boost::string_ref objPath)=0
 Unregister object from the data store. More...
 
StatusCode unregisterObject (DataObject *pParent, int item)
 Unregister object from the data store. More...
 
virtual StatusCode retrieveObject (IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
 Retrieve object identified by its directory entry. More...
 
StatusCode retrieveObject (boost::string_ref fullPath, DataObject *&pObject)
 Retrieve object identified by its full path from the data store. More...
 
StatusCode retrieveObject (boost::string_ref parentPath, boost::string_ref objectPath, DataObject *&pObject)
 Retrieve object from data store. More...
 
StatusCode retrieveObject (boost::string_ref parentPath, int item, DataObject *&pObject)
 Retrieve object from data store. More...
 
StatusCode retrieveObject (DataObject *parentObj, boost::string_ref objectPath, DataObject *&pObject)
 Retrieve object from data store. More...
 
StatusCode retrieveObject (DataObject *parentObj, int item, DataObject *&pObject)
 Retrieve object from data store. More...
 
virtual StatusCode findObject (IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
 Find object identified by its directory entry. More...
 
virtual StatusCode findObject (boost::string_ref fullPath, DataObject *&pObject)=0
 Find object identified by its full path in the data store. More...
 
StatusCode findObject (boost::string_ref parentPath, boost::string_ref objectPath, DataObject *&pObject)
 Find object identified by its parent object and the path to the object relative to the parent. More...
 
StatusCode findObject (boost::string_ref parentPath, int item, DataObject *&pObject)
 Find object identified by its parent object and an integer identifier in the data store. More...
 
StatusCode findObject (DataObject *parentObj, boost::string_ref objectPath, DataObject *&pObject)
 Find object identified by its parent object and the path to the object relative to the parent. More...
 
StatusCode findObject (DataObject *parentObj, int item, DataObject *&pObject)
 Find object identified by its parent object and an integer identifier in the data store. More...
 
virtual StatusCode updateObject (IRegistry *pDirectory)=0
 Update object identified by its directory entry. More...
 
StatusCode updateObject (boost::string_ref fullPath)
 Update object identified by its full path in the data store. More...
 
virtual StatusCode updateObject (DataObject *toUpdate)=0
 Update object identified by its pointer. More...
 
StatusCode updateObject (boost::string_ref parentPath, boost::string_ref updatePath)
 Update object identified by its parent's path and the path relative to the parent. More...
 
StatusCode updateObject (DataObject *pParent, boost::string_ref updatePath)
 Update object identified by its parent's pointer and the path relative to the parent. More...
 
virtual StatusCode addPreLoadItem (const DataStoreItem &item)=0
 Add an item to the preload list. More...
 
StatusCode addPreLoadItem (std::string itemPath)
 Add an item to the preload list. More...
 
virtual StatusCode removePreLoadItem (const DataStoreItem &item)=0
 Remove an item from the preload list. More...
 
StatusCode removePreLoadItem (std::string itemPath)
 Remove an item from the preload list. More...
 
virtual StatusCode resetPreLoad ()=0
 Clear the preload list. More...
 
virtual StatusCode preLoad ()=0
 Load all preload items of the list. More...
 
virtual StatusCode linkObject (IRegistry *from, boost::string_ref objPath, DataObject *toObj)=0
 Add a link to another object. More...
 
StatusCode linkObject (boost::string_ref fromPath, boost::string_ref objPath, DataObject *toObj)
 Add a link to another object. More...
 
StatusCode linkObject (DataObject *fromObj, boost::string_ref objPath, DataObject *toObj)
 Add a link to another object. More...
 
virtual StatusCode linkObject (boost::string_ref fullPath, DataObject *toObj)=0
 Add a link to another object. More...
 
virtual StatusCode unlinkObject (IRegistry *from, boost::string_ref objPath)=0
 Remove a link to another object. More...
 
StatusCode unlinkObject (boost::string_ref fromPath, boost::string_ref objPath)
 Remove a link to another object. More...
 
virtual StatusCode unlinkObject (DataObject *fromObj, boost::string_ref objPath)=0
 Remove a link to another object. More...
 
virtual StatusCode unlinkObject (boost::string_ref fullPath)=0
 Remove a link to another object. More...
 
- Public Member Functions inherited from IInterface
virtual void * i_cast (const InterfaceID &) const =0
 main cast function More...
 
virtual std::vector< std::stringgetInterfaceNames () const =0
 Returns a vector of strings containing the names of all the implemented interfaces. More...
 
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long release ()=0
 Release Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)=0
 Set the void** to the pointer to the requested interface of the instance. More...
 
virtual ~IInterface ()=default
 Virtual destructor. More...
 

Static Private Member Functions

static std::string itemToPath (int item)
 Helper function to convert item numbers to path strings. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 

Detailed Description

Data provider interface definition.

The data provider interface allows to:

  • Define lists of items to be loaded automatically when a new root node is assigned to the data store.
  • Register objects from the data store. Once objects are registered with the data store the client gives up ownership.
  • Unregister objects from the data store. Unregistering an object means to actually delete all entries hanging below, not the object itself - since the client claims back ownership. Note that this is a very delicate operation - any reference to the object will be invalid. Even worse: invalid references cannot be detected.
  • Retrieve objects to the data store. Depending ont he availibility of the requested object in the data store the represented object will be loaded if possible.
  • Find objects beeing present in the store without actually creating the representation if the object is not present.
  • Create 'soft' links between objects in the transient store.
  • Request object updates.
Author
Markus Frank
Sebastien Ponce

Definition at line 43 of file IDataProviderSvc.h.

Member Enumeration Documentation

anonymous enum
Enumerator
SEPARATOR 

Definition at line 53 of file IDataProviderSvc.h.

Status code definitions.

Enumerator
IDataProviderSvc_NO_ERROR 

Success.

DOUBL_OBJ_PATH 

The path for this objects is already in use.

INVALID_OBJ_PATH 

Invalid path from root to object request failed.

INVALID_ROOT 

Invalid root path object cannot be retrieved or stored.

INVALID_OBJECT 

Object pointer is invalid.

INVALID_PARENT 

Pointer to parent object is not valid.

OBJ_NOT_LOADED 

Sorry, the requested object is not loaded.

NO_DATA_LOADER 

No data loader available.

INVALID_OBJ_ADDR 

Invalid object address.

DIR_NOT_EMPTY 

Directory entry is NOT empty.

NO_MORE_LEVELS 

Automatic data loading had to stop: maximum depth.

NO_ACCESS 

Access to the requested leaf is inhibited.

LAST 

Terminator.

Definition at line 570 of file IDataProviderSvc.h.

572  IDataProviderSvc_NO_ERROR = 1,
574  DOUBL_OBJ_PATH,
576  INVALID_OBJ_PATH,
578  INVALID_ROOT,
580  INVALID_OBJECT,
582  INVALID_PARENT,
584  OBJ_NOT_LOADED,
586  NO_DATA_LOADER,
588  INVALID_OBJ_ADDR,
590  DIR_NOT_EMPTY,
592  NO_MORE_LEVELS,
594  NO_ACCESS,
596  LAST
597  };
unsigned long code_t
type of StatusCode value
Definition: StatusCode.h:54

Member Function Documentation

virtual StatusCode IDataProviderSvc::addPreLoadItem ( const DataStoreItem item)
pure virtual

Add an item to the preload list.

Parameters
itemSpecs of item to be preloaded
Returns
Status code indicating success or failure.
StatusCode IDataProviderSvc::addPreLoadItem ( std::string  itemPath)
inline

Add an item to the preload list.

The item is identified by the path to the object.

Parameters
itemPathPath to the item to be preloaded.
Returns
Status code indicating success or failure.

Definition at line 451 of file IDataProviderSvc.h.

452  {
453  return addPreLoadItem( DataStoreItem( std::move( itemPath ), 1 ) );
454  }
virtual StatusCode addPreLoadItem(const DataStoreItem &item)=0
Add an item to the preload list.
Description of the DataStoreItem class.
Definition: DataStoreItem.h:17
T move(T...args)
IDataProviderSvc::DeclareInterfaceID ( IDataProviderSvc  ,
,
 
)
virtual StatusCode IDataProviderSvc::findObject ( IRegistry pDirectory,
boost::string_ref  path,
DataObject *&  pObject 
)
pure virtual

Find object identified by its directory entry.

The result will be returned in the second argument. In case the object is not present the pointer will be set to NULL. ** FASTEST ACCESS TO THE DATA STORE **

Parameters
pDirectoryPointer to the object.
pathString with relative path to directory. Ideally ""!
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.
virtual StatusCode IDataProviderSvc::findObject ( boost::string_ref  fullPath,
DataObject *&  pObject 
)
pure virtual

Find object identified by its full path in the data store.

The result will be returned in the second argument. In case the object is not present the pointer will be set to NULL.

Parameters
fullPathPath name of the object.
pObjectPointer to the object to be connected.
Returns
Status code indicating success or failure.
StatusCode IDataProviderSvc::findObject ( boost::string_ref  parentPath,
boost::string_ref  objectPath,
DataObject *&  pObject 
)
inline

Find object identified by its parent object and the path to the object relative to the parent.

The result will be returned in the second argument. In case the object is not present the pointer will be set to NULL.

Parameters
parentPathPath to parent node of the object.
objectPathRelative path name of the object.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 335 of file IDataProviderSvc.h.

336  {
337  DataObject* parent = nullptr;
338  StatusCode status = findObject( parentPath, parent );
339  return status.isSuccess() ? findObject( parent, objectPath, pObject ) : status;
340  }
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
bool isSuccess() const
Definition: StatusCode.h:287
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
StatusCode IDataProviderSvc::findObject ( boost::string_ref  parentPath,
int  item,
DataObject *&  pObject 
)
inline

Find object identified by its parent object and an integer identifier in the data store.

In case the object is not present the pointer will be set to NULL.

Parameters
parentPathPath to parent node of the object.
itemItem identifier.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 350 of file IDataProviderSvc.h.

351  {
352  return findObject( parentPath, itemToPath( item ), pObject );
353  }
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
StatusCode IDataProviderSvc::findObject ( DataObject parentObj,
boost::string_ref  objectPath,
DataObject *&  pObject 
)
inline

Find object identified by its parent object and the path to the object relative to the parent.

The result will be returned in the second argument. In case the object is not present the pointer will be set to NULL.

Parameters
parentObjPointer to parent node of the object.
objectPathRelative path name of the object.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 364 of file IDataProviderSvc.h.

365  {
366  return findObject( parentObj ? parentObj->registry() : nullptr, objectPath, pObject );
367  }
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:73
StatusCode IDataProviderSvc::findObject ( DataObject parentObj,
int  item,
DataObject *&  pObject 
)
inline

Find object identified by its parent object and an integer identifier in the data store.

In case the object is not present the pointer will be set to NULL.

Parameters
parentObjPointer to parent node of the object.
itemItem identifier.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 377 of file IDataProviderSvc.h.

378  {
379  return findObject( parentObj, itemToPath( item ), pObject );
380  }
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
static std::string IDataProviderSvc::itemToPath ( int  item)
inlinestaticprivate

Helper function to convert item numbers to path strings.

Definition at line 48 of file IDataProviderSvc.h.

48 { return '/' + std::to_string( item ); }
T to_string(T...args)
virtual StatusCode IDataProviderSvc::linkObject ( IRegistry from,
boost::string_ref  objPath,
DataObject toObj 
)
pure virtual

Add a link to another object.

Both objects must already be registered with the data store. Once linked, the object can only be unregistered after unlinking.

Parameters
fromPointer to data directory the link originates.
objPathPath of the entry to be linked relative to from.
toObjPointer to the object the link points to.
Returns
Status code indicating success or failure.
StatusCode IDataProviderSvc::linkObject ( boost::string_ref  fromPath,
boost::string_ref  objPath,
DataObject toObj 
)
inline

Add a link to another object.

Both objects must already be registered with the data store. Once linked, the object can only be unregistered after unlinking.

Parameters
fromPathPath to the object the link originates.
objPathPath of the entry to be linked relative to from.
toObjPointer to the object the link points to.
Returns
Status code indicating success or failure.

Definition at line 499 of file IDataProviderSvc.h.

500  {
501  DataObject* pO = nullptr;
502  StatusCode status = retrieveObject( fromPath, pO );
503  return status.isSuccess() ? linkObject( pO->registry(), objPath, toObj ) : status;
504  }
bool isSuccess() const
Definition: StatusCode.h:287
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:73
virtual StatusCode linkObject(IRegistry *from, boost::string_ref objPath, DataObject *toObj)=0
Add a link to another object.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
StatusCode IDataProviderSvc::linkObject ( DataObject fromObj,
boost::string_ref  objPath,
DataObject toObj 
)
inline

Add a link to another object.

Both objects must already be registered with the data store. Once linked, the object can only be unregistered after unlinking.

Parameters
fromObjPointer to the object the link originates.
objPathPath of the entry to be linked relative to from.
toObjPointer to the object the link points to.
Returns
Status code indicating success or failure.

Definition at line 602 of file IDataProviderSvc.h.

603 {
604  if ( fromObj ) {
605  IRegistry* from_entry = fromObj->registry();
606  if ( from_entry ) return linkObject( from_entry, objPath, toObj );
607  }
608  return Status::INVALID_PARENT;
609 }
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:73
virtual StatusCode linkObject(IRegistry *from, boost::string_ref objPath, DataObject *toObj)=0
Add a link to another object.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
Pointer to parent object is not valid.
virtual StatusCode IDataProviderSvc::linkObject ( boost::string_ref  fullPath,
DataObject toObj 
)
pure virtual

Add a link to another object.

Both objects must already be registered with the data store. Once linked, the object can only be unregistered after unlinking.

Parameters
fullPathFull path of the entry to be linked.
toObjPointer to the object the link points to.
Returns
Status code indicating success or failure.
virtual StatusCode IDataProviderSvc::preLoad ( )
pure virtual

Load all preload items of the list.

Returns
Status code indicating success or failure.
StatusCode IDataProviderSvc::registerObject ( boost::string_ref  fullPath,
DataObject pObject 
)
inline

Register object with the data store.

Connect the object identified by its pointer to the node object identified by its path.

Parameters
fullPathPath to parent node of the object.
pObjectPointer to the object to be registered.
Returns
Status code indicating success or failure.

Definition at line 62 of file IDataProviderSvc.h.

63  {
64  return registerObject( nullptr, fullPath, pObject );
65  }
StatusCode registerObject(boost::string_ref fullPath, DataObject *pObject)
Register object with the data store.
virtual StatusCode IDataProviderSvc::registerObject ( boost::string_ref  parentPath,
boost::string_ref  objectPath,
DataObject pObject 
)
pure virtual

Register object with the data store.

Connect the object identified by the path to the parent object and the path of the object itself relative to the specified parent.

Parameters
parentPathPath to parent node of the object.
objectPathPath of the object relative to the parent node
pObjectPointer to the object to be registered.
Returns
Status code indicating success or failure.
StatusCode IDataProviderSvc::registerObject ( boost::string_ref  parentPath,
int  item,
DataObject pObject 
)
inline

Register object with the data store.

Connect the object identified by its pointer to the parent object and an integer identifier.

Parameters
parentPathPath to parent node of the object.
itemitem number of the object linked to the parent
pObjectPointer to the object to be registered.
Returns
Status code indicating success or failure.

Definition at line 86 of file IDataProviderSvc.h.

87  {
88  return registerObject( parentPath, itemToPath( item ), pObject );
89  }
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
StatusCode registerObject(boost::string_ref fullPath, DataObject *pObject)
Register object with the data store.
virtual StatusCode IDataProviderSvc::registerObject ( DataObject parentObj,
boost::string_ref  objectPath,
DataObject pObject 
)
pure virtual

Register object with the data store.

Connect the object identified by its pointer to the parent object and the relative path of the object with respect to the parent.

Parameters
parentObjPointer to parent object.
objectPathPath of the object relative to the parent node
pObjectPointer to the object to be connected.
Returns
Status code indicating success or failure.
StatusCode IDataProviderSvc::registerObject ( DataObject parentObj,
int  item,
DataObject pObject 
)
inline

Register object with the data store.

Connect the object identified by its pointer to the node object identified by its pointer.

Parameters
parentObjPointer to parent object.
itemitem number of the object linked to the parent
pObjectPointer to the object to be connected.
Returns
Status code indicating success or failure.

Definition at line 109 of file IDataProviderSvc.h.

110  {
111  return registerObject( parentObj, itemToPath( item ), pObject );
112  }
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
StatusCode registerObject(boost::string_ref fullPath, DataObject *pObject)
Register object with the data store.
virtual StatusCode IDataProviderSvc::removePreLoadItem ( const DataStoreItem item)
pure virtual

Remove an item from the preload list.

Parameters
itemSpecs of item to be removed from the preload list
Returns
Status code indicating success or failure.
StatusCode IDataProviderSvc::removePreLoadItem ( std::string  itemPath)
inline

Remove an item from the preload list.

Parameters
itemPathPath to the item to be preloaded.
Returns
Status code indicating success or failure.

Definition at line 466 of file IDataProviderSvc.h.

467  {
468  return removePreLoadItem( DataStoreItem( std::move( itemPath ), 1 ) );
469  }
Description of the DataStoreItem class.
Definition: DataStoreItem.h:17
virtual StatusCode removePreLoadItem(const DataStoreItem &item)=0
Remove an item from the preload list.
T move(T...args)
virtual StatusCode IDataProviderSvc::resetPreLoad ( )
pure virtual

Clear the preload list.

Returns
Status code indicating success or failure.
virtual StatusCode IDataProviderSvc::retrieveObject ( IRegistry pDirectory,
boost::string_ref  path,
DataObject *&  pObject 
)
pure virtual

Retrieve object identified by its directory entry.

The result will be returned in the second argument. In case the object is not present it will be loaded and converted if possible. ** FASTEST ACCESS TO THE DATA STORE **

Parameters
pDirectoryPointer to the object.
pathString with relative path to directory. Ideally ""!
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.
StatusCode IDataProviderSvc::retrieveObject ( boost::string_ref  fullPath,
DataObject *&  pObject 
)
inline

Retrieve object identified by its full path from the data store.

The result will be returned in the second argument. In case the object is not present it will be loaded and converted if possible.

Parameters
fullPathPath name of the object.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 239 of file IDataProviderSvc.h.

240  {
241  return retrieveObject( static_cast<IRegistry*>( nullptr ), fullPath, pObject );
242  }
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
StatusCode IDataProviderSvc::retrieveObject ( boost::string_ref  parentPath,
boost::string_ref  objectPath,
DataObject *&  pObject 
)
inline

Retrieve object from data store.

The object to be retrieved is identified by the path of the parent object and the relative path with respect to the node. In case the object is not present it will be loaded and converted if possible.

Parameters
parentPathPath to parent node of the object.
objectPathPath of the object relative to the parent.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 254 of file IDataProviderSvc.h.

255  {
256  DataObject* parent = nullptr;
257  StatusCode status = retrieveObject( parentPath, parent );
258  return status.isSuccess() ? retrieveObject( parent, objectPath, pObject ) : status;
259  }
bool isSuccess() const
Definition: StatusCode.h:287
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
StatusCode IDataProviderSvc::retrieveObject ( boost::string_ref  parentPath,
int  item,
DataObject *&  pObject 
)
inline

Retrieve object from data store.

The object to be retrieved is identified by the path to the parent object and an integer identifier. In case the object is not present it will be loaded and converted if possible.

Parameters
parentPathPath to parent node of the object.
itemItem identifier.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 271 of file IDataProviderSvc.h.

272  {
273  return retrieveObject( parentPath, itemToPath( item ), pObject );
274  }
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
StatusCode IDataProviderSvc::retrieveObject ( DataObject parentObj,
boost::string_ref  objectPath,
DataObject *&  pObject 
)
inline

Retrieve object from data store.

The object to be retrieved is identified by the pointer to the parent object and the relative path with respect to the node. In case the object is not present it will be loaded and converted if possible.

Parameters
parentObjPointer to parent node of the object.
objectPathPath of the object relative to the parent.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 286 of file IDataProviderSvc.h.

287  {
288  return retrieveObject( parentObj ? parentObj->registry() : nullptr, objectPath, pObject );
289  }
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:73
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
StatusCode IDataProviderSvc::retrieveObject ( DataObject parentObj,
int  item,
DataObject *&  pObject 
)
inline

Retrieve object from data store.

The object to be retrieved is identified by the pointer to the parent object and an integer identifier. In case the object is not present it will be loaded and converted if possible.

Parameters
parentObjPointer to parent node of the object.
itemItem identifier.
pObjectReference to the pointer of the object to be returned.
Returns
Status code indicating success or failure.

Definition at line 301 of file IDataProviderSvc.h.

302  {
303  return retrieveObject( parentObj, itemToPath( item ), pObject );
304  }
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
virtual StatusCode IDataProviderSvc::unlinkObject ( IRegistry from,
boost::string_ref  objPath 
)
pure virtual

Remove a link to another object.

Both objects must be registered with the data store. This entry point can be used to unlink objects e.g. in order to unregister them.

Parameters
fromPointer to data directory the link originates.
objPathPath of the entry to be linked relative to from.
Returns
Status code indicating success or failure.
StatusCode IDataProviderSvc::unlinkObject ( boost::string_ref  fromPath,
boost::string_ref  objPath 
)
inline

Remove a link to another object.

Both objects must be registered with the data store. This entry point can be used to unlink objects e.g. in order to unregister them.

Parameters
fromPathPath to the object the link originates.
objPathPath of the entry to be linked relative to from.
Returns
Status code indicating success or failure.

Definition at line 543 of file IDataProviderSvc.h.

544  {
545  DataObject* pObject = nullptr;
546  StatusCode status = findObject( fromPath, pObject );
547  return status.isSuccess() ? unlinkObject( pObject->registry(), objPath ) : status;
548  }
virtual StatusCode unlinkObject(IRegistry *from, boost::string_ref objPath)=0
Remove a link to another object.
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
bool isSuccess() const
Definition: StatusCode.h:287
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:73
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
virtual StatusCode IDataProviderSvc::unlinkObject ( DataObject fromObj,
boost::string_ref  objPath 
)
pure virtual

Remove a link to another object.

Both objects must be registered with the data store. This entry point can be used to unlink objects e.g. in order to unregister them.

Parameters
fromObjPointer to the object the link originates.
objPathPath of the entry to be linked relative to from.
Returns
Status code indicating success or failure.
virtual StatusCode IDataProviderSvc::unlinkObject ( boost::string_ref  fullPath)
pure virtual

Remove a link to another object.

Both objects must be registered with the data store. This entry point can be used to unlink objects e.g. in order to unregister them.

Parameters
fullPathFull path of the entry to be linked.
Returns
Status code indicating success or failure.
virtual StatusCode IDataProviderSvc::unregisterObject ( boost::string_ref  fullPath)
pure virtual

Unregister object from the data store.

On registration the client gives up ownership of the object and may no longer delete the object. unregistering the object is the opposite: ownership is claimed back by the user. But note:

  • All depending objects will be deleted, ie. all leaves "below" the entry in question; NOT the object itself, the object itself must be destroyed by the user.

The object is identified by full path name.

Parameters
fullPathPath name of the object.
Returns
Status code indicating success or failure.
StatusCode IDataProviderSvc::unregisterObject ( boost::string_ref  parentPath,
boost::string_ref  objPath 
)
inline

Unregister object from the data store.

On registration the client gives up ownership of the object and may no longer delete the object. unregistering the object is the opposite: ownership is claimed back by the user. But note:

  • All depending objects will be deleted, ie. all leaves "below" the entry in question; NOT the object itself, the object itself must be destroyed by the user.

The object is identified by parent path name and the path of the object relative to the parent.

Parameters
parentPathPath name of the parent object.
objPathPath name of the object relative to the parent.
Returns
Status code indicating success or failure.

Definition at line 143 of file IDataProviderSvc.h.

144  {
145  DataObject* pO = nullptr;
146  StatusCode status = findObject( parentPath, pO );
147  return status.isSuccess() ? unregisterObject( pO, objPath ) : status;
148  }
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
bool isSuccess() const
Definition: StatusCode.h:287
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
virtual StatusCode unregisterObject(boost::string_ref fullPath)=0
Unregister object from the data store.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
StatusCode IDataProviderSvc::unregisterObject ( boost::string_ref  parentPath,
int  item 
)
inline

Unregister object from the data store.

On registration the client gives up ownership of the object and may no longer delete the object. unregistering the object is the opposite: ownership is claimed back by the user. But note:

  • All depending objects will be deleted, ie. all leaves "below" the entry in question; NOT the object itself, the object itself must be destroyed by the user.

The object is identified by parent path name and an integer identifier of the object itself.

Parameters
parentPathPath name of the parent object.
itemInteger identifier of the object item.
Returns
Status code indicating success or failure.

Definition at line 164 of file IDataProviderSvc.h.

165  {
166  return unregisterObject( parentPath, itemToPath( item ) );
167  }
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
virtual StatusCode unregisterObject(boost::string_ref fullPath)=0
Unregister object from the data store.
virtual StatusCode IDataProviderSvc::unregisterObject ( DataObject pObject)
pure virtual

Unregister object from the data store.

On registration the client gives up ownership of the object and may no longer delete the object. unregistering the object is the opposite: ownership is claimed back by the user. But note:

  • All depending objects will be deleted, ie. all leaves "below" the entry in question; NOT the object itself, the object itself must be destroyed by the user.

The object is identified by its pointer. The object must previously have been registered with the data store.

Parameters
pObjectPointer to the object.
Returns
Status code indicating success or failure.
virtual StatusCode IDataProviderSvc::unregisterObject ( DataObject pParent,
boost::string_ref  objPath 
)
pure virtual

Unregister object from the data store.

On registration the client gives up ownership of the object and may no longer delete the object. unregistering the object is the opposite: ownership is claimed back by the user. But note:

  • All depending objects will be deleted, ie. all leaves "below" the entry in question; NOT the object itself, the object itself must be destroyed by the user.

The object is identified by parent object and the path of the object relative to the parent.

Parameters
pParentPointer to parent object.
objPathPath name of the object relative to the parent.
Returns
Status code indicating success or failure.
StatusCode IDataProviderSvc::unregisterObject ( DataObject pParent,
int  item 
)
inline

Unregister object from the data store.

On registration the client gives up ownership of the object and may no longer delete the object. unregistering the object is the opposite: ownership is claimed back by the user. But note:

  • All depending objects will be deleted, ie. all leaves "below" the entry in question; NOT the object itself, the object itself must be destroyed by the user.

The object is identified by parent object and an integer identifier of the object itself.

Parameters
pParentPointer to parent object.
itemInteger identifier of the object item.
Returns
Status code indicating success or failure.

Definition at line 214 of file IDataProviderSvc.h.

215  {
216  return unregisterObject( pParent, itemToPath( item ) );
217  }
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
virtual StatusCode unregisterObject(boost::string_ref fullPath)=0
Unregister object from the data store.
virtual StatusCode IDataProviderSvc::updateObject ( IRegistry pDirectory)
pure virtual

Update object identified by its directory entry.

** FASTEST ACCESS TO THE DATA STORE **

Parameters
pDirectoryPointer to the directory entry.
Returns
Status code indicating success or failure.
StatusCode IDataProviderSvc::updateObject ( boost::string_ref  fullPath)
inline

Update object identified by its full path in the data store.

If found, the object update will be initiated. In case the object is not present the entry point returns an error.

Parameters
fullPathPath name of the object.
Returns
Status code indicating success or failure.

Definition at line 395 of file IDataProviderSvc.h.

396  {
397  DataObject* pO = nullptr;
398  StatusCode status = findObject( fullPath, pO );
399  return status.isSuccess() ? updateObject( pO ) : retrieveObject( fullPath, pO );
400  }
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
bool isSuccess() const
Definition: StatusCode.h:287
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.
virtual StatusCode retrieveObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
virtual StatusCode IDataProviderSvc::updateObject ( DataObject toUpdate)
pure virtual

Update object identified by its pointer.

If found, the object update will be initiated. In case the object is not present the entry point returns an error.

Parameters
toUpdatePointer to the object.
Returns
Status code indicating success or failure.
StatusCode IDataProviderSvc::updateObject ( boost::string_ref  parentPath,
boost::string_ref  updatePath 
)
inline

Update object identified by its parent's path and the path relative to the parent.

If found, the object update will be initiated. In case the object is not present the entry point returns an error.

Parameters
parentPathPath name of the parent object.
updatePathPath to the object relative to the parent.
Returns
Status code indicating success or failure.

Definition at line 418 of file IDataProviderSvc.h.

419  {
420  DataObject* pParent = nullptr;
421  StatusCode status = findObject( parentPath, pParent );
422  return status.isSuccess() ? updateObject( pParent, updatePath ) : status;
423  }
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
bool isSuccess() const
Definition: StatusCode.h:287
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
StatusCode IDataProviderSvc::updateObject ( DataObject pParent,
boost::string_ref  updatePath 
)
inline

Update object identified by its parent's pointer and the path relative to the parent.

If found, the object update will be initiated. In case the object is not present the entry point returns an error.

Parameters
pParentPointer to the parent object.
updatePathPath to the object relative to the parent.
Returns
Status code indicating success or failure.

Definition at line 433 of file IDataProviderSvc.h.

434  {
435  DataObject* pObject = nullptr;
436  StatusCode status = findObject( pParent, updatePath, pObject );
437  return status.isSuccess() ? updateObject( pObject ) : status;
438  }
virtual StatusCode findObject(IRegistry *pDirectory, boost::string_ref path, DataObject *&pObject)=0
Find object identified by its directory entry.
bool isSuccess() const
Definition: StatusCode.h:287
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:51
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30

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