27 template <
class T>
class Ptr;
28 template <
class T>
class APtr;
52 helper =
new PtrHelper(t_ptr,
false);
61 helper = other.helper;
71 helper =
new PtrHelper(other,
false);
81 helper =
new PtrHelper(other,
false);
93 helper = other.helper;
143 auto_revoke = new_auto_revoke;
163 template<
class T,
class... Args>
165 return RevPtr<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.
Common components for the shared *Ptr.h files. Do not include directly.
Provides typedefs and routines for working with primitives.
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
A reference counting pointer that revokes (NULLs) all copies when one set to AutoRevoke(true) leaves ...
Definition: RevPtr.h:45
RevPtr(const RevPtr< T > &other)
Copy constructor.
Definition: RevPtr.h:59
void Delete()
Manually delete the object pointed to by this RevPtr, and revoke the pointer for all shared RevPtr's.
Definition: RevPtr.h:117
RevPtr(const APtr< T > &other)
A conversion constructor which creates a new RevPtr from an APtr of the same or a derived type.
Definition: RevPtr.h:80
RevPtr & operator=(const RevPtr< T > &other)
An assignment operator which joins this RevPtr to the other RevPtr.
Definition: RevPtr.h:89
void Revoke()
Manually revoke the pointer, setting it equal to NULL for all shared RevPtr objects.
Definition: RevPtr.h:126
void AutoRevoke(bool new_auto_revoke=true)
Set this RevPtr to revoke the pointer upon deletion or leaving scope.
Definition: RevPtr.h:142
~RevPtr()
Destructor which revokes the pointer only if AutoRevoke() was used on this object.
Definition: RevPtr.h:102
RevPtr(const Ptr< T > &other)
A conversion constructor which creates a new RevPtr from a Ptr of the same or a derived type.
Definition: RevPtr.h:70
RevPtr(T *t_ptr=NULL)
Default constructor assigning the value of the pointer.
Definition: RevPtr.h:51
RevPtr< T > MakeRevPtr(Args &&... args)
Create a new RevPtr<T> constructed with the given arguments.
Definition: RevPtr.h:164