OpendTect 8.0
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
IOMan Class Referencefinal

#include <ioman.h>

Inheritance diagram for IOMan:
[legend]

Classes

class  CustomDirData
 

Public Member Functions

uiRetVal cancelTempSurvey ()
 
bool changeSurveyBlocked () const
 
bool commitChanges (const IOObj &)
 
bool commitChanges (const ObjectSet< const IOObj > &)
 
MultiID createNewKey (const MultiID &dirkey)
 
BufferString curDirName () const
 OS dir name.
 
bool ensureUniqueName (IOObj &)
 
IOObjget (const char *objname, const char *tgname) const
 
IOObjget (const DBKey &) const
 Next functions return a new (unmanaged) IOObj.
 
IOObjget (const IOObjContext &, const char *objnm) const
 
IOObjget (const MultiID &) const
 
IOObjget (const OD::DataSetKey &, const char *tgname=nullptr) const
 
IODirgetDir (const char *trlgrpnm) const
 
IODirgetDir (const MultiID &) const
 
IODirgetDir (IOObjContext::StdSelType) const
 
void getEntry (CtxtIOObj &, bool newistmp=false, int translidxingroup=-1)
 will create a new entry if necessary
 
IOObjgetFirst (const IOObjContext &, int *nrpresent=0) const
 if interested in nrpresent pass valid address
 
IOObjgetFromPar (const IOPar &, const char *basekey, const IOObjContext &, bool mknew, BufferString &errmsg) const
 
IOObjgetIfOnlyOne (const char *trgroupname)
 
IOObjgetLocal (const char *objname, const char *tgname) const
 
void getNewEntries (ObjectSet< CtxtIOObj > &, bool newistmp=false, int translidxingroup=-1)
 
void getNewEntry (CtxtIOObj &, bool newistmp=false, int translidxingroup=-1)
 will create a new entry if necessary
 
IOObjgetOfGroup (const char *tgname, bool first=true, bool onlyifsingle=false) const
 
bool implExists (const MultiID &) const
 
bool implIsLink (const MultiID &) const
 
bool implReloc (const MultiID &, const char *newdir)
 
bool implRemove (const IOObj &, bool deep=true) const
 
bool implRemove (const MultiID &, bool rmentry=false, uiRetVal *uirv=nullptr)
 
bool implRemove (const TypeSet< MultiID > &, bool rmentry=false, uiRetVal *uirv=nullptr)
 
bool implRename (const MultiID &, const char *newnm)
 
bool isBad () const
 
bool isKey (const char *keystr) const
 
bool isPresent (const char *, const char *tgname=0) const
 
bool isPresent (const MultiID &) const
 
bool isReadOnly (const MultiID &) const
 
bool isReady () const
 
bool isUsable (const DBKey &) const
 
bool isUsable (const MultiID &) const
 
bool isUsingTempSurvey () const
 
const MultiIDkey () const
 of current IODir
 
const OD::Stringmessage () const
 
const char * nameOf (const char *keystr) const
 if keystr is not an IOObj key, will return keystr
 
const char * nameOf (const MultiID &) const
 
const char * objectName (const DBKey &) const
 
bool permRemove (const MultiID &)
 Removes only entry in IODir.
 
bool permRemove (const TypeSet< MultiID > &)
 Removes only entries in IODir.
 
void removeUnusable (DBKeySet &)
 
const SurveyDiskLocationrootDir () const
 Full path to the root of the current project.
 
void setChangeSurveyBlocked (bool yn)
 
uiRetVal setTempSurvey (const SurveyDiskLocation &)
 
BufferString surveyName () const
 
bool to (const MultiID &, bool force_reread=false)
 
bool to (IOObjContext::StdSelType, bool force_reread=false)
 
bool toRoot (bool force_reread=false)
 
const uiStringuiMessage () const
 
- Public Member Functions inherited from NamedCallBacker
 NamedCallBacker (const char *nm=nullptr)
 
 NamedCallBacker (const NamedCallBacker &)=delete
 
 ~NamedCallBacker ()
 
virtual Notifier< NamedCallBacker > & objectToBeDeleted () const
 
NamedCallBackeroperator= (const NamedCallBacker &)=delete
 
bool operator== (const NamedCallBacker &oth) const
 
bool operator== (const NamedObject &oth) const
 
- 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.
 
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.
 
CallBackeroperator= (const CallBacker &)=delete
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
virtual BufferString getName () const
 
bool getNameFromPar (const IOPar &)
 
const name_typename () const override
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
virtual void setName (const char *nm)
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 

Static Public Member Functions

static const MultiIDaddCustomDataDir (const CustomDirData &)
 
static IOSubDirgetIOSubDir (const CustomDirData &)
 
static BufferString getNewTempDataRootDir ()
 
static void getObjectNames (const DBKeySet &, BufferStringSet &)
 
static Notifier< IOMan > & iomReady ()
 
static bool isOK ()
 
static bool isPreparedForSurveyChange ()
 
static uiRetVal isValidDataRoot (const char *dirnm)
 Full path to a writable directory.
 
static uiRetVal isValidSurveyDir (const char *dirnm)
 Full path to an OpendTect project directory.
 
static uiRetVal newSurvey (SurveyInfo *newsi=nullptr)
 
static bool prepareDataRoot (const char *dirnm)
 
static bool recordDataSource (const SurveyDiskLocation &, uiRetVal &)
 
static uiRetVal setDataSource (const char *dataroot, const char *survdir, bool refresh=false)
 
static uiRetVal setDataSource (const char *fullpath, bool refresh=false)
 
static uiRetVal setDataSource (const CommandLineParser &, bool refresh=false)
 
static uiRetVal setDataSource (const IOPar &, bool refresh=false)
 
static uiRetVal setSurvey (const char *surveydirnm)
 
static void surveyParsChanged ()
 
static bool validSurveySetup (BufferString &errmsg)
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Public Attributes

Notifier< IOManafterSurveyChange
 When operating in normal state.
 
Notifier< IOManapplicationClosing
 'Final' call ...
 
CNotifier< IOMan, const TypeSet< MultiID > & > entriesAdded
 
CNotifier< IOMan, const TypeSet< MultiID > & > entriesRemoved
 
CNotifier< IOMan, const MultiID & > entryAdded
 
CNotifier< IOMan, const MultiID & > entryChanged
 
CNotifier< IOMan, const MultiID & > entryRemoved
 
CNotifier< IOMan, const MultiID & > implUpdated
 
Notifier< IOMannewIODir
 
Notifier< IOManprepareSurveyChange
 Prepare, don't tear down.
 
Notifier< IOMansurveyChanged
 To restore OD to normal state.
 
Notifier< IOMansurveyToBeChanged
 Before the change, tear down.
 

Private Types

enum  State { Bad , NeedInit , Good }
 

Private Member Functions

 IOMan (const FilePath &rootdir)
 
 ~IOMan ()
 
void applClosing ()
 
bool close (bool dotrigger)
 
IOObjcrWriteIOObj (const CtxtIOObj &, const MultiID &, int) const
 
int curLevel () const
 
bool doReloc (const MultiID &, Translator *, IOStream &, IOStream &)
 
void getCtxtObjsByGroup (const ObjectSet< CtxtIOObj > &, ObjectSet< ObjectSet< CtxtIOObj > > &)
 
void getIdsByGroup (const TypeSet< MultiID > &, ObjectSet< TypeSet< MultiID > > &)
 
const IOObjgetIOObjFromCtxt (const CtxtIOObj &, bool isnew, bool newistmp, int translidxingroup)
 
void getObjEntries (const ObjectSet< CtxtIOObj > &, bool isnew, bool newistmp=false, int translidxingroup=-1)
 
void getObjEntry (CtxtIOObj &, bool isnew, bool newistmp=false, int translidxingroup=-1)
 
void getObjsByGroup (const ObjectSet< const IOObj > &, ObjectSet< ObjectSet< const IOObj > > &)
 
uiRetVal init (SurveyInfo *newsi)
 
int levelOf (const char *dirnm) const
 
uiRetVal reInit (SurveyInfo *newsi)
 
uiRetVal setDir (const char *)
 
uiRetVal setRootDir (const FilePath &, bool ischecked=false)
 fullPath to the survey directory
 
bool to (const IOSubDir *, bool)
 

Static Private Member Functions

static void setupCustomDataDirs (int)
 
static bool writeSettingsSurveyFile (const char *dirnm, uiRetVal &)
 

Private Attributes

int curlvl_
 
IODirdirptr_ = nullptr
 
ManagedObjectSet< IODirdirptrs_
 
Threads::Lock lock_
 
uiString msg_
 
SurveyDiskLocationprevrootdir_ = nullptr
 
SurveyDiskLocation rootdir_
 
State state_ = NeedInit
 
bool survchgblocked_ = false
 

Friends

class BatchProgram
 
IOManIOM ()
 
class IOMManager
 
class ServiceMgrBase
 
class SurveyDataTreePreparer
 
class uiMain
 

Additional Inherited Members

- Public Types inherited from ObjectWithName
typedef OD::String name_type
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Detailed Description

<>

Member Enumeration Documentation

◆ State

enum IOMan::State
private
Enumerator
Bad 
NeedInit 
Good 

Constructor & Destructor Documentation

◆ IOMan()

IOMan::IOMan ( const FilePath & rootdir)
private

◆ ~IOMan()

IOMan::~IOMan ( )
private

Member Function Documentation

◆ addCustomDataDir()

static const MultiID & IOMan::addCustomDataDir ( const CustomDirData & )
static

Need to do this only once per OD run At survey change, dir will automatically be added

◆ applClosing()

void IOMan::applClosing ( )
inlineprivate

◆ cancelTempSurvey()

uiRetVal IOMan::cancelTempSurvey ( )

◆ changeSurveyBlocked()

bool IOMan::changeSurveyBlocked ( ) const
inline

◆ close()

bool IOMan::close ( bool dotrigger)
private

◆ commitChanges() [1/2]

bool IOMan::commitChanges ( const IOObj & )

◆ commitChanges() [2/2]

bool IOMan::commitChanges ( const ObjectSet< const IOObj > & )

◆ createNewKey()

MultiID IOMan::createNewKey ( const MultiID & dirkey)

◆ crWriteIOObj()

IOObj * IOMan::crWriteIOObj ( const CtxtIOObj & ,
const MultiID & ,
int  ) const
private

◆ curDirName()

BufferString IOMan::curDirName ( ) const

OS dir name.

◆ curLevel()

int IOMan::curLevel ( ) const
inlineprivate

◆ doReloc()

bool IOMan::doReloc ( const MultiID & ,
Translator * ,
IOStream & ,
IOStream &  )
private

◆ ensureUniqueName()

bool IOMan::ensureUniqueName ( IOObj & )

◆ get() [1/5]

IOObj * IOMan::get ( const char * objname,
const char * tgname ) const

◆ get() [2/5]

IOObj * IOMan::get ( const DBKey & ) const

Next functions return a new (unmanaged) IOObj.

◆ get() [3/5]

IOObj * IOMan::get ( const IOObjContext & ,
const char * objnm ) const

◆ get() [4/5]

IOObj * IOMan::get ( const MultiID & ) const

◆ get() [5/5]

IOObj * IOMan::get ( const OD::DataSetKey & ,
const char * tgname = nullptr ) const

◆ getCtxtObjsByGroup()

void IOMan::getCtxtObjsByGroup ( const ObjectSet< CtxtIOObj > & ,
ObjectSet< ObjectSet< CtxtIOObj > > &  )
private

◆ getDir() [1/3]

IODir * IOMan::getDir ( const char * trlgrpnm) const

◆ getDir() [2/3]

IODir * IOMan::getDir ( const MultiID & ) const

◆ getDir() [3/3]

IODir * IOMan::getDir ( IOObjContext::StdSelType ) const

◆ getEntry()

void IOMan::getEntry ( CtxtIOObj & ,
bool newistmp = false,
int translidxingroup = -1 )

will create a new entry if necessary

◆ getFirst()

IOObj * IOMan::getFirst ( const IOObjContext & ,
int * nrpresent = 0 ) const

if interested in nrpresent pass valid address

◆ getFromPar()

IOObj * IOMan::getFromPar ( const IOPar & ,
const char * basekey,
const IOObjContext & ,
bool mknew,
BufferString & errmsg ) const

◆ getIdsByGroup()

void IOMan::getIdsByGroup ( const TypeSet< MultiID > & ,
ObjectSet< TypeSet< MultiID > > &  )
private

◆ getIfOnlyOne()

IOObj * IOMan::getIfOnlyOne ( const char * trgroupname)
inline

◆ getIOObjFromCtxt()

const IOObj * IOMan::getIOObjFromCtxt ( const CtxtIOObj & ,
bool isnew,
bool newistmp,
int translidxingroup )
private

◆ getIOSubDir()

static IOSubDir * IOMan::getIOSubDir ( const CustomDirData & )
static

◆ getLocal()

IOObj * IOMan::getLocal ( const char * objname,
const char * tgname ) const

◆ getNewEntries()

void IOMan::getNewEntries ( ObjectSet< CtxtIOObj > & ,
bool newistmp = false,
int translidxingroup = -1 )

◆ getNewEntry()

void IOMan::getNewEntry ( CtxtIOObj & ,
bool newistmp = false,
int translidxingroup = -1 )

will create a new entry if necessary

◆ getNewTempDataRootDir()

static BufferString IOMan::getNewTempDataRootDir ( )
static

◆ getObjectNames()

static void IOMan::getObjectNames ( const DBKeySet & ,
BufferStringSet &  )
static

◆ getObjEntries()

void IOMan::getObjEntries ( const ObjectSet< CtxtIOObj > & ,
bool isnew,
bool newistmp = false,
int translidxingroup = -1 )
private

◆ getObjEntry()

void IOMan::getObjEntry ( CtxtIOObj & ,
bool isnew,
bool newistmp = false,
int translidxingroup = -1 )
private

◆ getObjsByGroup()

void IOMan::getObjsByGroup ( const ObjectSet< const IOObj > & ,
ObjectSet< ObjectSet< const IOObj > > &  )
private

◆ getOfGroup()

IOObj * IOMan::getOfGroup ( const char * tgname,
bool first = true,
bool onlyifsingle = false ) const

◆ implExists()

bool IOMan::implExists ( const MultiID & ) const

◆ implIsLink()

bool IOMan::implIsLink ( const MultiID & ) const

◆ implReloc()

bool IOMan::implReloc ( const MultiID & ,
const char * newdir )

◆ implRemove() [1/3]

bool IOMan::implRemove ( const IOObj & ,
bool deep = true ) const

◆ implRemove() [2/3]

bool IOMan::implRemove ( const MultiID & ,
bool rmentry = false,
uiRetVal * uirv = nullptr )

◆ implRemove() [3/3]

bool IOMan::implRemove ( const TypeSet< MultiID > & ,
bool rmentry = false,
uiRetVal * uirv = nullptr )

◆ implRename()

bool IOMan::implRename ( const MultiID & ,
const char * newnm )

◆ init()

uiRetVal IOMan::init ( SurveyInfo * newsi)
private

◆ iomReady()

static Notifier< IOMan > & IOMan::iomReady ( )
static

◆ isBad()

bool IOMan::isBad ( ) const
inline

◆ isKey()

bool IOMan::isKey ( const char * keystr) const

◆ isOK()

static bool IOMan::isOK ( )
static

◆ isPreparedForSurveyChange()

static bool IOMan::isPreparedForSurveyChange ( )
static

◆ isPresent() [1/2]

bool IOMan::isPresent ( const char * ,
const char * tgname = 0 ) const

Use before creating a named object

Parameters
tgnameexample: EMHorizon3DTranslatorGroup::sGroupName().str()

◆ isPresent() [2/2]

bool IOMan::isPresent ( const MultiID & ) const

◆ isReadOnly()

bool IOMan::isReadOnly ( const MultiID & ) const

◆ isReady()

bool IOMan::isReady ( ) const

◆ isUsable() [1/2]

bool IOMan::isUsable ( const DBKey & ) const

◆ isUsable() [2/2]

bool IOMan::isUsable ( const MultiID & ) const

◆ isUsingTempSurvey()

bool IOMan::isUsingTempSurvey ( ) const
inline

◆ isValidDataRoot()

static uiRetVal IOMan::isValidDataRoot ( const char * dirnm)
static

Full path to a writable directory.

◆ isValidSurveyDir()

static uiRetVal IOMan::isValidSurveyDir ( const char * dirnm)
static

Full path to an OpendTect project directory.

◆ key()

const MultiID & IOMan::key ( ) const

of current IODir

◆ levelOf()

int IOMan::levelOf ( const char * dirnm) const
private

◆ message()

const OD::String & IOMan::message ( ) const
inline

◆ nameOf() [1/2]

const char * IOMan::nameOf ( const char * keystr) const

if keystr is not an IOObj key, will return keystr

◆ nameOf() [2/2]

const char * IOMan::nameOf ( const MultiID & ) const

◆ newSurvey()

static uiRetVal IOMan::newSurvey ( SurveyInfo * newsi = nullptr)
static

set new SurveyInfo; force re-read the data tree. newsi becomes mine

◆ objectName()

const char * IOMan::objectName ( const DBKey & ) const

◆ permRemove() [1/2]

bool IOMan::permRemove ( const MultiID & )

Removes only entry in IODir.

◆ permRemove() [2/2]

bool IOMan::permRemove ( const TypeSet< MultiID > & )

Removes only entries in IODir.

◆ prepareDataRoot()

static bool IOMan::prepareDataRoot ( const char * dirnm)
static

◆ recordDataSource()

static bool IOMan::recordDataSource ( const SurveyDiskLocation & ,
uiRetVal &  )
static

records dataroot in settings, and project in survey file

◆ reInit()

uiRetVal IOMan::reInit ( SurveyInfo * newsi)
private

◆ removeUnusable()

void IOMan::removeUnusable ( DBKeySet & )

◆ rootDir()

const SurveyDiskLocation & IOMan::rootDir ( ) const
inline

Full path to the root of the current project.

◆ setChangeSurveyBlocked()

void IOMan::setChangeSurveyBlocked ( bool yn)
inline

◆ setDataSource() [1/4]

static uiRetVal IOMan::setDataSource ( const char * dataroot,
const char * survdir,
bool refresh = false )
static

Triggers the post-survey change notifiers

◆ setDataSource() [2/4]

static uiRetVal IOMan::setDataSource ( const char * fullpath,
bool refresh = false )
static

◆ setDataSource() [3/4]

static uiRetVal IOMan::setDataSource ( const CommandLineParser & ,
bool refresh = false )
static

◆ setDataSource() [4/4]

static uiRetVal IOMan::setDataSource ( const IOPar & ,
bool refresh = false )
static

◆ setDir()

uiRetVal IOMan::setDir ( const char * )
private

◆ setRootDir()

uiRetVal IOMan::setRootDir ( const FilePath & ,
bool ischecked = false )
private

fullPath to the survey directory

◆ setSurvey()

static uiRetVal IOMan::setSurvey ( const char * surveydirnm)
static

will remove existing IO manager and set the survey to 'name', thus bypassing the .od/survey file

◆ setTempSurvey()

uiRetVal IOMan::setTempSurvey ( const SurveyDiskLocation & )

◆ setupCustomDataDirs()

static void IOMan::setupCustomDataDirs ( int )
staticprivate

◆ surveyName()

BufferString IOMan::surveyName ( ) const

◆ surveyParsChanged()

static void IOMan::surveyParsChanged ( )
static

◆ to() [1/3]

bool IOMan::to ( const IOSubDir * ,
bool  )
private

◆ to() [2/3]

bool IOMan::to ( const MultiID & ,
bool force_reread = false )

◆ to() [3/3]

bool IOMan::to ( IOObjContext::StdSelType ,
bool force_reread = false )

◆ toRoot()

bool IOMan::toRoot ( bool force_reread = false)
inline

◆ uiMessage()

const uiString & IOMan::uiMessage ( ) const
inline

◆ validSurveySetup()

static bool IOMan::validSurveySetup ( BufferString & errmsg)
static

◆ writeSettingsSurveyFile()

static bool IOMan::writeSettingsSurveyFile ( const char * dirnm,
uiRetVal &  )
staticprivate

Friends And Related Symbol Documentation

◆ BatchProgram

friend class BatchProgram
friend

◆ IOM

IOMan & IOM ( )
friend

◆ IOMManager

friend class IOMManager
friend

◆ ServiceMgrBase

friend class ServiceMgrBase
friend

◆ SurveyDataTreePreparer

friend class SurveyDataTreePreparer
friend

◆ uiMain

friend class uiMain
friend

Member Data Documentation

◆ afterSurveyChange

Notifier<IOMan> IOMan::afterSurveyChange

When operating in normal state.

◆ applicationClosing

Notifier<IOMan> IOMan::applicationClosing

'Final' call ...

◆ curlvl_

int IOMan::curlvl_
private

◆ dirptr_

IODir* IOMan::dirptr_ = nullptr
private

◆ dirptrs_

ManagedObjectSet<IODir> IOMan::dirptrs_
private

◆ entriesAdded

CNotifier<IOMan,const TypeSet<MultiID>&> IOMan::entriesAdded

◆ entriesRemoved

CNotifier<IOMan,const TypeSet<MultiID>&> IOMan::entriesRemoved

◆ entryAdded

CNotifier<IOMan,const MultiID&> IOMan::entryAdded

◆ entryChanged

CNotifier<IOMan,const MultiID&> IOMan::entryChanged

◆ entryRemoved

CNotifier<IOMan,const MultiID&> IOMan::entryRemoved

◆ implUpdated

CNotifier<IOMan,const MultiID&> IOMan::implUpdated

◆ lock_

Threads::Lock IOMan::lock_
mutableprivate

◆ msg_

uiString IOMan::msg_
private

◆ newIODir

Notifier<IOMan> IOMan::newIODir

◆ prepareSurveyChange

Notifier<IOMan> IOMan::prepareSurveyChange

Prepare, don't tear down.

◆ prevrootdir_

SurveyDiskLocation* IOMan::prevrootdir_ = nullptr
private

◆ rootdir_

SurveyDiskLocation IOMan::rootdir_
private

◆ state_

State IOMan::state_ = NeedInit
private

◆ survchgblocked_

bool IOMan::survchgblocked_ = false
private

◆ surveyChanged

Notifier<IOMan> IOMan::surveyChanged

To restore OD to normal state.

◆ surveyToBeChanged

Notifier<IOMan> IOMan::surveyToBeChanged

Before the change, tear down.


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