Go to the documentation of this file.
17 #include <string_view>
52 static inline std::string
itemToPath(
int item ) {
return '/' + std::to_string( item ); }
68 return registerObject(
nullptr, fullPath, pObject );
91 return registerObject( parentPath, itemToPath( item ), pObject );
113 return registerObject( parentObj, itemToPath( item ), pObject );
147 StatusCode status = findObject( parentPath, pO );
148 return status.
isSuccess() ? unregisterObject( pO, objPath ) : status;
166 return unregisterObject( parentPath, itemToPath( item ) );
215 return unregisterObject( pParent, itemToPath( item ) );
239 return retrieveObject(
static_cast<IRegistry*
>(
nullptr ), fullPath, pObject );
254 StatusCode status = retrieveObject( parentPath, parent );
255 return status.
isSuccess() ? retrieveObject( parent, objectPath, pObject ) : status;
269 return retrieveObject( parentPath, itemToPath( item ), pObject );
283 return retrieveObject( parentObj ? parentObj->
registry() :
nullptr, objectPath, pObject );
297 return retrieveObject( parentObj, itemToPath( item ), pObject );
331 StatusCode status = findObject( parentPath, parent );
332 return status.
isSuccess() ? findObject( parent, objectPath, pObject ) : status;
344 return findObject( parentPath, itemToPath( item ), pObject );
357 return findObject( parentObj ? parentObj->
registry() :
nullptr, objectPath, pObject );
369 return findObject( parentObj, itemToPath( item ), pObject );
387 StatusCode status = findObject( fullPath, pO );
388 return status.
isSuccess() ? updateObject( pO ) : retrieveObject( fullPath, pO );
409 StatusCode status = findObject( parentPath, pParent );
410 return status.
isSuccess() ? updateObject( pParent, updatePath ) : status;
423 StatusCode status = findObject( pParent, updatePath, pObject );
424 return status.
isSuccess() ? updateObject( pObject ) : status;
439 return addPreLoadItem(
DataStoreItem( std::move( itemPath ), 1 ) );
453 return removePreLoadItem(
DataStoreItem( std::move( itemPath ), 1 ) );
486 StatusCode status = retrieveObject( fromPath, pO );
487 return status.
isSuccess() ? linkObject( pO->
registry(), objPath, toObj ) : status;
529 StatusCode status = findObject( fromPath, pObject );
530 return status.
isSuccess() ? unlinkObject( pObject->
registry(), objPath ) : status;
555 IDataProviderSvc_NO_ERROR = 1,
587 IRegistry* from_entry = fromObj->registry();
588 if ( from_entry )
return linkObject( from_entry, objPath, toObj );
590 return Status::INVALID_PARENT;
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 i.e.
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.