1 #ifndef GAUDIKERNEL_IDATAPROVIDERSVC_H 2 #define GAUDIKERNEL_IDATAPROVIDERSVC_H 8 #include "boost/utility/string_ref.hpp" 63 return registerObject(
nullptr, fullPath, pObject );
74 virtual StatusCode registerObject( boost::string_ref parentPath, boost::string_ref objectPath,
86 return registerObject( parentPath, itemToPath( item ), pObject );
108 return registerObject( parentObj, itemToPath( item ), pObject );
124 virtual StatusCode unregisterObject( boost::string_ref 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( boost::string_ref 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 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...
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 unlinkObject(boost::string_ref fromPath, boost::string_ref objPath)
Remove a link to another object.
#define STATUSCODE_ENUM_DECL(ENUM)
Declare an enum to be used as StatusCode value.
StatusCode retrieveObject(boost::string_ref parentPath, boost::string_ref objectPath, DataObject *&pObject)
Retrieve object from data store.
Status
Status code definitions.
StatusCode retrieveObject(DataObject *parentObj, boost::string_ref objectPath, DataObject *&pObject)
Retrieve object from data store.
Data provider interface definition.
Description of the DataStoreItem class.
StatusCode updateObject(DataObject *pParent, boost::string_ref updatePath)
Update object identified by its parent's pointer and the path relative to the parent.
IRegistry * registry() const
Get pointer to Registry.
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...
StatusCode linkObject(boost::string_ref fromPath, boost::string_ref objPath, DataObject *toObj)
Add a link to another object.
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...
This class is used for returning status codes from appropriate routines.
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
StatusCode updateObject(boost::string_ref fullPath)
Update object identified by its full path in the data store.
Definition of the basic interface.
StatusCode addPreLoadItem(std::string itemPath)
Add an item to the preload list.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
StatusCode retrieveObject(boost::string_ref fullPath, DataObject *&pObject)
Retrieve object identified by its full path from the data store.
StatusCode retrieveObject(DataObject *parentObj, int item, DataObject *&pObject)
Retrieve object from data store.
StatusCode registerObject(boost::string_ref fullPath, DataObject *pObject)
Register object with the data store.
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.
StatusCode unregisterObject(DataObject *pParent, int item)
Unregister object from the data store.
StatusCode unregisterObject(boost::string_ref parentPath, boost::string_ref objPath)
Unregister object from the data store.
Opaque address interface definition.
StatusCode retrieveObject(boost::string_ref parentPath, int item, DataObject *&pObject)
Retrieve object from data store.
A DataObject is the base class of any identifiable object on any data store.
StatusCode unregisterObject(boost::string_ref parentPath, int item)
Unregister object from the data store.
StatusCode removePreLoadItem(std::string itemPath)
Remove an item from the preload list.
unsigned long code_t
type of StatusCode value
StatusCode registerObject(boost::string_ref parentPath, int item, DataObject *pObject)
Register object with the data store.