OpendTect  7.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
DataPackMgr Class Reference

Manages DataPacks. More...

Inheritance diagram for DataPackMgr:
[legend]

Public Types

using MgrID = DataPackMgrID
 
using PackID = DataPackID
 

Public Member Functions

 DataPackMgr (DataPackMgrID)
 
 ~DataPackMgr ()
 
template<class T >
bool add (const T &p)
 
template<class T >
bool add (const T *p)
 
template<class T >
bool add (ConstRefMan< T > &p)
 
template<class T >
bool add (RefMan< T > &p)
 
template<class T >
bool add (T &p)
 
template<class T >
bool add (T *p)
 
DataPackaddAndObtain (DataPack *)
 
const char * categoryOf (DataPackID) const
 
void dumpInfo (od_ostream &) const
 
virtual void dumpInfoFor (DataPackID, StringPairSet &) const
 
template<class T >
RefMan< T > get (DataPackID)
 
template<class T >
ConstRefMan< T > get (DataPackID) const
 
RefMan< DataPackgetDP (DataPackID)
 
ConstRefMan< DataPackgetDP (DataPackID) const
 
void getPackIDs (TypeSet< DataPackID > &) const
 
bool haveID (const DataPack::FullID &fid) const
 
bool haveID (DataPackID pid) const
 
DataPackMgrID id () const
 
bool isPresent (const DataPack::FullID &fid) const
 
bool isPresent (DataPackID) const
 
const char * nameOf (DataPackID) const
 
float nrKBytes () const
 
virtual float nrKBytesOf (DataPackID) const
 
template<class T >
WeakPtr< T > observe (DataPackID) const
 Dynamic casts to T and returns results. More...
 
WeakPtr< DataPackobserveDP (DataPackID) const
 
DataPackobtain (DataPackID)
 
const DataPackobtain (DataPackID) const
 
const ObjectSet< const DataPack > & packs () const
 
bool ref (DataPackID)
 
void release (const DataPack *dp)
 
void release (DataPackID)
 
void releaseAll (bool donotify)
 
bool unRef (DataPackID)
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 

Static Public Member Functions

static DataPackMgrID BufID ()
 Simple data buffer: 1. More...
 
static const char * categoryOf (const DataPack::FullID &)
 
static DataPackMgrID cUdfID ()
 
static DataPackMgrDPM (const DataPack::FullID &fid)
 
static DataPackMgrDPM (DataPackMgrID)
 
static void dumpDPMs (od_ostream &)
 
static DataPackMgrID FlatID ()
 Flat (N1xN2) data: 4. More...
 
static DataPackMgrID getID (const DataPack::FullID &fid)
 
static DataPackMgrgtDPM (DataPackMgrID, bool)
 
static const char * nameOf (const DataPack::FullID &)
 
static DataPackMgrID PointID ()
 Sets of 'unconnected' points: 2. More...
 
static DataPackMgrID SeisID ()
 Cube/Block (N1xN2xN3) data: 3. More...
 
static DataPackMgrID SurfID ()
 Surface (triangulated) data: 5. More...
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Public Attributes

Notifier< DataPackMgrnewPack
 Passed CallBacker* = Pack. More...
 
Notifier< DataPackMgrpackToBeRemoved
 Passed CallBacker* = Pack. More...
 

Private Member Functions

bool doAdd (const DataPack *)
 
DataPackdoObtain (DataPackMgrID, bool) const
 
int indexOf (DataPackMgrID) const
 
void packDeleted (CallBacker *)
 

Private Attributes

DataPackMgrID id_
 
WeakPtrSet< DataPackpacks_
 

Static Private Attributes

static Threads::Lock mgrlistlock_
 
static ManagedObjectSet< DataPackMgrmgrs_
 

Detailed Description

Manages DataPacks.

DataPacks will be managed with everything in it. If you add a Pack, you will get the ID of the pack.

When you obtain the data for looking at it, you can choose to 'only observe'. In that case, you'd better use the packToBeRemoved notifier, as the data may be deleted at any time. Normally, you want to obtain a reference whilst making sure the data is not thrown away.

This means you must release the data pack once you no longer use it, but NEVER* release a pack when you used the 'observing_only' option.

You can get an appropriate DataPackMgr from the DPM() function.

<>

Member Typedef Documentation

◆ MgrID

◆ PackID

Constructor & Destructor Documentation

◆ DataPackMgr()

DataPackMgr::DataPackMgr ( DataPackMgrID  )

You can, but normally should not, construct a manager. In general, leave it to DPM().

◆ ~DataPackMgr()

DataPackMgr::~DataPackMgr ( )

Delete a DataPackMgr only when you have created it with the constructor.

Member Function Documentation

◆ add() [1/6]

template<class T >
bool DataPackMgr::add ( const T &  p)
inline

◆ add() [2/6]

template<class T >
bool DataPackMgr::add ( const T *  p)
inline

◆ add() [3/6]

template<class T >
bool DataPackMgr::add ( ConstRefMan< T > &  p)
inline

◆ add() [4/6]

template<class T >
bool DataPackMgr::add ( RefMan< T > &  p)
inline

◆ add() [5/6]

template<class T >
bool DataPackMgr::add ( T &  p)
inline

◆ add() [6/6]

template<class T >
bool DataPackMgr::add ( T *  p)
inline

◆ addAndObtain()

DataPack* DataPackMgr::addAndObtain ( DataPack )

◆ BufID()

static DataPackMgrID DataPackMgr::BufID ( )
static

Simple data buffer: 1.

◆ categoryOf() [1/2]

static const char* DataPackMgr::categoryOf ( const DataPack::FullID )
static

◆ categoryOf() [2/2]

const char* DataPackMgr::categoryOf ( DataPackID  ) const

◆ cUdfID()

static DataPackMgrID DataPackMgr::cUdfID ( )
inlinestatic

◆ doAdd()

bool DataPackMgr::doAdd ( const DataPack )
private

◆ doObtain()

DataPack* DataPackMgr::doObtain ( DataPackMgrID  ,
bool   
) const
private

◆ DPM() [1/2]

static DataPackMgr& DataPackMgr::DPM ( const DataPack::FullID fid)
inlinestatic

◆ DPM() [2/2]

static DataPackMgr& DataPackMgr::DPM ( DataPackMgrID  )
static

◆ dumpDPMs()

static void DataPackMgr::dumpDPMs ( od_ostream )
static

◆ dumpInfo()

void DataPackMgr::dumpInfo ( od_ostream ) const

◆ dumpInfoFor()

virtual void DataPackMgr::dumpInfoFor ( DataPackID  ,
StringPairSet  
) const
virtual

◆ FlatID()

static DataPackMgrID DataPackMgr::FlatID ( )
static

Flat (N1xN2) data: 4.

◆ get() [1/2]

template<class T >
RefMan< T > DataPackMgr::get ( DataPackID  dpid)
inline

◆ get() [2/2]

template<class T >
ConstRefMan< T > DataPackMgr::get ( DataPackID  dpid) const
inline

◆ getDP() [1/2]

RefMan<DataPack> DataPackMgr::getDP ( DataPackID  )

◆ getDP() [2/2]

ConstRefMan<DataPack> DataPackMgr::getDP ( DataPackID  ) const

◆ getID()

static DataPackMgrID DataPackMgr::getID ( const DataPack::FullID fid)
inlinestatic

◆ getPackIDs()

void DataPackMgr::getPackIDs ( TypeSet< DataPackID > &  ) const

◆ gtDPM()

static DataPackMgr* DataPackMgr::gtDPM ( DataPackMgrID  ,
bool   
)
static

◆ haveID() [1/2]

bool DataPackMgr::haveID ( const DataPack::FullID fid) const
inline

◆ haveID() [2/2]

bool DataPackMgr::haveID ( DataPackID  pid) const
inline

◆ id()

DataPackMgrID DataPackMgr::id ( ) const
inline

◆ indexOf()

int DataPackMgr::indexOf ( DataPackMgrID  ) const
private

◆ isPresent() [1/2]

bool DataPackMgr::isPresent ( const DataPack::FullID fid) const
inline

◆ isPresent() [2/2]

bool DataPackMgr::isPresent ( DataPackID  ) const

◆ nameOf() [1/2]

static const char* DataPackMgr::nameOf ( const DataPack::FullID )
static

◆ nameOf() [2/2]

const char* DataPackMgr::nameOf ( DataPackID  ) const

◆ nrKBytes()

float DataPackMgr::nrKBytes ( ) const

◆ nrKBytesOf()

virtual float DataPackMgr::nrKBytesOf ( DataPackID  ) const
virtual

◆ observe()

template<class T >
WeakPtr< T > DataPackMgr::observe ( DataPackID  dpid) const
inline

Dynamic casts to T and returns results.

◆ observeDP()

WeakPtr<DataPack> DataPackMgr::observeDP ( DataPackID  ) const

◆ obtain() [1/2]

DataPack* DataPackMgr::obtain ( DataPackID  )

◆ obtain() [2/2]

const DataPack* DataPackMgr::obtain ( DataPackID  ) const

◆ packDeleted()

void DataPackMgr::packDeleted ( CallBacker )
private

◆ packs()

const ObjectSet<const DataPack>& DataPackMgr::packs ( ) const

◆ PointID()

static DataPackMgrID DataPackMgr::PointID ( )
static

Sets of 'unconnected' points: 2.

◆ ref()

bool DataPackMgr::ref ( DataPackID  )

◆ release() [1/2]

void DataPackMgr::release ( const DataPack dp)
inline

◆ release() [2/2]

void DataPackMgr::release ( DataPackID  )

◆ releaseAll()

void DataPackMgr::releaseAll ( bool  donotify)

◆ SeisID()

static DataPackMgrID DataPackMgr::SeisID ( )
static

Cube/Block (N1xN2xN3) data: 3.

◆ SurfID()

static DataPackMgrID DataPackMgr::SurfID ( )
static

Surface (triangulated) data: 5.

◆ unRef()

bool DataPackMgr::unRef ( DataPackID  )

Member Data Documentation

◆ id_

DataPackMgrID DataPackMgr::id_
private

◆ mgrlistlock_

Threads::Lock DataPackMgr::mgrlistlock_
staticprivate

◆ mgrs_

ManagedObjectSet<DataPackMgr> DataPackMgr::mgrs_
staticprivate

◆ newPack

Notifier<DataPackMgr> DataPackMgr::newPack

Passed CallBacker* = Pack.

◆ packs_

WeakPtrSet<DataPack> DataPackMgr::packs_
mutableprivate

◆ packToBeRemoved

Notifier<DataPackMgr> DataPackMgr::packToBeRemoved

Passed CallBacker* = Pack.


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