|
|
|
autoPtr< T > Class Template ReferenceAn auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and with pointer allocation checking on access. More...
Collaboration diagram for autoPtr< T >:
![]()
Detailed Descriptiontemplate<class T>
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and with pointer allocation checking on access.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| autoPtr | ( | T * | p = 0 |
) | [inline, explicit] |
Construct as copy by transfering pointer to this autoPtr and.
setting the arguments pointer to NULL
Definition at line 30 of file autoPtrI.H.
| ~autoPtr | ( | ) | [inline] |
| bool empty | ( | ) | const [inline] |
Return true if the autoPtr is empty (ie, no pointer set).
Definition at line 48 of file autoPtrI.H.
References autoPtr< T >::clear().
Referenced by sampledCuttingPlane::faces(), sampledIsoSurfaceCell::faces(), sampledIsoSurface::faces(), distanceSurface::faces(), and directMappedPatchBase::map().


| bool valid | ( | ) | const [inline] |
Return true if the autoPtr valid (ie, the pointer is set).
Definition at line 55 of file autoPtrI.H.
Referenced by forceCoeffs::execute().

| T * ptr | ( | ) | [inline] |
Return object pointer for reuse.
Definition at line 62 of file autoPtrI.H.
Referenced by autoPtr< T >::set().

| void set | ( | T * | p | ) | [inline] |
Set pointer to that given.
If object pointer already set issue a FatalError.
Definition at line 71 of file autoPtrI.H.
References autoPtr< T >::ptr(), and Foam::T().

| void reset | ( | T * | p = 0 |
) | [inline] |
If object pointer already set, delete object and set to given pointer.
Definition at line 85 of file autoPtrI.H.
Referenced by polyMeshAdder::add(), autoHexMeshDriver::autoHexMeshDriver(), sampledIsoSurfaceCell::faces(), sampledCuttingPlane::faces(), sampledIsoSurface::faces(), distanceSurface::faces(), distributedTriSurfaceMesh::findNearest(), and autoPtr< T >::operator()().

| void clear | ( | ) | [inline] |
Delete object and set pointer to NULL, if the pointer is valid.
Definition at line 97 of file autoPtrI.H.
Referenced by autoPtr< T >::empty(), distributedTriSurfaceMesh::globalTris(), triSurfaceMesh::movePoints(), directMappedPatchBase::sampleMesh(), and triSurfaceMesh::tree().

| T & operator() | ( | ) | [inline] |
Return reference to the object data.
Definition at line 106 of file autoPtrI.H.
References autoPtr< T >::reset().
Referenced by autoPtr< T >::operator->().


| const T & operator() | ( | ) | const [inline] |
| operator const T & | ( | ) | const [inline] |
Definition at line 150 of file autoPtrI.H.
| T * operator-> | ( | ) | [inline] |
Return object pointer.
Definition at line 157 of file autoPtrI.H.
References autoPtr< T >::operator()().

| const T * operator-> | ( | ) | const [inline] |
| void operator= | ( | const autoPtr< T > & | ap | ) | [inline] |