Simple raw pointer wrapper.
More...
#include <common.h>
template<typename T>
class HF::Common::Pointer< T >
Simple raw pointer wrapper.
Definition at line 1178 of file inc/hanfun/common.h.
◆ Pointer() [1/4]
Constructor.
- Parameters
-
[in] | _pointer | pointer to wrap. |
[in] | _owner | boolean indicating if the underling pointer should be deleted when this object is deleted. |
Definition at line 1193 of file inc/hanfun/common.h.
1194 pointer(_pointer), owner(_owner)
◆ Pointer() [2/4]
Constructor.
- Parameters
-
[in] | _pointer | pointer to wrap. |
Definition at line 1202 of file inc/hanfun/common.h.
1203 pointer(&_pointer), owner(
false)
◆ Pointer() [3/4]
Move constructor.
- Parameters
-
[in] | other | original object. |
Definition at line 1211 of file inc/hanfun/common.h.
1211 : pointer(
nullptr), owner(
false)
1213 std::swap(this->pointer, other.pointer);
1214 std::swap(this->owner, other.owner);
◆ Pointer() [4/4]
Copy constructor.
- Parameters
-
[in] | other | original object. |
Definition at line 1222 of file inc/hanfun/common.h.
1222 : pointer(other.pointer), owner(other.owner)
1224 other.owner =
false;
◆ operator=()
Assignment move operator.
- Parameters
-
[in] | other | object to move from. |
- Returns
- reference to this object.
Definition at line 1282 of file inc/hanfun/common.h.
1286 delete this->pointer;
1289 this->pointer = other.pointer;
1290 this->owner = other.owner;
1292 other.owner =
false;
The documentation for this class was generated from the following file: