17 #ifndef LIB_WINSS_NOT_OWNING_PTR_HPP_ 18 #define LIB_WINSS_NOT_OWNING_PTR_HPP_ 43 throw std::invalid_argument(
"cannot own a null pointer");
152 #endif // LIB_WINSS_NOT_OWNING_PTR_HPP_ T * Get()
Gets the not owned pointer.
Definition: not_owning_ptr.hpp:58
T * operator->() const
Gets the not owned pointer as a constant.
Definition: not_owning_ptr.hpp:103
NotOwningPtr(const NotOwningPtr< V > &ptr)
Copy constructor to allow copying the pointer.
Definition: not_owning_ptr.hpp:51
bool operator==(const NotOwningPtr &ptr) const
Checks equality of this not owned pointer and another.
Definition: not_owning_ptr.hpp:113
NotOwningPtr(T *p)
Create a new NotOwningPtr with a pointer to the actual object.
Definition: not_owning_ptr.hpp:41
Definition: case_ignore.hpp:23
T * Get() const
Gets the not owned pointer as a constant.
Definition: not_owning_ptr.hpp:67
bool operator!=(const NotOwningPtr &ptr) const
Checks inequality of this not owned pointer and another.
Definition: not_owning_ptr.hpp:123
T & operator*()
Gets the dereferenced object.
Definition: not_owning_ptr.hpp:76
T & operator*() const
Gets the dereferenced object as a constant.
Definition: not_owning_ptr.hpp:85
T * operator->()
Gets the not owned pointer.
Definition: not_owning_ptr.hpp:94
A container for pointers where the lifetime should be owned by the caller.
Definition: not_owning_ptr.hpp:33
NotOwningPtr< T > NotOwned(T *p)
Helper method to make it easier to create a not owned pointer.
Definition: not_owning_ptr.hpp:147
NotOwningPtr & operator=(const NotOwningPtr &ptr)
Assigns the pointer to another pointer.
Definition: not_owning_ptr.hpp:133