ClonedPtr.h
A smart pointer that clones the object it holds when it is copied.
Definition: ClonedPtr.h:101
ClonedPtr(T *p=nullptr)
Explicit constructor to create new ClonedPtr object.
Definition: ClonedPtr.h:112
~ClonedPtr()
The destructor deletes the managed object.
Definition: ClonedPtr.h:123
ClonedPtr(const ClonedPtr &other)
Copy construct by cloning the managed object based on the cloning policy.
Definition: ClonedPtr.h:134
T * operator->()
Struct dereference to access members of the managed object.
Definition: ClonedPtr.h:229
const T * operator->() const
Struct dereference to access members of the managed object.
Definition: ClonedPtr.h:223
const T & operator*() const
Dereference the smart pointer.
Definition: ClonedPtr.h:211
T * release() noexcept
Release the ownership of the currently managed object by returning the pointer and setting the held p...
Definition: ClonedPtr.h:194
bool operator>(const ClonedPtr &other) const
Greater than another ClonedPtr object.
Definition: ClonedPtr.h:273
bool operator<=(const ClonedPtr &other) const
Less than or equal to another ClonedPtr object.
Definition: ClonedPtr.h:281
bool operator<(const ClonedPtr &other) const
Less than another ClonedPtr object.
Definition: ClonedPtr.h:265
void swap(ClonedPtr &other)
Swap the managed objects of the this ClonedPtr object and another.
Definition: ClonedPtr.h:296
T * get()
Get the pointer managed by ClonedPtr object.
Definition: ClonedPtr.h:241
ClonedPtr & operator=(ClonedPtr &&other) noexcept
Move construct by taking ownership of the managed object by the ClonedPtr object being moved and sett...
Definition: ClonedPtr.h:165
ClonedPtr & operator=(const ClonedPtr &other)
Copy assign by cloning the managed object based on the cloning policy.
Definition: ClonedPtr.h:150
bool operator==(const ClonedPtr &other) const
Equal to another ClonedPtr object.
Definition: ClonedPtr.h:249
bool operator>=(const ClonedPtr &other) const
Greater than or equal to another ClonedPtr object.
Definition: ClonedPtr.h:289
ClonedPtr(std::nullptr_t)
Special constructor to create new ClonedPtr object promoting a nullptr.
Definition: ClonedPtr.h:118
void reset(T *p=nullptr)
Reset method deletes the object that it currently managed and manages the object given by a raw point...
Definition: ClonedPtr.h:180
bool operator!=(const ClonedPtr &other) const
Not equal to another ClonedPtr object.
Definition: ClonedPtr.h:257
ClonedPtr(ClonedPtr &&other) noexcept
Move construct by taking ownership of the managed object by the ClonedPtr object being moved and sett...
Definition: ClonedPtr.h:141
const T * get() const
Get the pointer managed by ClonedPtr object.
Definition: ClonedPtr.h:235
Definition: apiAttributes.h:21
ClonedPtr< T > makeClonedPtr(Args &&... args)
Construct an object of type T based on arguments passed and point to it with a ClonedPtr object.
Definition: ClonedPtr.h:325
static T * apply(const T *ptr)
Apply the cloning policy.
Definition: ClonedPtr.h:61
static T * apply(const T *ptr)
Apply the cloning policy.
Definition: ClonedPtr.h:83