21 template <
class T>
class APtr;
22 template <
class T>
class RevPtr;
37 inline Ptr(T* t_ptr = NULL)
44 template <
class Tderived>
52 template <
class Tderived>
60 template <
class Tderived>
79 inline T*
Raw()
const {
return t_ptr; }
96 template<
class T,
class... Args>
98 return Ptr<T>(
new T(std::forward<Args>(args)...));
Provides informative exception handling.
Provides a set of convenience macros for metaprogramming and debugging.
#define RC_STREAM_RAWWRAP(Type)
Provides stream output for a class via Raw.
Definition: Macros.h:270
Common components for the *Ptr.h files. Do not include this directly.
A reference counting ptr that auto-deletes what it points to when the last copy leaves scope or is ot...
Definition: APtr.h:39
A safe pointer class that throws an RC::ErrorMsgNull if a null dereference is attempted.
Definition: Ptr.h:31
T * Raw() const
Returns a direct reference to the enclosed pointer.
Definition: Ptr.h:79
void Delete()
Deletes the object being pointed to and nulls the pointer.
Definition: Ptr.h:67
Ptr(const APtr< Tderived > &other)
A constructor which obtains a non-reference-counted copy of an APtr.
Definition: Ptr.h:45
Ptr(const Ptr< Tderived > &other)
Copy constructor.
Definition: Ptr.h:61
Ptr(T *t_ptr=NULL)
Default constructor assigning the value of the pointer.
Definition: Ptr.h:37
Ptr(const RevPtr< Tderived > &other)
A constructor which obtains a non-revokable copy of a RevPtr.
Definition: Ptr.h:53
A reference counting pointer that revokes (NULLs) all copies when one set to AutoRevoke(true) leaves ...
Definition: RevPtr.h:45
Ptr< T > MakePtr(Args &&... args)
Create a new Ptr<T> constructed with the given arguments.
Definition: Ptr.h:97