EventAnalysis  1.0.0
ObjectWrapperBase.h
Go to the documentation of this file.
1 /*
2  * ObjectWrapperBase.h
3  *
4  * Created on: 04 Dec 2017
5  * Author: Nicola Mori
6  */
7 
8 #ifndef OBJECTWRAPPERBASE_H_
9 #define OBJECTWRAPPERBASE_H_
10 
11 #include <memory>
12 #include <stdexcept>
13 
14 namespace EA {
15 
23 public:
25  virtual ~ObjectWrapperBase() {}
26 
33  virtual std::unique_ptr<ObjectWrapperBase> CloneObject() = 0;
34 
41  virtual std::unique_ptr<ObjectWrapperBase> CloneWrapper() = 0;
42 
49  virtual const std::type_info &GetObjType() = 0;
50 
57  virtual void WrapNothing() = 0;
58 
63  virtual bool WrapsSomething() = 0;
64 
69  virtual void *GetObjAddress() = 0;
70 
82  virtual bool WrapObject(void *address, const std::type_info &type, bool own) = 0;
83 
88  virtual bool IsPolymorphic() = 0;
89 
90 protected:
93 };
94 
95 } // namespace EA
96 
97 #endif /* OBJECTWRAPPERBASE_H_ */
virtual bool IsPolymorphic()=0
Test for polymorphic wrapped object.
virtual ~ObjectWrapperBase()
Destructor.
Definition: ObjectWrapperBase.h:25
virtual bool WrapsSomething()=0
Checks if the wrapper wraps something.
ObjectWrapperBase()
Constructor.
Definition: ObjectWrapperBase.h:92
IncludeFileExc.h IncludeFileExc class declaration.
Definition: Algorithm.h:21
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
virtual const std::type_info & GetObjType()=0
Returns the type of the wrapped object.
virtual bool WrapObject(void *address, const std::type_info &type, bool own)=0
Wrap the object at the given address.
virtual std::unique_ptr< ObjectWrapperBase > CloneWrapper()=0
Clones the wrapper.
virtual void * GetObjAddress()=0
Getter for raw pointer to the wrapped object.
virtual void WrapNothing()=0
Remove the wrapped object.