OpendTect  6.3
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
ColTab::SequenceManager Class Reference

Manages Sequences; reads/writes system or user-defined. More...

Inheritance diagram for ColTab::SequenceManager:
[legend]

Public Types

typedef ObjectSet< Sequence >::size_type size_type
 
typedef size_type IdxType
 
typedef ConstRefMan< SequenceConstRef
 
- Public Types inherited from Monitorable
typedef int ChangeType
 
typedef int64_t IDType
 
typedef int64_t DirtyCountType
 
typedef CNotifier< Monitorable, ChangeDataChangeDataNotifier
 

Public Member Functions

 mDeclMonitorableAssignment (SequenceManager)
 
bool isPresent (const char *) const
 
ConstRef getByName (const char *) const
 can be null More...
 
ConstRef getAny (const char *, bool seismics_if_default=true) const
 guaranteed non-null More...
 
ConstRef getDefault (bool for_seismics=true) const
 guaranteed non-null More...
 
ConstRef getFromPar (const IOPar &, const char *subky=0) const
 guaranteed non-null More...
 
size_type size () const
 
Sequence::Status statusOf (const Sequence &) const
 
IdxType indexOf (const char *) const
 
IdxType indexOf (const Sequence &) const
 
ConstRef getByIdx (IdxType) const
 
void getSequenceNames (BufferStringSet &) const
 
bool needsSave () const
 
uiRetVal write (bool sys=false, bool applsetup=true) const
 
RefMan< Sequenceget4Edit (const char *) const
 
void add (Sequence *)
 
void removeByName (const char *)
 
ConstRef getSystemSeq (const char *) const
 
void rollbackFromCopy (const SequenceManager &)
 
bool isPresent (const OD::String &s) const
 
ConstRef getByName (const OD::String &s) const
 
ConstRef getAny (const OD::String &s, bool fs=true) const
 
IdxType indexOf (const OD::String &s) const
 
void removeByName (const OD::String &s)
 
- Public Member Functions inherited from Monitorable
 Monitorable (const Monitorable &)
 
virtual ~Monitorable ()
 
Monitorableoperator= (const Monitorable &)
 
bool operator== (const Monitorable &) const
 
virtual Monitorableclone () const
 
virtual ChangeDataNotifierobjectChanged () const
 
virtual Notifier< Monitorable > & objectToBeDeleted () const
 
virtual void touch () const
 
virtual DirtyCountType dirtyCount () const
 
virtual ChangeType compareWith (const Monitorable &) const
 
void sendChangeNotification (const ChangeData &) const
 
void sendEntireObjectChangeNotification () const
 
void transferNotifsTo (const Monitorable &, const CallBacker *onlyfor=0) 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 detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
virtual bool isCapsule () const
 
void stopReceivingNotifications () const
 

Static Public Member Functions

static ChangeType cSeqAdd ()
 
static ChangeType cSeqRemove ()
 
static const char * sKeyRemoved ()
 
static const SequencegetRGBBlendColSeq (int)
 0=red, 1=green, 2=blue 3=transp More...
 
static void deleteInst (SequenceManager *)
 
- Static Public Member Functions inherited from Monitorable
static Notifier< Monitorable > & instanceCreated ()
 defines static instanceCreated() More...
 
static ChangeType cEntireObjectChange ()
 
static ChangeType cNoChange ()
 
static IDType cUnspecChgID ()
 
static IDType cEntireObjectChgID ()
 
static ChangeType changeNotificationTypeOf (CallBacker *)
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Public Attributes

CNotifier< SequenceManager, ChangeData > nameChange
 provides name change notif for any of the seqs More...
 

Protected Member Functions

 SequenceManager ()
 
 ~SequenceManager ()
 
size_type gtSize () const
 
IdxType idxOf (const char *) const
 
const SequencegtAny (const char *, bool) const
 
void doAdd (Sequence *, bool issys)
 
void addFromPar (const IOPar &, bool)
 
void rollbackFrom (const SequenceManager &)
 
void seqChgCB (CallBacker *)
 
- Protected Member Functions inherited from Monitorable
 Monitorable ()
 
virtual MonitorablegetClone () const =0
 
void copyAll (const Monitorable &)
 
void sendChgNotif (AccessLocker &, const ChangeData &) const
 calls objectChanged with released lock More...
 
void sendChgNotif (AccessLocker &, ChangeType, IDType) const
 calls objectChanged with released lock More...
 
void sendDelNotif () const
 
void stopChangeNotifications () const
 
void resumeChangeNotifications () const
 
template<class T >
getMemberSimple (const T &) const
 the get function used by mImplSimpleMonitoredGet More...
 
template<class TMember , class TSetTo >
void setMemberSimple (TMember &, TSetTo, ChangeType, IDType)
 the set function used by mImplSimpleMonitoredSet More...
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 

Static Protected Member Functions

static IdxType gtIdxOf (const ObjectSet< Sequence > &, const char *)
 

Protected Attributes

ObjectSet< Sequenceseqs_
 
ObjectSet< Sequencesysseqs_
 
const bool iscopy_
 
DirtyCounter lastsaveddirtycount_
 
- Protected Attributes inherited from Monitorable
Threads::Lock accesslock_
 

Private Member Functions

 mODTextTranslationClass (ColTab::SequenceManager)
 

Friends

class Sequence
 
const SequenceManagerSeqMGR ()
 

Additional Inherited Members

- Protected Types inherited from Monitorable
typedef Threads::Atomic< DirtyCountTypeDirtyCounter
 

Detailed Description

Manages Sequences; reads/writes system or user-defined.

This class is not fully MT-safe; it does not (safely) support concurrent editing from different threads. That out of the way, we can do without IDs. The name of a sequence is its key. Names are compared case-insensitive. The name of a sequence can change though, watch the Sequence's notifications.

The class has a singleton instance ColTab::SeqMGR().

Member Typedef Documentation

Constructor & Destructor Documentation

ColTab::SequenceManager::SequenceManager ( )
protected
ColTab::SequenceManager::~SequenceManager ( )
protected

Member Function Documentation

void ColTab::SequenceManager::add ( Sequence )
void ColTab::SequenceManager::addFromPar ( const IOPar ,
bool   
)
protected
static ChangeType ColTab::SequenceManager::cSeqAdd ( )
inlinestatic
static ChangeType ColTab::SequenceManager::cSeqRemove ( )
inlinestatic
static void ColTab::SequenceManager::deleteInst ( SequenceManager )
static
void ColTab::SequenceManager::doAdd ( Sequence ,
bool  issys 
)
protected
RefMan<Sequence> ColTab::SequenceManager::get4Edit ( const char *  ) const
ConstRef ColTab::SequenceManager::getAny ( const char *  ,
bool  seismics_if_default = true 
) const

guaranteed non-null

ConstRef ColTab::SequenceManager::getAny ( const OD::String s,
bool  fs = true 
) const
inline
ConstRef ColTab::SequenceManager::getByIdx ( IdxType  ) const
ConstRef ColTab::SequenceManager::getByName ( const char *  ) const

can be null

ConstRef ColTab::SequenceManager::getByName ( const OD::String s) const
inline
ConstRef ColTab::SequenceManager::getDefault ( bool  for_seismics = true) const

guaranteed non-null

ConstRef ColTab::SequenceManager::getFromPar ( const IOPar ,
const char *  subky = 0 
) const

guaranteed non-null

static const Sequence& ColTab::SequenceManager::getRGBBlendColSeq ( int  )
static

0=red, 1=green, 2=blue 3=transp

void ColTab::SequenceManager::getSequenceNames ( BufferStringSet ) const
ConstRef ColTab::SequenceManager::getSystemSeq ( const char *  ) const
const Sequence* ColTab::SequenceManager::gtAny ( const char *  ,
bool   
) const
protected
static IdxType ColTab::SequenceManager::gtIdxOf ( const ObjectSet< Sequence > &  ,
const char *   
)
staticprotected
size_type ColTab::SequenceManager::gtSize ( ) const
protected
IdxType ColTab::SequenceManager::idxOf ( const char *  ) const
protected
IdxType ColTab::SequenceManager::indexOf ( const char *  ) const
IdxType ColTab::SequenceManager::indexOf ( const Sequence ) const
IdxType ColTab::SequenceManager::indexOf ( const OD::String s) const
inline
bool ColTab::SequenceManager::isPresent ( const char *  ) const
bool ColTab::SequenceManager::isPresent ( const OD::String s) const
inline
ColTab::SequenceManager::mDeclMonitorableAssignment ( SequenceManager  )
ColTab::SequenceManager::mODTextTranslationClass ( ColTab::SequenceManager  )
private
bool ColTab::SequenceManager::needsSave ( ) const
void ColTab::SequenceManager::removeByName ( const char *  )
void ColTab::SequenceManager::removeByName ( const OD::String s)
inline
void ColTab::SequenceManager::rollbackFrom ( const SequenceManager )
protected
void ColTab::SequenceManager::rollbackFromCopy ( const SequenceManager )
void ColTab::SequenceManager::seqChgCB ( CallBacker )
protected
size_type ColTab::SequenceManager::size ( ) const
static const char* ColTab::SequenceManager::sKeyRemoved ( )
static
Sequence::Status ColTab::SequenceManager::statusOf ( const Sequence ) const
uiRetVal ColTab::SequenceManager::write ( bool  sys = false,
bool  applsetup = true 
) const

Friends And Related Function Documentation

const SequenceManager& SeqMGR ( )
friend
friend class Sequence
friend

Member Data Documentation

const bool ColTab::SequenceManager::iscopy_
protected
DirtyCounter ColTab::SequenceManager::lastsaveddirtycount_
mutableprotected
CNotifier<SequenceManager,ChangeData> ColTab::SequenceManager::nameChange
mutable

provides name change notif for any of the seqs

ObjectSet<Sequence> ColTab::SequenceManager::seqs_
protected
ObjectSet<Sequence> ColTab::SequenceManager::sysseqs_
protected

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