1 #ifndef GAUDIKERNEL_IDATAPROVIDERSVC_H 2 #define GAUDIKERNEL_IDATAPROVIDERSVC_H 63 return registerObject(
nullptr, fullPath, pObject );
74 virtual StatusCode registerObject( std::string_view parentPath, std::string_view objectPath,
86 return registerObject( parentPath, itemToPath( item ), pObject );
108 return registerObject( parentObj, itemToPath( item ), pObject );
124 virtual StatusCode unregisterObject( std::string_view fullPath ) = 0;
142 StatusCode status = findObject( parentPath, pO );
143 return status.
isSuccess() ? unregisterObject( pO, objPath ) : status;
161 return unregisterObject( parentPath, itemToPath( item ) );
210 return unregisterObject( pParent, itemToPath( item ) );
234 return retrieveObject( static_cast<IRegistry*>(
nullptr ), fullPath, pObject );
249 StatusCode status = retrieveObject( parentPath, parent );
250 return status.
isSuccess() ? retrieveObject( parent, objectPath, pObject ) : status;
264 return retrieveObject( parentPath, itemToPath( item ), pObject );
278 return retrieveObject( parentObj ? parentObj->
registry() :
nullptr, objectPath, pObject );
292 return retrieveObject( parentObj, itemToPath( item ), pObject );
326 StatusCode status = findObject( parentPath, parent );
327 return status.
isSuccess() ? findObject( parent, objectPath, pObject ) : status;
339 return findObject( parentPath, itemToPath( item ), pObject );
352 return findObject( parentObj ? parentObj->
registry() :
nullptr, objectPath, pObject );
364 return findObject( parentObj, itemToPath( item ), pObject );
382 StatusCode status = findObject( fullPath, pO );
383 return status.
isSuccess() ? updateObject( pO ) : retrieveObject( fullPath, pO );
404 StatusCode status = findObject( parentPath, pParent );
405 return status.
isSuccess() ? updateObject( pParent, updatePath ) : status;
418 StatusCode status = findObject( pParent, updatePath, pObject );
419 return status.
isSuccess() ? updateObject( pObject ) : status;
481 StatusCode status = retrieveObject( fromPath, pO );
482 return status.
isSuccess() ? linkObject( pO->
registry(), objPath, toObj ) : status;
524 StatusCode status = findObject( fromPath, pObject );
525 return status.
isSuccess() ? unlinkObject( pObject->
registry(), objPath ) : status;
545 virtual StatusCode unlinkObject( std::string_view fullPath ) = 0;
550 IDataProviderSvc_NO_ERROR = 1,
582 IRegistry* from_entry = fromObj->registry();
583 if ( from_entry )
return linkObject( from_entry, objPath, toObj );
585 return Status::INVALID_PARENT;
588 #endif // GAUDIKERNEL_IDATAPROVIDERSVC_H StatusCode retrieveObject(std::string_view parentPath, int item, DataObject *&pObject)
Retrieve object from data store.
IRegistry * registry() const
Get pointer to Registry.
StatusCode findObject(DataObject *parentObj, int item, DataObject *&pObject)
Find object identified by its parent object and an integer identifier in the data store.
StatusCode registerObject(DataObject *parentObj, int item, DataObject *pObject)
Register object with the data store.
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings.
StatusCode updateObject(DataObject *pParent, std::string_view updatePath)
Update object identified by its parent's pointer and the path relative to the parent.
StatusCode unlinkObject(std::string_view fromPath, std::string_view objPath)
Remove a link to another object.
Status
Status code definitions.
Data provider interface definition.
StatusCode registerObject(std::string_view parentPath, int item, DataObject *pObject)
Register object with the data store.
Description of the DataStoreItem class.
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.
#define STATUSCODE_ENUM_DECL(ENUM)
Declare an enum to be used as StatusCode value.
This class is used for returning status codes from appropriate routines.
Definition of the basic interface.
StatusCode addPreLoadItem(std::string itemPath)
Add an item to the preload list.
StatusCode retrieveObject(std::string_view parentPath, std::string_view objectPath, DataObject *&pObject)
Retrieve object from 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.
StatusCode updateObject(std::string_view fullPath)
Update object identified by its full path in the data store.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
StatusCode linkObject(std::string_view fromPath, std::string_view objPath, DataObject *toObj)
Add a link to another object.
StatusCode unregisterObject(std::string_view parentPath, int item)
Unregister object from the data store.
StatusCode unregisterObject(std::string_view parentPath, std::string_view objPath)
Unregister object from the data store.
StatusCode retrieveObject(DataObject *parentObj, int item, DataObject *&pObject)
Retrieve object from data store.
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
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 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(DataObject *parentObj, std::string_view objectPath, DataObject *&pObject)
Retrieve object from data store.
StatusCode registerObject(std::string_view fullPath, DataObject *pObject)
Register object with the data store.
StatusCode retrieveObject(std::string_view fullPath, DataObject *&pObject)
Retrieve object identified by its full path from the data store.
StatusCode unregisterObject(DataObject *pParent, int item)
Unregister object from the data store.
Opaque address interface definition.
A DataObject is the base class of any identifiable object on any data store.
StatusCode removePreLoadItem(std::string itemPath)
Remove an item from the preload list.
unsigned long code_t
type of StatusCode value