8 #ifndef OBJECTWRAPPERT_H_ 9 #define OBJECTWRAPPERT_H_ 80 const std::type_info &
GetObjType() {
return typeid(DataType); }
118 bool WrapObject(
void *address,
const std::type_info &type,
bool own,
bool isPolymorphic,
bool isConst);
140 :
_dataObjPtr{dataObjPtr}, _type{type}, _isPolymorphic{isPolymorphic}, _isConst{isConst} {};
196 bool WrapObject(
void *address,
const std::type_info &type,
bool own,
bool isPolymorphic,
bool isConst);
221 throw std::logic_error(
"Call to ObjectWrapperT::CloneObject for non-copy-constructible class");
243 template <
typename DataType>
244 class ObjectWrapperT<DataType, typename std::enable_if<smart_is_copy_constructible<DataType>::value>::type>
bool IsConst()
Test for const wrapped object.
Definition: ObjectWrapperT.hpp:38
bool _isPolymorphic
Definition: ObjectWrapperT.h:201
std::unique_ptr< ObjectWrapperBase > CloneWrapper()
Clones the wrapper.
Definition: ObjectWrapperT.h:266
void WrapNothing()
Remove the wrapped object.
Definition: ObjectWrapperT.h:169
ObjectWrapperTImpl(observer_ptr< DataType > dataObjPtr)
Constructor.
Definition: ObjectWrapperT.hpp:17
void * GetObjAddress()
Getter for raw pointer to the wrapped object.
Definition: ObjectWrapperT.h:103
bool WrapsSomething()
Checks if the wrapper wraps something.
Definition: ObjectWrapperT.h:175
T * get() const
Getter for pointed address.
Definition: ObserverPtr.h:155
bool IsPolymorphic()
Test for polymorphic wrapped object.
Definition: ObjectWrapperT.hpp:34
ObjectWrapperTImpl(void *dataObjPtr, const std::type_info &type, bool isPolymorphic, bool isConst)
Constructor.
Definition: ObjectWrapperT.h:139
bool _isConst
Definition: ObjectWrapperT.h:202
void * GetObjAddress()
Getter for raw pointer to the wrapped object.
Definition: ObjectWrapperT.h:181
Wrapper class for non-copy-constructible objects.
Definition: ObjectWrapperT.h:211
const std::type_info & GetObjType()
Returns the type of the wrapped object.
Definition: ObjectWrapperT.h:80
IncludeFileExc.h IncludeFileExc class declaration.
Definition: Algorithm.h:21
void WrapNothing()
Remove the wrapped object.
Definition: ObjectWrapperT.h:88
std::shared_ptr< DataType > _dataObjSharedPtr
Definition: ObjectWrapperT.h:122
std::unique_ptr< ObjectWrapperBase > CloneObject()
Throws an exception since the wrapped object is not copy-constructible.
Definition: ObjectWrapperT.h:220
bool WrapObject(void *address, const std::type_info &type, bool own, bool isPolymorphic, bool isConst)
Wrap the object at the given address.
Definition: ObjectWrapperT.hpp:52
Specialization of ObjectWrapperTImpl for void.
Definition: ObjectWrapperT.h:130
const std::type_info & _type
Definition: ObjectWrapperT.h:200
const std::type_info & GetObjType()
Returns the type of the wrapped object.
Definition: ObjectWrapperT.h:161
bool IsConst()
Test for const wrapped object.
Definition: ObjectWrapperT.h:155
virtual std::unique_ptr< ObjectWrapperBase > CloneObject()=0
Clones the wrapped object and wraps it.
Mother class for data wrapper template class.
Definition: ObjectWrapperBase.h:22
observer_ptr< DataType > _dataObjPtr
Definition: ObjectWrapperT.h:121
observer_ptr< DataType > GetObj()
Data object getter method.
Definition: ObjectWrapperT.hpp:32
bool IsPolymorphic()
Test for polymorphic wrapped object.
Definition: ObjectWrapperT.h:149
void * _dataObjPtr
Definition: ObjectWrapperT.h:199
std::unique_ptr< ObjectWrapperBase > CloneWrapper()
Clones the wrapper.
Definition: ObjectWrapperT.h:230
bool WrapsSomething()
Checks if the wrapper wraps something.
Definition: ObjectWrapperT.h:97
Wrapper for data objects.
Definition: ObjectWrapperT.h:26