The Gaudi Framework  master (bdbe7744)
Loading...
Searching...
No Matches
IInspector Class Referenceabstract

Inspector base class. More...

#include <GaudiKernel/IInspector.h>

Inheritance diagram for IInspector:
Collaboration diagram for IInspector:

Classes

class  IValue
struct  Tag
class  _V
class  _TT

Public Types

enum  { Mutable = 1 << 1 , Const = 1 << 2 }
Public Types inherited from IInterface
enum class  Status : StatusCode::code_t {
  FAILURE = 0 , SUCCESS = 1 , NO_INTERFACE , VERSMISMATCH ,
  LAST_ERROR
}
 Return status. More...
using iid = Gaudi::InterfaceId<IInterface, 0, 0>
 Interface ID.
using ext_iids = Gaudi::interface_list<iid>
 Extra interfaces.

Public Member Functions

 DeclareInterfaceID (IInspector, 1, 0)
 InterfaceID.
template<class T, class O>
StatusCode inspectByRef (const T *pObj, const O *pOwner, const std::string &comment, long flag=Mutable)
 Inspect single item by its reference (mutable and const).
template<class T, class O>
StatusCode inspectByValue (const T &obj, const O *pOwner, const std::string &comment)
 Inspect single item by its value (const).
template<class T, class O>
StatusCode inspectContByRef (const T *pObj, const O *pOwner, const std::string &comment, long flag=Mutable)
 Inspect container of object items by its reference (mutable and const).
template<class T, class O>
StatusCode inspectContByValue (const T &obj, const O *pOwner, const std::string &comment)
 Inspect container of object items by its value (const).
Public Member Functions inherited from IInterface
template<Gaudi::IsInterface TARGET>
TARGET * cast ()
template<Gaudi::IsInterface TARGET>
TARGET const * cast () const
template<typename TARGET>
requires ( !Gaudi::IsInterface<TARGET> )
TARGET * cast ()
template<typename TARGET>
requires ( !Gaudi::IsInterface<TARGET> )
TARGET const * cast () const
virtual std::vector< std::string > getInterfaceNames () const =0
 Returns a vector of strings containing the names of all the implemented interfaces.
virtual unsigned long addRef () const =0
 Increment the reference count of Interface instance.
virtual unsigned long release () const =0
 Release Interface instance.
virtual unsigned long refCount () const =0
 Current reference count.
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)=0
 Set the void** to the pointer to the requested interface of the instance.
virtual ~IInterface ()=default
 Virtual destructor.
virtual void const * i_cast (const InterfaceID &) const =0
void * i_cast (const InterfaceID &iidiid)

Protected Member Functions

virtual StatusCode inspectByRef (const void *pObj, const Tag &typ, void *pOwner, const Tag &otag, const std::string &comment, long flag)=0
 Inspect object by Reference.
virtual StatusCode inspectByValue (IValue *pObj, const Tag &typ, void *pOwner, const Tag &oTag, const std::string &comment)=0
 Inspect object by Value.
virtual StatusCode inspectContByRef (const void *pObj, const Tag &tag, const Tag &rtag, const Tag &vtag, const void *pOwner, const Tag &otag, const std::string &comment, long flags)=0
 Inspect container of objects by reference.
virtual StatusCode inspectContByValue (IValue *pObj, const Tag &tag, const Tag &rtag, const Tag &vtag, const void *pOwner, const Tag &otag, const std::string &comment)=0
 Inspect container of objects by value.
Protected Member Functions inherited from IInterface
virtual unsigned long decRef () const =0
 Decrement reference count and return the new reference count.

Additional Inherited Members

Static Public Member Functions inherited from IInterface
static const InterfaceID & interfaceID ()
 Return an instance of InterfaceID identifying the interface.

Detailed Description

Inspector base class.

Definition at line 21 of file IInspector.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Mutable 
Const 

Definition at line 26 of file IInspector.h.

26{ Mutable = 1 << 1, Const = 1 << 2 };

Member Function Documentation

◆ DeclareInterfaceID()

IInspector::DeclareInterfaceID ( IInspector ,
1 ,
0  )

◆ inspectByRef() [1/2]

template<class T, class O>
StatusCode IInspector::inspectByRef ( const T * pObj,
const O * pOwner,
const std::string & comment,
long flag = Mutable )
inline

Inspect single item by its reference (mutable and const).

Definition at line 86 of file IInspector.h.

86 {
87 return inspectByRef( pObj, _TT<T>(), (void*)pOwner, _TT<O>(), comment, flag );
88 }
virtual StatusCode inspectByRef(const void *pObj, const Tag &typ, void *pOwner, const Tag &otag, const std::string &comment, long flag)=0
Inspect object by Reference.

◆ inspectByRef() [2/2]

virtual StatusCode IInspector::inspectByRef ( const void * pObj,
const Tag & typ,
void * pOwner,
const Tag & otag,
const std::string & comment,
long flag )
protectedpure virtual

Inspect object by Reference.

◆ inspectByValue() [1/2]

template<class T, class O>
StatusCode IInspector::inspectByValue ( const T & obj,
const O * pOwner,
const std::string & comment )
inline

Inspect single item by its value (const).

Definition at line 91 of file IInspector.h.

91 {
92 return inspectByValue( new _V<T>( obj ), _TT<T>(), (void*)pOwner, _TT<O>(), comment );
93 }
virtual StatusCode inspectByValue(IValue *pObj, const Tag &typ, void *pOwner, const Tag &oTag, const std::string &comment)=0
Inspect object by Value.

◆ inspectByValue() [2/2]

virtual StatusCode IInspector::inspectByValue ( IValue * pObj,
const Tag & typ,
void * pOwner,
const Tag & oTag,
const std::string & comment )
protectedpure virtual

Inspect object by Value.

◆ inspectContByRef() [1/2]

template<class T, class O>
StatusCode IInspector::inspectContByRef ( const T * pObj,
const O * pOwner,
const std::string & comment,
long flag = Mutable )
inline

Inspect container of object items by its reference (mutable and const).

Definition at line 96 of file IInspector.h.

96 {
97 using _VVV = typename T::value_type;
98 using _TTT = typename T::value_type;
99 // Unfortunately this is not implemented on G++:
100 // using _TTT = typename T::allocator_type::value_type;
101 return inspectContByRef( (void*)pObj, _TT<T>(), _TT<_VVV>(), _TT<_TTT>(), (void*)pOwner, _TT<O>(), comment, flag );
102 }
virtual StatusCode inspectContByRef(const void *pObj, const Tag &tag, const Tag &rtag, const Tag &vtag, const void *pOwner, const Tag &otag, const std::string &comment, long flags)=0
Inspect container of objects by reference.

◆ inspectContByRef() [2/2]

virtual StatusCode IInspector::inspectContByRef ( const void * pObj,
const Tag & tag,
const Tag & rtag,
const Tag & vtag,
const void * pOwner,
const Tag & otag,
const std::string & comment,
long flags )
protectedpure virtual

Inspect container of objects by reference.

◆ inspectContByValue() [1/2]

template<class T, class O>
StatusCode IInspector::inspectContByValue ( const T & obj,
const O * pOwner,
const std::string & comment )
inline

Inspect container of object items by its value (const).

Definition at line 105 of file IInspector.h.

105 {
106 using _VVV = typename T::value_type;
107 using _TTT = typename T::value_type;
108 // Unfortunately this is not implemented on G++:
109 // using _TTT = typename T::allocator_type::value_type;
110 return inspectContByValue( new _V<T>( obj ), _TT<T>(), _TT<_VVV>(), _TT<_TTT>(), (void*)pOwner, _TT<O>(), comment );
111 }
virtual StatusCode inspectContByValue(IValue *pObj, const Tag &tag, const Tag &rtag, const Tag &vtag, const void *pOwner, const Tag &otag, const std::string &comment)=0
Inspect container of objects by value.

◆ inspectContByValue() [2/2]

virtual StatusCode IInspector::inspectContByValue ( IValue * pObj,
const Tag & tag,
const Tag & rtag,
const Tag & vtag,
const void * pOwner,
const Tag & otag,
const std::string & comment )
protectedpure virtual

Inspect container of objects by value.


The documentation for this class was generated from the following file: