OpendTect  6.3
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
DBKey Class Reference

Full key to any object in the OpendTect data store. More...

Inheritance diagram for DBKey:
[legend]

Public Types

typedef GroupID DirID
 
typedef GroupNrType DirNrType
 
- Public Types inherited from IDWithGroup< int, int >
typedef int GroupNrType
 
typedef int ObjNrType
 

Public Member Functions

 DBKey ()
 
 DBKey (const DBKey &oth)
 
 DBKey (DirID dirid, ObjID oid=ObjID::getInvalid())
 
 ~DBKey ()
 
DBKeyoperator= (const DBKey &)
 
bool operator== (const DBKey &) const
 
bool operator!= (const DBKey &oth) const
 
virtual bool isInvalid () const
 
bool hasValidDirID () const
 
DirID dirID () const
 
void setDirID (DirID id)
 
virtual BufferString toString () const
 
virtual void fromString (const char *)
 
uiString toUiString () const
 
bool hasAuxKey () const
 
BufferString auxKey () const
 
void setAuxKey (const char *)
 
 DBKey (const char *)
 
bool isEmpty () const
 
bool isUdf () const
 
void setEmpty ()
 
- Public Member Functions inherited from IDWithGroup< int, int >
 IDWithGroup ()
 
 IDWithGroup (GroupID gid, ObjID oid)
 
virtual ~IDWithGroup ()
 
GroupID groupID () const
 
ObjID objID () const
 
int groupNr () const
 
int objNr () const
 
void setGroupID (GroupID id)
 
void setObjID (ObjID id)
 
void setGroupNr (int nr)
 
void setObjNr (int nr)
 
bool operator== (const IDWithGroup &oth) const
 
bool operator!= (const IDWithGroup &oth) const
 
bool isValid () const
 
bool hasValidGroupID () const
 
bool hasValidObjID () const
 
void setInvalid ()
 
void setInvalidGroup ()
 
void setInvalidObj ()
 
virtual int64_t toInt64 () const
 
virtual void fromInt64 (int64_t)
 

Static Public Member Functions

static DBKey getInvalid ()
 
static DBKey get (DirNrType gnr, ObjNrType onr=-1)
 
static DBKey getFromString (const char *)
 
static DBKey getFromInt64 (int64_t)
 
static DBKey udf ()
 
- Static Public Member Functions inherited from IDWithGroup< int, int >
static IDWithGroup get (int grpnr, int objnr)
 
static IDWithGroup getInvalid ()
 
static bool isValidString (const char *)
 
static IDWithGroup getFromString (const char *)
 
static IDWithGroup getFromInt64 (int64_t)
 

Protected Member Functions

 DBKey (DirNrType dnr, ObjNrType onr=-1)
 
- Protected Member Functions inherited from IDWithGroup< int, int >
 IDWithGroup (int gnr, int onr)
 

Static Protected Member Functions

static void doGetfromString (DBKey &, const char *)
 

Protected Attributes

BufferStringauxkey_
 
- Protected Attributes inherited from IDWithGroup< int, int >
int groupnr_
 
int objnr_
 

Detailed Description

Full key to any object in the OpendTect data store.

The OpendTect data store is a meta-datastore. It is defined only by interfaces to store and retreive the data. All objects have at least one default storage in the flat-file default data storage - for example seismic data can be stored in CBVS files. Just as well, it can be stored in other data stores.

To identify the storage of objects, every object somewhere in a data store accessible for opendTect, you need its DBKey.

Previously, the key was a string-based class called MultiID. The DBKey replaces it with the safer and more compact IDWithGroup.

Member Typedef Documentation

typedef GroupID DBKey::DirID

Constructor & Destructor Documentation

DBKey::DBKey ( )
inline
DBKey::DBKey ( const DBKey oth)
inline
DBKey::DBKey ( DirID  dirid,
ObjID  oid = ObjID::getInvalid() 
)
inline
DBKey::~DBKey ( )
DBKey::DBKey ( const char *  )
DBKey::DBKey ( DirNrType  dnr,
ObjNrType  onr = -1 
)
inlineprotected

Member Function Documentation

BufferString DBKey::auxKey ( ) const
DirID DBKey::dirID ( ) const
inline
static void DBKey::doGetfromString ( DBKey ,
const char *   
)
staticprotected
virtual void DBKey::fromString ( const char *  )
virtual

Reimplemented from IDWithGroup< int, int >.

static DBKey DBKey::get ( DirNrType  gnr,
ObjNrType  onr = -1 
)
inlinestatic
static DBKey DBKey::getFromInt64 ( int64_t  )
static
static DBKey DBKey::getFromString ( const char *  )
static
static DBKey DBKey::getInvalid ( )
inlinestatic
bool DBKey::hasAuxKey ( ) const
inline
bool DBKey::hasValidDirID ( ) const
inline
bool DBKey::isEmpty ( ) const
inline
virtual bool DBKey::isInvalid ( ) const
inlinevirtual

Reimplemented from IDWithGroup< int, int >.

bool DBKey::isUdf ( ) const
inline
bool DBKey::operator!= ( const DBKey oth) const
inline
DBKey& DBKey::operator= ( const DBKey )
bool DBKey::operator== ( const DBKey ) const
void DBKey::setAuxKey ( const char *  )
void DBKey::setDirID ( DirID  id)
inline
void DBKey::setEmpty ( )
inline
virtual BufferString DBKey::toString ( ) const
virtual

Reimplemented from IDWithGroup< int, int >.

uiString DBKey::toUiString ( ) const
static DBKey DBKey::udf ( )
inlinestatic

Member Data Documentation

BufferString* DBKey::auxkey_
protected

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