| OpendTect 8.0

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
PtrManBase< T > Class Template Reference
Basic

`#include <ptrman.h>`

Inherited by ConstPtrManBase< RegularSeisDataPack >, ConstPtrManBase< Well::Data >, ConstPtrManBase< Coords::CoordSystem >, ConstPtrManBase< DataPointSet >, ConstPtrManBase< VolumeDataPack >, ConstPtrManBase< EM::Horizon >, ConstPtrManBase< EM::Horizon3D >, ConstPtrManBase< Network::HttpRequest >, ConstPtrManBase< Pick::Set >, ConstPtrManBase< OffsetReflectivityModel >, ConstPtrManBase< PreStack::Gather >, ConstPtrManBase< PreStack::GatherSetDataPack >, ConstPtrManBase< ReflectivityModelTrace >, ConstPtrManBase< DataPack >, ConstPtrManBase< ReflectivityModelSet >, ConstPtrManBase< Seis::SynthGenDataPack >, ConstPtrManBase< ZAxisTransform >, ConstPtrManBase< SeisVolumeDataPack >, ConstPtrManBase< EM::Horizon2D >, ConstPtrManBase< SharedObject >, ConstPtrManBase< int >, ConstPtrManBase< visBase::Transformation >, ConstPtrManBase< visBase::PolygonSelection >, ConstPtrManBase< mVisTrans >, ConstPtrManBase< Attrib::Data2DHolder >, ConstPtrManBase< Survey::Geometry3D >, NonConstPtrManBase< RegularSeisDataPack >, NonConstPtrManBase< EM::Horizon >, NonConstPtrManBase< PreStack::AngleComputer >, NonConstPtrManBase< Attrib::Desc >, NonConstPtrManBase< Attrib::Provider >, NonConstPtrManBase< DataPointSet >, NonConstPtrManBase< ContinuousCurvatureArray2DInterpol::HorizonData >, NonConstPtrManBase< float >, NonConstPtrManBase< char >, NonConstPtrManBase< ContinuousCurvatureArray2DInterpol::BriggsData >, NonConstPtrManBase< Coords::CRSInfoList >, NonConstPtrManBase< DistribType >, NonConstPtrManBase< Network::HttpRequestProcess >, NonConstPtrManBase< Pick::Set >, NonConstPtrManBase< EM::Surface >, NonConstPtrManBase< FlatDataPack >, NonConstPtrManBase< Geometry::PrimitiveSetCreator >, NonConstPtrManBase< Well::Data >, NonConstPtrManBase< Network::RequestPacket >, NonConstPtrManBase< MonitoredObject::ChangeData::AuxData >, NonConstPtrManBase< visBase::Camera >, NonConstPtrManBase< visBase::ThumbWheel >, NonConstPtrManBase< visBase::DataObjectGroup >, NonConstPtrManBase< visBase::Axes >, NonConstPtrManBase< visBase::PolygonSelection >, NonConstPtrManBase< visBase::SceneColTab >, NonConstPtrManBase< OD::RGBImageLoader >, NonConstPtrManBase< QPixmap >, NonConstPtrManBase< EM::Horizon3D >, NonConstPtrManBase< Vel::VolumeFunctionSource >, NonConstPtrManBase< Vel::FunctionSource >, NonConstPtrManBase< PreStack::GatherSetDataPack >, NonConstPtrManBase< OffsetReflectivityModel >, NonConstPtrManBase< AngleReflectivityModel >, NonConstPtrManBase< ReflectivityModelTrace >, NonConstPtrManBase< OD::JSON::Object >, NonConstPtrManBase< Seis::Blocks::HGeom >, NonConstPtrManBase< ValueSeriesInterpolator< float > >, NonConstPtrManBase< DataDistribution >, NonConstPtrManBase< ReflectivitySampler >, NonConstPtrManBase< SeisVolumeDataPack >, NonConstPtrManBase< EM::Horizon2D >, NonConstPtrManBase< ZAxisTransform >, NonConstPtrManBase< StreamData::StreamDataImpl >, NonConstPtrManBase< Survey::Geometry3D >, NonConstPtrManBase< DataPack >, NonConstPtrManBase< MPE::FaultEditor >, NonConstPtrManBase< MPE::FaultStickSetEditor >, NonConstPtrManBase< EM::EMObject >, NonConstPtrManBase< VolProc::Chain >, NonConstPtrManBase< HDF5::Reader >, NonConstPtrManBase< HDF5::Writer >, NonConstPtrManBase< Array2D< float > >, NonConstPtrManBase< PosInfo::CubeDataIndex >, NonConstPtrManBase< SeisTrcWriter >, NonConstPtrManBase< SeisSequentialWriter >, NonConstPtrManBase< Seis::DataGlueer >, NonConstPtrManBase< visBase::PolyLine >, NonConstPtrManBase< visBase::DrawStyle >, NonConstPtrManBase< visBase::Material >, NonConstPtrManBase< visBase::Text2 >, NonConstPtrManBase< visSurvey::PickSetDisplay >, NonConstPtrManBase< visSurvey::MPEClickCatcher >, NonConstPtrManBase< PreStack::EventManager >, NonConstPtrManBase< uiMenuHandler >, NonConstPtrManBase< SeisFlatDataPack >, NonConstPtrManBase< visSurvey::SeedPainter >, NonConstPtrManBase< SeisTrcBufDataPack >, NonConstPtrManBase< SimpleTimeDepthTransform >, NonConstPtrManBase< StratSynth::DataMgr >, NonConstPtrManBase< MenuHandler >, NonConstPtrManBase< uiTreeItemTBHandler >, NonConstPtrManBase< visSurvey::Scene >, NonConstPtrManBase< uiVisPickRetriever >, NonConstPtrManBase< visBase::Coordinates >, NonConstPtrManBase< visBase::DataObject >, NonConstPtrManBase< visBase::TextureChannels >, NonConstPtrManBase< visBase::ColTabTextureChannel2RGBA >, NonConstPtrManBase< visBase::TextureRectangle >, NonConstPtrManBase< visBase::VertexShape >, NonConstPtrManBase< visBase::HorizonSectionDataHandler >, NonConstPtrManBase< visBase::HorizonTextureHandler >, NonConstPtrManBase< visBase::HorTilesCreatorAndUpdator >, NonConstPtrManBase< visBase::TextureChannel2RGBA >, NonConstPtrManBase< visBase::PolygonOffset >, NonConstPtrManBase< visBase::GeomIndexedShape >, NonConstPtrManBase< visBase::Normals >, NonConstPtrManBase< visBase::DepthTabPlaneDragger >, NonConstPtrManBase< Geometry::RangePrimitiveSet >, NonConstPtrManBase< ColTab::Sequence >, NonConstPtrManBase< visBase::MarkerSet >, NonConstPtrManBase< visBase::Lines >, NonConstPtrManBase< visBase::EventCatcher >, NonConstPtrManBase< visBase::Light >, NonConstPtrManBase< visBase::TextureCoords >, NonConstPtrManBase< TypeSet< Coord > >, NonConstPtrManBase< TypeSet< float > >, NonConstPtrManBase< visSurvey::MPEEditor >, NonConstPtrManBase< visBase::PolyLine3D >, NonConstPtrManBase< EM::FaultSet3D >, NonConstPtrManBase< visBase::PointSet >, NonConstPtrManBase< mVisTrans >, NonConstPtrManBase< MPE::Horizon2DTracker >, NonConstPtrManBase< MPE::Horizon2DEditor >, NonConstPtrManBase< MPE::Horizon3DTracker >, NonConstPtrManBase< MPE::HorizonEditor >, NonConstPtrManBase< visSurvey::Sower >, NonConstPtrManBase< MPE::Patch >, NonConstPtrManBase< visBase::MarchingCubesSurface >, NonConstPtrManBase< EM::MarchingCubesSurface >, NonConstPtrManBase< visBase::Transformation >, NonConstPtrManBase< visBase::RandomPos2Body >, NonConstPtrManBase< visBase::Dragger >, NonConstPtrManBase< visBase::GridLines >, NonConstPtrManBase< EM::PolygonBody >, NonConstPtrManBase< MPE::PolygonBodyEditor >, NonConstPtrManBase< visBase::TriangleStripSet >, NonConstPtrManBase< PreStack::Gather >, NonConstPtrManBase< visBase::FlatViewer >, NonConstPtrManBase< visSurvey::PlaneDataDisplay >, NonConstPtrManBase< visSurvey::Seis2DDisplay >, NonConstPtrManBase< EM::RandomPosBody >, NonConstPtrManBase< Geometry::RandomLine >, NonConstPtrManBase< visBase::TexturePanelStrip >, NonConstPtrManBase< visBase::RandomTrackDragger >, NonConstPtrManBase< visBase::Annotation >, NonConstPtrManBase< visBase::TopBotImage >, NonConstPtrManBase< EM::Fault >, NonConstPtrManBase< visBase::BoxDragger >, NonConstPtrManBase< visBase::VolumeRenderScalarField >, NonConstPtrManBase< visBase::Well >, ConstPtrManBase< T >, and NonConstPtrManBase< T >.

## Public Types
typedef T *(* | PointerCreator) ()

## Public Member Functions
T * | createIfNull (PointerCreator=createSingleObject< T >)
void | erase ()
| operator bool ()
| operator bool () const
bool | operator! () const
template<class TT >
bool | operator== (const PtrManBase< TT > &) const =delete
T * | release ()
| Returns pointer. I won't take care of it any longer.
T * | set (T *p, bool doerase=true)
| Returns old pointer if not erased.
bool | setIfNull (T *p)
bool | setIfNull (T *p, bool takeover)

## Protected Types
typedef void(* | PtrFunc) (T *)

## Protected Member Functions
| PtrManBase (PtrFunc setfunc, PtrFunc deletor, T *)
virtual | ~PtrManBase ()

## Protected Attributes
PtrFunc | deletefunc_
Threads::AtomicPointer< T > | ptr_
PtrFunc | setfunc_

## Detailed Description

template<class T>
class PtrManBase< T >

Base class for smart pointers. Don't use directly, use PtrMan, ArrPtrMan or RefMan instead.

<>

## Member Typedef Documentation

## ◆ PointerCreator

template<class T >

typedef T *(* PtrManBase< T >::PointerCreator) ()

## ◆ PtrFunc

template<class T >

typedef void(* PtrManBase< T >::PtrFunc) (T *)
| protected

## Constructor & Destructor Documentation

## ◆ PtrManBase()

template<class T >

PtrManBase< T >::PtrManBase | ( | PtrFunc | setfunc,
|  | PtrFunc | deletor,
|  | T * | p )
| inline protected

## ◆ ~PtrManBase()

template<class T >

virtual PtrManBase< T >::~PtrManBase | ( |  | ) |
| inline protected virtual

## Member Function Documentation

## ◆ createIfNull()

template<class T >

T * PtrManBase< T >::createIfNull | ( | PointerCreator | creator = createSingleObject<T> | ) |
| inline

If null, PointerCrator will be called to create new object.

## ◆ erase()

template<class T >

void PtrManBase< T >::erase | ( |  | ) |
| inline

## ◆ operator bool() [1/2]

template<class T >

PtrManBase< T >::operator bool | ( |  | ) |
| inline

## ◆ operator bool() [2/2]

template<class T >

PtrManBase< T >::operator bool | ( |  | ) | const
| inline

## ◆ operator!()

template<class T >

bool PtrManBase< T >::operator! | ( |  | ) | const
| inline

## ◆ operator==()

template<class T >
template<class TT >

bool PtrManBase< T >::operator== | ( | const PtrManBase< TT > & |  | ) | const
| delete

## ◆ release()

template<class T >

T * PtrManBase< T >::release | ( |  | ) |
| inline

Returns pointer. I won't take care of it any longer.

## ◆ set()

template<class T >

T * PtrManBase< T >::set | ( | T * | p,
|  | bool | doerase = true )
| inline

Returns old pointer if not erased.

## ◆ setIfNull() [1/2]

template<class T >

bool PtrManBase< T >::setIfNull | ( | T * | p | ) |
| inline

## ◆ setIfNull() [2/2]

template<class T >

bool PtrManBase< T >::setIfNull | ( | T * | p,
|  | bool | takeover )
| inline

If takeover==true, pointer will be deleted if object was not set.

## Member Data Documentation

## ◆ deletefunc_

template<class T >

PtrFunc PtrManBase< T >::deletefunc_
| protected

## ◆ ptr_

template<class T >

Threads::AtomicPointer<T> PtrManBase< T >::ptr_
| protected

## ◆ setfunc_

template<class T >

PtrFunc PtrManBase< T >::setfunc_
| protected

Generated at
for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2025