1 #ifndef GAUDIKERNEL_IDATAPROVIDERSVC_H 2 #define GAUDIKERNEL_IDATAPROVIDERSVC_H 8 #include "boost/utility/string_ref.hpp" 64 return registerObject(
nullptr, fullPath, pObject );
75 virtual StatusCode registerObject( boost::string_ref parentPath, boost::string_ref objectPath,
88 return registerObject( parentPath, itemToPath( item ), pObject );
111 return registerObject( parentObj, itemToPath( item ), pObject );
127 virtual StatusCode unregisterObject( boost::string_ref fullPath ) = 0;
146 StatusCode status = findObject( parentPath, pO );
147 return status.
isSuccess() ? unregisterObject( pO, objPath ) : status;
166 return unregisterObject( parentPath, itemToPath( item ) );
216 return unregisterObject( pParent, itemToPath( item ) );
241 return retrieveObject( static_cast<IRegistry*>(
nullptr ), fullPath, pObject );
257 StatusCode status = retrieveObject( parentPath, parent );
258 return status.
isSuccess() ? retrieveObject( parent, objectPath, pObject ) : status;
273 return retrieveObject( parentPath, itemToPath( item ), pObject );
288 return retrieveObject( parentObj ? parentObj->
registry() :
nullptr, objectPath, pObject );
303 return retrieveObject( parentObj, itemToPath( item ), pObject );
338 StatusCode status = findObject( parentPath, parent );
339 return status.
isSuccess() ? findObject( parent, objectPath, pObject ) : status;
352 return findObject( parentPath, itemToPath( item ), pObject );
366 return findObject( parentObj ? parentObj->
registry() :
nullptr, objectPath, pObject );
379 return findObject( parentObj, itemToPath( item ), pObject );
398 StatusCode status = findObject( fullPath, pO );
399 return status.
isSuccess() ? updateObject( pO ) : retrieveObject( fullPath, pO );
421 StatusCode status = findObject( parentPath, pParent );
422 return status.
isSuccess() ? updateObject( pParent, updatePath ) : status;
436 StatusCode status = findObject( pParent, updatePath, pObject );
437 return status.
isSuccess() ? updateObject( pObject ) : status;
502 StatusCode status = retrieveObject( fromPath, pO );
503 return status.
isSuccess() ? linkObject( pO->
registry(), objPath, toObj ) : status;
546 StatusCode status = findObject( fromPath, pObject );
547 return status.
isSuccess() ? unlinkObject( pObject->
registry(), objPath ) : status;
567 virtual StatusCode unlinkObject( boost::string_ref fullPath ) = 0;
572 IDataProviderSvc_NO_ERROR = 1,
605 IRegistry* from_entry = fromObj->registry();
606 if ( from_entry )
return linkObject( from_entry, objPath, toObj );
608 return Status::INVALID_PARENT;
611 #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.