Go to the documentation of this file.
11 #ifndef GAUDIKERNEL_IDATAPROVIDERSVC_H
12 #define GAUDIKERNEL_IDATAPROVIDERSVC_H
19 #include <string_view>
73 return registerObject(
nullptr, fullPath, pObject );
96 return registerObject( parentPath, itemToPath( item ), pObject );
118 return registerObject( parentObj, itemToPath( item ), pObject );
152 StatusCode status = findObject( parentPath, pO );
153 return status.
isSuccess() ? unregisterObject( pO, objPath ) : status;
171 return unregisterObject( parentPath, itemToPath( item ) );
220 return unregisterObject( pParent, itemToPath( item ) );
244 return retrieveObject(
static_cast<IRegistry*
>(
nullptr ), fullPath, pObject );
259 StatusCode status = retrieveObject( parentPath, parent );
260 return status.
isSuccess() ? retrieveObject( parent, objectPath, pObject ) : status;
274 return retrieveObject( parentPath, itemToPath( item ), pObject );
288 return retrieveObject( parentObj ? parentObj->
registry() :
nullptr, objectPath, pObject );
302 return retrieveObject( parentObj, itemToPath( item ), pObject );
336 StatusCode status = findObject( parentPath, parent );
337 return status.
isSuccess() ? findObject( parent, objectPath, pObject ) : status;
349 return findObject( parentPath, itemToPath( item ), pObject );
362 return findObject( parentObj ? parentObj->
registry() :
nullptr, objectPath, pObject );
374 return findObject( parentObj, itemToPath( item ), pObject );
392 StatusCode status = findObject( fullPath, pO );
393 return status.
isSuccess() ? updateObject( pO ) : retrieveObject( fullPath, pO );
414 StatusCode status = findObject( parentPath, pParent );
415 return status.
isSuccess() ? updateObject( pParent, updatePath ) : status;
428 StatusCode status = findObject( pParent, updatePath, pObject );
429 return status.
isSuccess() ? updateObject( pObject ) : status;
491 StatusCode status = retrieveObject( fromPath, pO );
492 return status.
isSuccess() ? linkObject( pO->
registry(), objPath, toObj ) : status;
534 StatusCode status = findObject( fromPath, pObject );
535 return status.
isSuccess() ? unlinkObject( pObject->
registry(), objPath ) : status;
560 IDataProviderSvc_NO_ERROR = 1,
592 IRegistry* from_entry = fromObj->registry();
593 if ( from_entry )
return linkObject( from_entry, objPath, toObj );
595 return Status::INVALID_PARENT;
598 #endif // GAUDIKERNEL_IDATAPROVIDERSVC_H
StatusCode updateObject(DataObject *pParent, std::string_view updatePath)
Update object identified by its parent's pointer and the path relative to the parent.
virtual StatusCode registerObject(DataObject *parentObj, std::string_view objectPath, DataObject *pObject)=0
Register object with the data store.
StatusCode unregisterObject(std::string_view parentPath, int item)
Unregister object from the data store.
virtual StatusCode unregisterObject(std::string_view fullPath)=0
Unregister object from the data store.
virtual StatusCode removePreLoadItem(const DataStoreItem &item)=0
Remove an item from the preload list.
virtual StatusCode unlinkObject(IRegistry *from, std::string_view objPath)=0
Remove a link to another object.
StatusCode linkObject(std::string_view fromPath, std::string_view objPath, DataObject *toObj)
Add a link to another object.
StatusCode findObject(DataObject *parentObj, int item, DataObject *&pObject)
Find object identified by its parent object and an integer identifier in the data store.
virtual StatusCode registerObject(std::string_view parentPath, std::string_view objectPath, DataObject *pObject)=0
Register object with the data store.
StatusCode retrieveObject(std::string_view parentPath, int item, DataObject *&pObject)
Retrieve object from data store.
virtual StatusCode unregisterObject(DataObject *pParent, std::string_view objPath)=0
Unregister object from the data store.
StatusCode retrieveObject(std::string_view fullPath, DataObject *&pObject)
Retrieve object identified by its full path from the data store.
virtual StatusCode unregisterObject(DataObject *pObject)=0
Unregister object from the data store.
StatusCode findObject(DataObject *parentObj, std::string_view objectPath, DataObject *&pObject)
Find object identified by its parent object and the path to the object relative to the parent.
unsigned long code_t
type of StatusCode value
DeclareInterfaceID(IDataProviderSvc, 4, 0)
InterfaceID.
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
virtual StatusCode resetPreLoad()=0
Clear the preload list.
virtual StatusCode addPreLoadItem(const DataStoreItem &item)=0
Add an item to the preload list.
StatusCode findObject(std::string_view parentPath, int item, DataObject *&pObject)
Find object identified by its parent object and an integer identifier in the data store.
StatusCode registerObject(std::string_view fullPath, DataObject *pObject)
Register object with the data store.
virtual StatusCode linkObject(IRegistry *from, std::string_view objPath, DataObject *toObj)=0
Add a link to another object.
virtual StatusCode unlinkObject(DataObject *fromObj, std::string_view objPath)=0
Remove a link to another object.
StatusCode unregisterObject(DataObject *pParent, int item)
Unregister object from the data store.
StatusCode addPreLoadItem(std::string itemPath)
Add an item to the preload list.
StatusCode registerObject(DataObject *parentObj, int item, DataObject *pObject)
Register object with the data store.
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
StatusCode unregisterObject(std::string_view parentPath, std::string_view objPath)
Unregister object from the data store.
virtual StatusCode preLoad()=0
Load all preload items of the list.
StatusCode retrieveObject(DataObject *parentObj, int item, DataObject *&pObject)
Retrieve object from data store.
virtual StatusCode updateObject(DataObject *toUpdate)=0
Update object identified by its pointer.
StatusCode registerObject(std::string_view parentPath, int item, DataObject *pObject)
Register object with the data store.
#define STATUSCODE_ENUM_DECL(ENUM)
Declare an enum to be used as StatusCode value.
virtual StatusCode unlinkObject(std::string_view fullPath)=0
Remove a link to another object.
StatusCode unlinkObject(std::string_view fromPath, std::string_view objPath)
Remove a link to another object.
StatusCode updateObject(std::string_view parentPath, std::string_view updatePath)
Update object identified by its parent's path and the path relative to the parent.
StatusCode updateObject(std::string_view fullPath)
Update object identified by its full path in the data store.
Status
Status code definitions.
virtual StatusCode findObject(std::string_view fullPath, DataObject *&pObject)=0
Find object identified by its full path in the data store.
virtual StatusCode linkObject(std::string_view fullPath, DataObject *toObj)=0
Add a link to another object.
IRegistry * registry() const
Get pointer to Registry.
StatusCode retrieveObject(DataObject *parentObj, std::string_view objectPath, DataObject *&pObject)
Retrieve object from data store.
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.
StatusCode findObject(std::string_view parentPath, std::string_view objectPath, DataObject *&pObject)
Find object identified by its parent object and the path to the object relative to the parent.
StatusCode retrieveObject(std::string_view parentPath, std::string_view objectPath, DataObject *&pObject)
Retrieve object from data store.
StatusCode removePreLoadItem(std::string itemPath)
Remove an item from the preload list.