52 static inline std::string
itemToPath(
int item ) {
return '/' + std::to_string( item ); }
357 return findObject( parentObj ? parentObj->
registry() :
nullptr, objectPath, pObject );
587 IRegistry* from_entry = fromObj->registry();
588 if ( from_entry )
return linkObject( from_entry, objPath, toObj );
#define STATUSCODE_ENUM_DECL(ENUM)
Declare an enum to be used as StatusCode value.
A DataObject is the base class of any identifiable object on any data store.
IRegistry * registry() const
Get pointer to Registry.
Description of the DataStoreItem class.
StatusCode linkObject(IRegistry *from, std::string_view objPath, DataObject *to) override
Add a link to another object.
Data provider interface definition.
StatusCode retrieveObject(std::string_view fullPath, DataObject *&pObject)
Retrieve object identified by its full path from the data store.
static std::string itemToPath(int item)
Helper function to convert item numbers to path strings i.e.
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.
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
virtual StatusCode updateObject(DataObject *toUpdate)=0
Update object identified by its pointer.
virtual StatusCode registerObject(std::string_view parentPath, std::string_view objectPath, DataObject *pObject)=0
Register object with the data store.
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 unlinkObject(DataObject *fromObj, std::string_view objPath)=0
Remove a link to another object.
virtual StatusCode linkObject(std::string_view fullPath, DataObject *toObj)=0
Add a link to another object.
StatusCode retrieveObject(std::string_view parentPath, std::string_view objectPath, DataObject *&pObject)
Retrieve object from data store.
StatusCode unregisterObject(DataObject *pParent, int item)
Unregister object from the data store.
StatusCode registerObject(std::string_view parentPath, int item, 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.
StatusCode addPreLoadItem(std::string itemPath)
Add an item to the preload list.
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 findObject(std::string_view fullPath, DataObject *&pObject)=0
Find object identified by its full path in the data store.
virtual StatusCode updateObject(IRegistry *pDirectory)=0
Update object identified by its directory entry.
StatusCode updateObject(std::string_view fullPath)
Update object identified by its full path in the data store.
virtual StatusCode unregisterObject(DataObject *pParent, std::string_view objPath)=0
Unregister object from the data store.
StatusCode retrieveObject(DataObject *parentObj, std::string_view objectPath, DataObject *&pObject)
Retrieve object from data store.
virtual StatusCode unlinkObject(std::string_view fullPath)=0
Remove a link to another object.
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.
virtual StatusCode addPreLoadItem(const DataStoreItem &item)=0
Add an item to the preload list.
virtual StatusCode unlinkObject(IRegistry *from, std::string_view objPath)=0
Remove a link to another object.
StatusCode registerObject(DataObject *parentObj, int item, DataObject *pObject)
Register object with the data store.
virtual StatusCode removePreLoadItem(const DataStoreItem &item)=0
Remove an item from the preload list.
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.
virtual StatusCode resetPreLoad()=0
Clear the preload list.
StatusCode unregisterObject(std::string_view parentPath, std::string_view objPath)
Unregister object from the data store.
Status
Status code definitions.
@ IDataProviderSvc_NO_ERROR
Success.
@ NO_DATA_LOADER
No data loader available.
@ INVALID_OBJ_ADDR
Invalid object address.
@ INVALID_OBJECT
Object pointer is invalid.
@ NO_MORE_LEVELS
Automatic data loading had to stop: maximum depth.
@ INVALID_OBJ_PATH
Invalid path from root to object request failed.
@ INVALID_ROOT
Invalid root path object cannot be retrieved or stored.
@ INVALID_PARENT
Pointer to parent object is not valid.
@ DOUBL_OBJ_PATH
The path for this objects is already in use.
@ OBJ_NOT_LOADED
Sorry, the requested object is not loaded.
@ NO_ACCESS
Access to the requested leaf is inhibited.
@ DIR_NOT_EMPTY
Directory entry is NOT empty.
virtual StatusCode unregisterObject(DataObject *pObject)=0
Unregister object from the data store.
StatusCode removePreLoadItem(std::string itemPath)
Remove an item from the preload list.
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.
virtual StatusCode preLoad()=0
Load all preload items of the list.
StatusCode unlinkObject(std::string_view fromPath, std::string_view objPath)
Remove a link to another object.
DeclareInterfaceID(IDataProviderSvc, 4, 0)
InterfaceID.
virtual StatusCode registerObject(DataObject *parentObj, std::string_view objectPath, DataObject *pObject)=0
Register object with the data store.
StatusCode retrieveObject(DataObject *parentObj, int item, DataObject *&pObject)
Retrieve object from data store.
StatusCode retrieveObject(std::string_view parentPath, int item, DataObject *&pObject)
Retrieve object from data store.
StatusCode linkObject(std::string_view fromPath, std::string_view objPath, DataObject *toObj)
Add a link to another object.
StatusCode updateObject(DataObject *pParent, std::string_view updatePath)
Update object identified by its parent's pointer and the path relative to the parent.
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.
Definition of the basic interface.
Opaque address interface definition.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
This class is used for returning status codes from appropriate routines.
unsigned long code_t
type of StatusCode value