EventAnalysis
1.3.0
|
Mother class for data wrapper template class. More...
#include <ObjectWrapperBase.h>
Public Member Functions | |
virtual | ~ObjectWrapperBase () |
Destructor. More... | |
virtual std::unique_ptr< ObjectWrapperBase > | CloneObject ()=0 |
Clones the wrapped object and wraps it. More... | |
virtual std::unique_ptr< ObjectWrapperBase > | CloneWrapper ()=0 |
Clones the wrapper. More... | |
virtual const std::type_info & | GetObjType ()=0 |
Returns the type of the wrapped object. More... | |
virtual void | WrapNothing ()=0 |
Remove the wrapped object. More... | |
virtual bool | WrapsSomething ()=0 |
Checks if the wrapper wraps something. More... | |
virtual void * | GetObjAddress ()=0 |
Getter for raw pointer to the wrapped object. More... | |
virtual bool | WrapObject (void *address, const std::type_info &type, bool own, bool isPolymorphic, bool isConst)=0 |
Wrap the object at the given address. More... | |
virtual bool | IsPolymorphic ()=0 |
Test for polymorphic wrapped object. More... | |
virtual bool | IsConst ()=0 |
Test for const wrapped object. More... | |
Protected Member Functions | |
ObjectWrapperBase () | |
Constructor. More... | |
Mother class for data wrapper template class.
This class is the base class for data wrappers used by the DataMap class. It is used to provide a common base class wrapper for every kind of object, in order to create containers of different objects, using the type erasure pattern.
|
inlinevirtual |
Destructor.
|
inlineprotected |
Constructor.
|
pure virtual |
Clones the wrapped object and wraps it.
Creates a wrapper wrapping a clone of the wrapped object.
Implemented in EA::ObjectWrapperT< DataType, typename std::enable_if< smart_is_copy_constructible< DataType >::value >::type >, and EA::ObjectWrapperT< DataType, typename >.
|
pure virtual |
Clones the wrapper.
Creates a new wrapper wrapping the same object.
Implemented in EA::ObjectWrapperT< DataType, typename std::enable_if< smart_is_copy_constructible< DataType >::value >::type >, and EA::ObjectWrapperT< DataType, typename >.
|
pure virtual |
Getter for raw pointer to the wrapped object.
Implemented in EA::ObjectWrapperTImpl< void >, and EA::ObjectWrapperTImpl< DataType >.
|
pure virtual |
Returns the type of the wrapped object.
Implemented in template derived classes #ObjectWrapperT.
Implemented in EA::ObjectWrapperTImpl< void >, and EA::ObjectWrapperTImpl< DataType >.
|
pure virtual |
Test for const wrapped object.
Implemented in EA::ObjectWrapperTImpl< void >, and EA::ObjectWrapperTImpl< DataType >.
|
pure virtual |
Test for polymorphic wrapped object.
Implemented in EA::ObjectWrapperTImpl< void >, and EA::ObjectWrapperTImpl< DataType >.
|
pure virtual |
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.
Implemented in EA::ObjectWrapperTImpl< void >, and EA::ObjectWrapperTImpl< DataType >.
|
pure 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.
address | The address of the object to be wrapped. |
type | The type of the object at the given address. |
own | If true then the wrapper will own the wrapped object. |
isPolymorhic | Set to true for objects of polymorphic classes. |
isCopnst | Set to true for constant objects. |
Implemented in EA::ObjectWrapperTImpl< void >, and EA::ObjectWrapperTImpl< DataType >.
|
pure virtual |
Checks if the wrapper wraps something.
Implemented in EA::ObjectWrapperTImpl< void >, and EA::ObjectWrapperTImpl< DataType >.