|
Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
21 #ifndef ELM_UTIL_UNIQUEPTR_H
22 #define ELM_UTIL_UNIQUEPTR_H
34 inline bool isNull(
void)
const {
return !p; }
35 inline void clean(
void) {
if(p)
delete p; p = 0; }
36 inline T *
detach(
void) { T *res = p; p = 0;
return res; }
38 inline T *
get(
void)
const {
return p; }
42 inline operator T *(
void)
const {
return get(); }
55 #endif // ELM_UTIL_UNIQUEPTR_H
Printable< T, M > p(const T &data, const M &man)
Definition: Output.h:302
UniquePtr< T > unique(T *p)
Definition: UniquePtr.h:51
Definition: UniquePtr.h:27
UniquePtr< T > & operator=(UniquePtr< T > &ptr)
Definition: UniquePtr.h:41
T * detach(void)
Definition: UniquePtr.h:36
~UniquePtr(void)
Definition: UniquePtr.h:32
T * operator->(void) const
Definition: UniquePtr.h:43
T * get(void) const
Definition: UniquePtr.h:38
void clean(void)
Definition: UniquePtr.h:35
UniquePtr(void)
Definition: UniquePtr.h:29
T & operator*(void) const
Definition: UniquePtr.h:45
UniquePtr(UniquePtr< T > &ptr)
Definition: UniquePtr.h:31
UniquePtr(T *ptr)
Definition: UniquePtr.h:30
void set(T *ptr)
Definition: UniquePtr.h:37
bool isNull(void) const
Definition: UniquePtr.h:34
UniquePtr< T > & operator=(T *ptr)
Definition: UniquePtr.h:40