RichCommonBase: Make objectLocation stand alone functions
parent
93c67361
No related branches found
No related tags found
... | ... | @@ -43,6 +43,21 @@ namespace Rich { |
namespace Future { | ||
/** Returns the full location of the container in the Data Store | ||
* | ||
* @param pObj Data object | ||
* | ||
* @return Location of given data object | ||
*/ | ||
template <typename TYPE> | ||
inline auto objectLocation( const TYPE& pObj ) { | ||
return ( pObj.registry() ? pObj.registry()->identifier() : "UnRegistered" ); | ||
} | ||
template <typename TYPE> | ||
inline auto objectLocation( const TYPE* pObj ) { | ||
return ( !pObj ? "Null DataObject !" : objectLocation( *pObj ) ); | ||
} | ||
|
||
//----------------------------------------------------------------------------- | ||
/** @class CommonBase RichCommonBase.h RichFutureKernel/RichCommonBase.h | ||
* | ||
... | ... | @@ -78,16 +93,6 @@ namespace Rich { |
virtual StatusCode finalize() override; | ||
public: | ||
/** Returns the full location of the given object in the Data Store | ||
* | ||
* @param pObj Data object | ||
* | ||
* @return Location of given data object | ||
*/ | ||
inline std::string objectLocation( const DataObject* pObj ) const { | ||
return ( !pObj ? "Null DataObject !" : ( pObj->registry() ? pObj->registry()->identifier() : "UnRegistered" ) ); | ||
} | ||
/** @brief Forced release of a particular tool | ||
* | ||
* Tools are automatically released during finalisation, so this method | ||
... | ... |