Manages DataPacks. More...
Public Types | |
| typedef int | ID |
| Each Mgr has its own ID. | |
Public Member Functions | |
| bool | haveID (DataPack::ID) const |
| void | add (DataPack *) |
| The pack becomes mine. | |
| DataPack * | addAndObtain (DataPack *) |
| DataPack * | obtain (DataPack::ID dpid, bool observing_only=false) |
| const DataPack * | obtain (DataPack::ID dpid, bool obsrv=false) const |
| void | release (DataPack::ID) |
| void | release (const DataPack *dp) |
| void | releaseAll (bool donotify) |
| const char * | nameOf (DataPack::ID) const |
| const char * | categoryOf (DataPack::ID) const |
| virtual float | nrKBytesOf (DataPack::ID) const |
| virtual void | dumpInfoFor (DataPack::ID, IOPar &) const |
| ID | id () const |
| void | dumpInfo (std::ostream &) const |
| float | nrKBytes () const |
| const ObjectSet< const DataPack > & | packs () const |
| DataPackMgr (ID) | |
| ~DataPackMgr () | |
Static Public Member Functions | |
| static const ID | BufID () |
| Simple data buffer: 1. | |
| static const ID | PointID () |
| Sets of 'unconnected' points: 2. | |
| static const ID | CubeID () |
| Cube/Block (N1xN2xN3) data: 3. | |
| static const ID | FlatID () |
| Flat (N1xN2) data: 4. | |
| static const ID | SurfID () |
| Surface (triangulated) data: 5. | |
| static DataPackMgr & | DPM (ID) |
| static void | dumpDPMs (std::ostream &) |
Public Attributes | |
| Notifier< DataPackMgr > | newPack |
| Passed CallBacker* = Pack. | |
| Notifier< DataPackMgr > | packToBeRemoved |
| Passed CallBacker* = Pack. | |
Protected Member Functions | |
| DataPack * | doObtain (ID, bool) const |
| int | indexOf (ID) const |
| Object should be readlocked. | |
Protected Attributes | |
| ID | id_ |
| ObjectSet< const DataPack > | packs_ |
| Threads::ReadWriteLock | lock_ |
Static Protected Attributes | |
| static Threads::Mutex | mgrlistlock_ |
| static ManagedObjectSet < DataPackMgr > | mgrs_ |
Manages DataPacks.
Data Packs 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.
| typedef int DataPackMgr::ID |
Each Mgr has its own ID.
| DataPackMgr::DataPackMgr | ( | ID | ) |
You can, but normally should not, construct a manager. In general, leave it to DPM().
| DataPackMgr::~DataPackMgr | ( | ) |
Delete a DataPackMgr only when you have created it with the constructor.
| void DataPackMgr::add | ( | DataPack * | ) |
The pack becomes mine.
The pack becomes mines. Pack is obtained during the lock, i.e. threadsafe.
| static const ID DataPackMgr::BufID | ( | ) | [static] |
Simple data buffer: 1.
| const char* DataPackMgr::categoryOf | ( | DataPack::ID | ) | const |
| static const ID DataPackMgr::CubeID | ( | ) | [static] |
Cube/Block (N1xN2xN3) data: 3.
| static DataPackMgr& DataPackMgr::DPM | ( | ID | ) | [static] |
| static void DataPackMgr::dumpDPMs | ( | std::ostream & | ) | [static] |
| void DataPackMgr::dumpInfo | ( | std::ostream & | ) | const |
| virtual void DataPackMgr::dumpInfoFor | ( | DataPack::ID | , | |
| IOPar & | ||||
| ) | const [virtual] |
| static const ID DataPackMgr::FlatID | ( | ) | [static] |
Flat (N1xN2) data: 4.
| bool DataPackMgr::haveID | ( | DataPack::ID | ) | const |
| ID DataPackMgr::id | ( | ) | const [inline] |
| int DataPackMgr::indexOf | ( | ID | ) | const [protected] |
Object should be readlocked.
| const char* DataPackMgr::nameOf | ( | DataPack::ID | ) | const |
| float DataPackMgr::nrKBytes | ( | ) | const |
| virtual float DataPackMgr::nrKBytesOf | ( | DataPack::ID | ) | const [virtual] |
| DataPack* DataPackMgr::obtain | ( | DataPack::ID | dpid, | |
| bool | observing_only = false | |||
| ) | [inline] |
| const DataPack* DataPackMgr::obtain | ( | DataPack::ID | dpid, | |
| bool | obsrv = false | |||
| ) | const [inline] |
| static const ID DataPackMgr::PointID | ( | ) | [static] |
Sets of 'unconnected' points: 2.
| void DataPackMgr::release | ( | const DataPack * | dp | ) | [inline] |
| void DataPackMgr::release | ( | DataPack::ID | ) |
| void DataPackMgr::releaseAll | ( | bool | donotify | ) |
| static const ID DataPackMgr::SurfID | ( | ) | [static] |
Surface (triangulated) data: 5.
ID DataPackMgr::id_ [protected] |
Threads::ReadWriteLock DataPackMgr::lock_ [mutable, protected] |
Threads::Mutex DataPackMgr::mgrlistlock_ [static, protected] |
ManagedObjectSet<DataPackMgr> DataPackMgr::mgrs_ [static, protected] |
Passed CallBacker* = Pack.
ObjectSet<const DataPack> DataPackMgr::packs_ [protected] |
Passed CallBacker* = Pack.
1.7.1