Go to the documentation of this file.
11 #ifndef GAUDIKERNEL_IINSPECTOR_H
12 #define GAUDIKERNEL_IINSPECTOR_H
30 enum { Mutable = 1 << 1, Const = 1 << 2 };
41 void*
ptr() {
return m_P; }
42 const void*
ptr()
const {
return m_P; }
43 virtual long size()
const = 0;
59 _V(
const T&
v ) : m_O(
v ) { m_P = &m_O; }
60 virtual long size()
const {
return sizeof( T ); }
61 virtual void construct(
void* b )
const { ::new ( b ) T(); }
67 _TT() :
Tag( sizeof( T ), typeid( T ) ) {}
84 const void* pOwner,
const Tag& otag,
const std::string& comment ) = 0;
89 template <
class T,
class O>
91 return inspectByRef( pObj,
_TT<T>(), (
void*)pOwner,
_TT<O>(), comment, flag );
94 template <
class T,
class O>
96 return inspectByValue(
new _V<T>( obj ),
_TT<T>(), (
void*)pOwner,
_TT<O>(), comment );
99 template <
class T,
class O>
101 typedef typename T::value_type _VVV;
102 typedef typename T::value_type _TTT;
108 template <
class T,
class O>
110 typedef typename T::value_type _VVV;
111 typedef typename T::value_type _TTT;
117 #endif // GAUDIKERNEL_IINSPECTOR_H
virtual long size() const
virtual ~IValue()=default
virtual long size() const =0
virtual StatusCode inspectByValue(IValue *pObj, const Tag &typ, void *pOwner, const Tag &oTag, const std::string &comment)=0
Inspect object by Value.
DeclareInterfaceID(IInspector, 1, 0)
InterfaceID.
StatusCode inspectContByValue(const T &obj, const O *pOwner, const std::string &comment)
Inspect container of object items by its value (const)
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 void construct(void *b) const
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.
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)
StatusCode inspectByRef(const T *pObj, const O *pOwner, const std::string &comment, long flag=Mutable)
Inspect single item by its reference (mutable and const)
Tag(long f, const std::type_info &s)
const std::type_info & second
virtual void construct(void *buffer) const =0
StatusCode inspectByValue(const T &obj, const O *pOwner, const std::string &comment)
Inspect single item by its value (const)
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.