ATLAS Offline Software
Loading...
Searching...
No Matches
CallBackID.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef SGTOOLS_CALLBACKID_H
6#define SGTOOLS_CALLBACKID_H
7
8/*****************************************************************************
9 *
10 * CallBackID.h
11 * IOVSvc
12 *
13 * Author: Charles Leggett
14 * $Id: CallBackID.h,v 1.3 2005-11-08 22:01:30 ssnyder Exp $
15 *
16 * Provides means to identify a callback function.
17 *
18 *****************************************************************************/
19
20#ifndef ATHENAKERNEL_IOVSVCDEFS_H
22#endif
23
25public:
27
28 template<typename T>
29 CallBackID(StatusCode (T::*updF)(IOVSVC_CALLBACK_ARGS), const T *obj) {
30 set(updF,obj);
31 }
32
33 template<typename T>
34 void set(StatusCode (T::*updF)(IOVSVC_CALLBACK_ARGS), const T *obj);
35
36 const std::string& name() const { return m_name; }
37 const std::string& objName() const { return m_objName; }
38 int offset() const { return m_offset; }
39 const void* ptr() const { return p_obj; }
40
41 bool operator==(const CallBackID& cb) const {
42 return ( cb.m_offset == m_offset && cb.p_obj == p_obj );
43 }
44 bool operator<(const CallBackID& cb) const {
45 if ( p_obj != cb.p_obj ) {
46 return ( p_obj < cb.p_obj ) ;
47 } else {
48 return ( m_offset < cb.m_offset );
49 }
50 }
51
52private:
54 const void* p_obj;
55
56 std::string m_name;
57 std::string m_objName;
58
59};
60
61#ifndef SGTOOLS_CALLBACKID_ICC
62 #include "SGTools/CallBackID.icc"
63#endif
64
65#endif
defines and typedefs for IOVSvc
#define IOVSVC_CALLBACK_ARGS
short hand for IOVSvc call back argument list, to be used when no access to formal arguments is neede...
Definition IOVSvcDefs.h:24
bool operator==(const CallBackID &cb) const
Definition CallBackID.h:41
const void * ptr() const
Definition CallBackID.h:39
CallBackID(StatusCode(T::*updF)(IOVSVC_CALLBACK_ARGS), const T *obj)
Definition CallBackID.h:29
std::string m_objName
Definition CallBackID.h:57
const std::string & objName() const
Definition CallBackID.h:37
long m_offset
Definition CallBackID.h:53
int offset() const
Definition CallBackID.h:38
std::string m_name
Definition CallBackID.h:56
const std::string & name() const
Definition CallBackID.h:36
const void * p_obj
Definition CallBackID.h:54
void set(StatusCode(T::*updF)(IOVSVC_CALLBACK_ARGS), const T *obj)
bool operator<(const CallBackID &cb) const
Definition CallBackID.h:44