2 #ifndef GAUDIKERNEL_IUPDATEMANAGERSVC_H
3 #define GAUDIKERNEL_IUPDATEMANAGERSVC_H 1
11 #include "GaudiKernel/IInterface.h"
15 class ValidDataObject;
19 namespace Gaudi {
class Time; }
37 virtual const std::type_info &
type()
const = 0;
53 template <
class CallerClass>
77 virtual const std::type_info &
type()
const {
return typeid(CallerClass); }
97 return dynamic_cast<ValidDataObject*
>(
m_instance);
134 virtual bool isNull() = 0;
144 template<
class ActualType>
158 *
m_storage =
dynamic_cast<dest_type *
>(obj);
192 template <
class CallerClass>
193 inline void registerCondition(CallerClass *instance,
const std::string &condition =
"",
198 template <
class CallerClass,
class CondType>
199 inline void registerCondition(CallerClass *instance,
const std::string &condition,
201 CondType *&condPtrDest){
207 template <
class CallerClass>
208 inline void registerCondition(CallerClass *instance,
const char *condition,
216 template <
class CallerClass,
class ObjectClass>
217 inline void registerCondition(CallerClass *instance, ObjectClass *obj,
225 template <
class CallerClass>
226 inline void unregister(CallerClass *instance) {
227 i_unregister(dynamic_cast<void*>(instance));
232 template <
class CallerClass>
233 inline void invalidate(CallerClass *instance) {i_invalidate(dynamic_cast<void*>(instance));}
242 virtual void setValidity(
const std::string
path,
244 bool path_to_db =
false) = 0;
255 template <
class CallerClass>
257 return i_update(dynamic_cast<void*>(instance));
261 virtual void dump() = 0;
264 virtual void acquireLock() = 0;
266 virtual void releaseLock() = 0;
271 virtual void purge() = 0;
285 virtual StatusCode i_update(
void *instance) = 0;
286 virtual void i_unregister(
void *instance) = 0;
287 virtual void i_invalidate(
void *instance) = 0;
289 friend class PythonHelper;
294 #endif // GAUDIKERNEL_IUPDATEMANAGERSVC_H
virtual DataObject * castToDataObject() const =0
dest_type ** m_storage
pointer to the pointer to fill provided by the user.
MemberFunctionType m_memberFunction
Pointer to the member function.
virtual bool isNull()=0
tells if the internal pointer is NULL.
virtual ~BasePtrSetter()
Empty virtual destructor.
Base class to set the pointer to an object of a class derived from DataObject in a generic way...
virtual void * castToVoid() const =0
CallerClass * m_instance
Pointer to the object.
virtual ~ObjectMemberFunction()
Virtual destructor.
virtual ~BaseObjectMemberFunction()
Virtual destructor.
Templated specialization of BasePtrSetter.
virtual bool match(BaseObjectMemberFunction *) const =0
Data provider interface definition.
virtual BaseObjectMemberFunction * makeCopy() const =0
virtual void set(DataObject *obj)
sets the internal pointer to the provided data object (with a dynamic_cast).
virtual StatusCode operator()() const =0
This class is used for returning status codes from appropriate routines.
virtual bool match(BaseObjectMemberFunction *bmf) const
Comparison between two BaseObjectMemberFunction instances.
Definition of the basic interface.
virtual ValidDataObject * castToValidDataObject() const
Cast the object to ValidDataObject.
virtual void set(DataObject *)=0
sets the internal pointer to the provided data object (with a dynamic_cast).
Interface class to the Update Manager service.
#define DeclareInterfaceID(name, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
virtual const std::type_info & type() const =0
virtual DataObject * castToDataObject() const
Cast the object to DataObject.
PtrSetter(dest_type *&dest)
Construct a new object using the destination pointer.
ObjectMemberFunction(CallerClass *instance, const MemberFunctionType &mf)
Standard constructor. Protected so that can be called only by itself or IUpdateManagerSvc.
This class is used by IUpdateManagerSvc to keep pairs made of a member function and a pointer to the ...
virtual ~PtrSetter()
Empty virtual destructor.
virtual bool isNull()
tells if the internal pointer is NULL.
virtual const std::type_info & type() const
Returns the type_info of the CallerClass.
A DataObject is the base class of any identifiable object on any data store.
virtual StatusCode operator()() const
Calls the member function of the object and returns the StatusCode.
virtual ValidDataObject * castToValidDataObject() const =0
Helper functions to set/get the application return code.
Base class of ObjectMemberFunction.
StatusCode(CallerClass::* MemberFunctionType)()
MemberFunctionType is the type for a pointer to a member function of class CallerClass.
virtual void * castToVoid() const
Cast the object to void with dynamic_cast.
virtual BaseObjectMemberFunction * makeCopy() const
Clone method to be able to copy an ObjectMemberFunction from the BaseObjectMemberFunction interface...