EventAnalysis  1.3.0
Public Member Functions | Protected Attributes | List of all members
EA::ObjectWrapperTImpl< void > Class Template Reference

Specialization of ObjectWrapperTImpl for void. More...

#include <ObjectWrapperT.h>

Inheritance diagram for EA::ObjectWrapperTImpl< void >:
EA::ObjectWrapperBase

Public Member Functions

 ObjectWrapperTImpl (void *dataObjPtr, const std::type_info &type, bool isPolymorphic, bool isConst)
 Constructor. More...
 
 ObjectWrapperTImpl (const ObjectWrapperTImpl< void > &)
 Copy constructor. More...
 
bool IsPolymorphic ()
 Test for polymorphic wrapped object. More...
 
bool IsConst ()
 Test for const wrapped object. More...
 
const std::type_info & GetObjType ()
 Returns the type of the wrapped object. More...
 
void WrapNothing ()
 Remove the wrapped object. More...
 
bool WrapsSomething ()
 Checks if the wrapper wraps something. More...
 
void * GetObjAddress ()
 Getter for raw pointer to the wrapped object. More...
 
bool WrapObject (void *address, const std::type_info &type, bool own, bool isPolymorphic, bool isConst)
 Wrap the object at the given address. More...
 
- Public Member Functions inherited from EA::ObjectWrapperBase
virtual ~ObjectWrapperBase ()
 Destructor. More...
 
virtual std::unique_ptr< ObjectWrapperBaseCloneObject ()=0
 Clones the wrapped object and wraps it. More...
 
virtual std::unique_ptr< ObjectWrapperBaseCloneWrapper ()=0
 Clones the wrapper. More...
 

Protected Attributes

void * _dataObjPtr
 
const std::type_info & _type
 
bool _isPolymorphic
 
bool _isConst
 

Additional Inherited Members

- Protected Member Functions inherited from EA::ObjectWrapperBase
 ObjectWrapperBase ()
 Constructor. More...
 

Detailed Description

template<>
class EA::ObjectWrapperTImpl< void >

Specialization of ObjectWrapperTImpl for void.

This specialization of ObjectWrapperTImpl can be used to wrap those objects whose type is completely unknown at compile time.

Constructor & Destructor Documentation

◆ ObjectWrapperTImpl() [1/2]

EA::ObjectWrapperTImpl< void >::ObjectWrapperTImpl ( void *  dataObjPtr,
const std::type_info &  type,
bool  isPolymorphic,
bool  isConst 
)
inline

Constructor.

Constructs a wrapper holding a pointer to data object passed as first argument. The wrapper will not own the object.

Parameters
dataObjPtrpointer to the data object to be wrapped.

◆ ObjectWrapperTImpl() [2/2]

EA::ObjectWrapperTImpl< void >::ObjectWrapperTImpl ( const ObjectWrapperTImpl< void > &  original)

Copy constructor.

Member Function Documentation

◆ GetObjAddress()

void* EA::ObjectWrapperTImpl< void >::GetObjAddress ( )
inlinevirtual

Getter for raw pointer to the wrapped object.

Returns
the address of the wrapped object.

Implements EA::ObjectWrapperBase.

◆ GetObjType()

const std::type_info& EA::ObjectWrapperTImpl< void >::GetObjType ( )
inlinevirtual

Returns the type of the wrapped object.

Returns
The type of the wrapped object.

Implements EA::ObjectWrapperBase.

◆ IsConst()

bool EA::ObjectWrapperTImpl< void >::IsConst ( )
inlinevirtual

Test for const wrapped object.

Returns
true if the wrapped object is constant.

Implements EA::ObjectWrapperBase.

◆ IsPolymorphic()

bool EA::ObjectWrapperTImpl< void >::IsPolymorphic ( )
inlinevirtual

Test for polymorphic wrapped object.

Returns
true if the wrapped object is of a polymorphic class.

Implements EA::ObjectWrapperBase.

◆ WrapNothing()

void EA::ObjectWrapperTImpl< void >::WrapNothing ( )
inlinevirtual

Remove the wrapped object.

Makes the wrapper wrap no object. An eventual previously wrapped object will be deleted if the object is owned by the wrapper.

Implements EA::ObjectWrapperBase.

◆ WrapObject()

bool EA::ObjectWrapperTImpl< void >::WrapObject ( void *  address,
const std::type_info &  type,
bool  own,
bool  isPolymorphic,
bool  isConst 
)
virtual

Wrap the object at the given address.

Set the wrapped object. This method should be used only in those rare cases where the object is available only through a void*. Type check is enforced through the #type argument.

Parameters
addressThe address of the object to be wrapped.
typeThe type of the object at the given address.
ownIf true then the wrapper will own the wrapped object.
isPolymorhicSet to true for objects of polymorphic classes.
isCopnstSet to true for constant objects.
Returns
true if the object at the given address has been correctly wrapped.

Implements EA::ObjectWrapperBase.

◆ WrapsSomething()

bool EA::ObjectWrapperTImpl< void >::WrapsSomething ( )
inlinevirtual

Checks if the wrapper wraps something.

Returns
true if the wrapped pointer is not nullptr.

Implements EA::ObjectWrapperBase.

Member Data Documentation

◆ _dataObjPtr

void* EA::ObjectWrapperTImpl< void >::_dataObjPtr
protected

◆ _isConst

bool EA::ObjectWrapperTImpl< void >::_isConst
protected

◆ _isPolymorphic

bool EA::ObjectWrapperTImpl< void >::_isPolymorphic
protected

◆ _type

const std::type_info& EA::ObjectWrapperTImpl< void >::_type
protected

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