1 #ifndef GAUDIKERNEL_IUPDATEMANAGERSVC_H 2 #define GAUDIKERNEL_IUPDATEMANAGERSVC_H 1 14 class ValidDataObject;
54 template <
class CallerClass>
122 virtual bool isNull() = 0;
138 template <
class ActualType>
143 void set(
DataObject* obj )
override { *m_storage = dynamic_cast<dest_type*>( obj ); }
144 bool isNull()
override {
return *m_storage ==
nullptr; }
167 template <
class CallerClass>
173 template <
class CallerClass,
class CondType>
176 CondType*& condPtrDest ) {
182 template <
class CallerClass>
191 template <
class CallerClass,
class ObjectClass>
200 template <
class CallerClass>
202 i_unregister( dynamic_cast<void*>( instance ) );
207 template <
class CallerClass>
209 i_invalidate( dynamic_cast<void*>( instance ) );
215 bool path_to_db =
false ) = 0;
222 bool path_to_db =
false ) = 0;
233 template <
class CallerClass>
235 return i_update( dynamic_cast<void*>( instance ) );
239 virtual void dump() = 0;
242 virtual void acquireLock() = 0;
244 virtual void releaseLock() = 0;
249 virtual void purge() = 0;
262 virtual StatusCode i_update(
void* instance ) = 0;
263 virtual void i_unregister(
void* instance ) = 0;
264 virtual void i_invalidate(
void* instance ) = 0;
268 #endif // GAUDIKERNEL_IUPDATEMANAGERSVC_H PtrSetter(dest_type *&dest)
virtual DataObject * castToDataObject() const =0
MemberFunctionType m_memberFunction
Pointer to the member function.
virtual bool isNull()=0
tells if the internal pointer is nullptr.
ValidDataObject * castToValidDataObject() const override
Cast the object to ValidDataObject.
Base class to set the pointer to an object of a class derived from DataObject in a generic way.
virtual void * castToVoid() const =0
bool match(BaseObjectMemberFunction *bmf) const override
Comparison between two BaseObjectMemberFunction instances.
void invalidate(CallerClass *instance)
Invalidate the given object in the dependency network.
Templated specialization of BasePtrSetter.
Abstract interface for a DataSvc manipulating condition data (i.e.
bool isNull() override
tells if the internal pointer is nullptr.
constexpr static const auto SUCCESS
void set(DataObject *obj) override
sets the internal pointer to the provided data object (with a dynamic_cast).
BaseObjectMemberFunction * makeCopy() const override
Clone method to be able to copy an ObjectMemberFunction from the BaseObjectMemberFunction interface.
void unregister(CallerClass *instance)
Generic objects can be unregistered from the UpdateManagerSvc.
virtual bool match(BaseObjectMemberFunction *) const =0
Data provider interface definition.
void registerCondition(CallerClass *instance, ObjectClass *obj, typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf=nullptr)
Like the first version of registerCondition, but instead declaring the dependency on a condition of t...
virtual BaseObjectMemberFunction * makeCopy() const =0
virtual StatusCode operator()() const =0
CallerClass * m_instance
Pointer to the object.
void registerCondition(CallerClass *instance, const std::string &condition, typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf, CondType *&condPtrDest)
This class is used for returning status codes from appropriate routines.
StatusCode(CallerClass::* MemberFunctionType)()
MemberFunctionType is the type for a pointer to a member function of class CallerClass.
Definition of the basic interface.
Helper class implemented in the python dictionary to allow access from python to template member func...
virtual void set(DataObject *)=0
sets the internal pointer to the provided data object (with a dynamic_cast).
void registerCondition(CallerClass *instance, const std::string &condition="", typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf=nullptr)
Register an object (algorithm instance) to the service.
Interface class to the Update Manager service.
virtual const std::type_info & type() const =0
dest_type ** m_storage
pointer to the pointer to fill provided by the user.
#define DeclareInterfaceID(iface, major, minor)
Macro to declare the interface ID when using the new mechanism of extending and implementing interfac...
StatusCode update(CallerClass *instance)
Update the given instance.
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 ~BasePtrSetter()=default
Empty virtual destructor.
virtual ~BaseObjectMemberFunction()=default
Virtual destructor.
DataObject * castToDataObject() const override
Cast the object to DataObject.
void * castToVoid() const override
Cast the object to void with dynamic_cast.
A DataObject is the base class of any identifiable object on any data store.
virtual ValidDataObject * castToValidDataObject() const =0
Header file for std:chrono::duration-based Counters.
void registerCondition(CallerClass *instance, const char *condition, typename ObjectMemberFunction< CallerClass >::MemberFunctionType mf=nullptr)
See above. Needed to avoid conflicts with the next one.
const std::type_info & type() const override
Returns the type_info of the CallerClass.
StatusCode operator()() const override
Calls the member function of the object and returns the StatusCode.
Base class of ObjectMemberFunction.