8 #ifndef OBJECTWRAPPERT_HPP_ 9 #define OBJECTWRAPPERT_HPP_ 16 template <
typename DataType>
18 : _dataObjPtr(dataObjPtr), _dataObjSharedPtr(NULL), _isPolymorphic(std::is_polymorphic<DataType>::value) {}
20 template <
typename DataType>
25 template <
typename DataType>
30 template <
typename DataType>
39 template <
typename DataType>
40 std::unique_ptr<ObjectWrapperBase>
43 return std::make_unique<ObjectWrapperT<DataType, void>>(
46 return std::make_unique<ObjectWrapperT<DataType, void>>(
50 template <
typename DataType>
52 static const std::string routineName(
53 std::string(
"ObjectWrapperTImpl<").append(Demangler::ClassName<DataType>()).append(
">::WrapObject"));
62 << Demangler::ClassName<DataType>() <<
"\"" <<
ENDL;
ObjectWrapperTImpl(observer_ptr< DataType > dataObjPtr)
Constructor.
Definition: ObjectWrapperT.hpp:17
bool IsPolymorphic()
Test for polymorphic wrapped object.
Definition: ObjectWrapperT.hpp:37
#define COUT(level)
Definition: SmartLog.h:88
static std::string ClassName()
Static method which returns the name of the class.
Definition: Demangler.h:46
Wrapper class for non-copy-constructible objects.
Definition: ObjectWrapperT.h:125
IncludeFileExc.h IncludeFileExc class declaration.
Definition: Algorithm.h:21
std::shared_ptr< DataType > _dataObjSharedPtr
Definition: ObjectWrapperT.h:116
#define ENDL
Definition: SmartLog.h:117
virtual std::unique_ptr< ObjectWrapperBase > CloneObject()=0
Clones the wrapped object and wraps it.
observer_ptr< DataType > _dataObjPtr
Definition: ObjectWrapperT.h:115
bool WrapObject(void *address, const std::type_info &type, bool own)
Wrap the object at the given address.
Definition: ObjectWrapperT.hpp:51
observer_ptr< DataType > GetObj()
Data object getter method.
Definition: ObjectWrapperT.hpp:35
bool _isPolymorphic
Definition: ObjectWrapperT.h:114
bool InheritsFrom(const std::type_info &type, const std::type_info &baseType)
Check if a given type inherits from a given class.
Definition: InheritsFrom.cpp:20
Aliased objet is an alias.
Wrapper for data objects.
Definition: ObjectWrapperT.h:26