27 template <
class T>
class Ptr;
45 inline APtr(T* t_ptr = NULL) {
46 helper =
new PtrHelper(t_ptr,
true);
54 helper = other.helper;
62 template <
class Tderived>
64 helper =
new PtrHelper(other,
true);
74 PtrHelper* loc_helper = helper;
75 helper = other.helper;
124 template<
class T,
class... Args>
126 return APtr<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.
The version information and configuration settings for RC Lib.
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
APtr(const Ptr< Tderived > &other)
A conversion constructor which creates a new APtr from a Ptr of the same or a derived type.
Definition: APtr.h:63
APtr & operator=(const APtr< T > &other)
An assignment operator, which increases the shared reference count with the source APtr.
Definition: APtr.h:71
void Delete()
Delete the object pointed to and set the shared pointer for all linked APtr's to NULL.
Definition: APtr.h:96
APtr(const APtr< T > &other)
Copy constructor.
Definition: APtr.h:52
APtr< const T > ExtractConst()
Extract APtr<const T> and revokes ownership from this object.
Definition: APtr.h:102
~APtr()
Destructor which decreases the shared reference count.
Definition: APtr.h:85
APtr(T *t_ptr=NULL)
Default constructor assigning the value of the pointer.
Definition: APtr.h:45
A safe pointer class that throws an RC::ErrorMsgNull if a null dereference is attempted.
Definition: Ptr.h:31
APtr< T > MakeAPtr(Args &&... args)
Create a new APtr<T> constructed with the given arguments.
Definition: APtr.h:125