DGtal 2.1.0
|
Public Member Functions | |
~NClone () | |
NClone (const NClone &) | |
NClone (const T &t) | |
NClone (CountedPtr< T > ptr) | |
NClone (CowPtr< T > ptr) | |
operator T () const | |
operator CowPtr< T > () const | |
Private Member Functions | |
NClone () | |
NClone & | operator= (const NClone &other) |
Private Attributes | |
CowPtr< T > | myCowPtr |
The copy-on-write pointer to the T object that is to be duplicated. | |
Tentative Clone. Performs without unnecessary duplicates "parameter -> member data"
Definition at line 62 of file testClone2.cpp.
|
inline |
|
inline |
|
inline |
Constructor from an instance of T. The object is referenced in 'this' and is generally immediately duplicated by the user to instantiate a data member.
t | any object of type T. |
Definition at line 83 of file testClone2.cpp.
|
inline |
Constructor from a pointer to a valid instance of T. The object is referenced in 'this' and is generally immediately duplicated by the user to instantiate a data member.
ptr | any valid pointer to a object of type T. |
Definition at line 92 of file testClone2.cpp.
|
inline |
Definition at line 93 of file testClone2.cpp.
|
private |
Constructor. Forbidden.
|
inline |
Cast operator to a CowPtr<T> instance. If the clone was initialized with an This is only at this moment that the object is duplicated (and only once). This allows things like: CountedPtr a2 = a1; where a1 is of type NClone. It also allows CowPtr a2 = a1;
Definition at line 112 of file testClone2.cpp.
References DGtal::NClone< T >::myCowPtr, and DGtal::CowPtr< T >::unique().
|
inline |
Cast operator to a T instance. This is only at this moment that the object is duplicated. This allows things like: A a2 = a1; where a1 is of type NClone.
Definition at line 100 of file testClone2.cpp.
References DGtal::NClone< T >::myCowPtr.
|
private |
Assignment.
other | the object to copy. |
|
private |
The copy-on-write pointer to the T object that is to be duplicated.
Definition at line 126 of file testClone2.cpp.
Referenced by DGtal::NClone< T >::operator CowPtr< T >(), and DGtal::NClone< T >::operator T().