OpendTect-6_4  6.4
Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Static Private Member Functions | List of all members
Attrib::Desc Class Reference

Description of an attribute in an Attrib::DescSet. Each attribute has a name (e.g. "Similarity"), a user reference (e.g. "My similarity"), and at least one output. In addition, it may have parameters and inputs. If it has multiple outputs, only one of the outputs are selected. More...

Protected Member Functions

bool setInput_ (int, Desc *)
 
ParamfindParam (const char *key)
 

Static Protected Member Functions

static void getKeysVals (const char *defstr, BufferStringSet &keys, BufferStringSet &vals, const char *onlyneedkey=0)
 

Protected Attributes

TypeSet< Seis::DataTypeoutputtypes_
 
TypeSet< int > outputtypelinks_
 
bool issteering_
 
bool hidden_
 
bool needprovinit_
 
bool is2d_
 
bool isps_
 
Locality locality_
 
bool usestrcpos_
 
TypeSet< InputSpecinputspecs_
 
ObjectSet< Descinputs_
 
BufferString attribname_
 
ObjectSet< Paramparams_
 
BufferString userref_
 
int seloutput_
 
DescSetdescset_
 
DescStatusUpdater statusupdater_
 
DescDefaultsUpdater defaultsupdater_
 
BufferString errmsg_
 

Private Types

enum  SatisfyLevel { AllOk, Warning, Error }
 

Private Member Functions

mRefCountImpl(Desc) public Desc (const Desc &)
 
 Desc (const char *attrname, DescStatusUpdater updater=0, DescDefaultsUpdater defupdater=0)
 
const OD::StringattribName () const
 
void setDescSet (DescSet *)
 
DescSetdescSet () const
 
DescID id () const
 
bool getParentID (DescID cid, DescID &pid, int &) const
 
void getAncestorIDs (DescID cid, TypeSet< DescID > &, TypeSet< int > &) const
 
bool getDefStr (BufferString &) const
 
bool parseDefStr (const char *)
 
const char * userRef () const
 
void setUserRef (const char *)
 
int nrOutputs () const
 
void selectOutput (int)
 
int selectedOutput () const
 
Seis::DataType dataType (int output=-1) const
 
Locality locality () const
 
void setLocality (Locality l)
 
bool usesTracePosition () const
 
void setUsesTrcPos (bool yn)
 
bool isSteering () const
 
void setSteering (bool yn)
 
bool isHidden () const
 
void setHidden (bool yn)
 
bool isStored () const
 
bool isStoredInMem () const
 
BufferString getStoredID (bool recursive=false) const
 
BufferString getStoredType (bool recursive=false) const
 
void setNeedProvInit (bool yn=true)
 
bool needProvInit () const
 
int nrInputs () const
 
InputSpecinputSpec (int)
 
const InputSpecinputSpec (int) const
 
bool setInput (int, const Desc *)
 
DescgetInput (int)
 
const DescgetInput (int) const
 
void getInputs (TypeSet< Attrib::DescID > &) const
 
void getDependencies (TypeSet< Attrib::DescID > &) const
 
bool is2D () const
 
void set2D (bool yn)
 
bool isPS () const
 
void setPS (bool yn)
 
SatisfyLevel isSatisfied () const
 
const char * errMsg () const
 
void setErrMsg (const char *str)
 
bool isIdenticalTo (const Desc &, bool cmpoutput=true) const
 
bool isIdentifiedBy (const char *) const
 
DescID inputId (int idx) const
 
void addParam (Param *)
 
const ParamgetParam (const char *key) const
 
ParamgetParam (const char *key)
 
const ValParamgetValParam (const char *key) const
 
ValParamgetValParam (const char *key)
 
void setParamEnabled (const char *key, bool yn=true)
 
bool isParamEnabled (const char *key) const
 
void setParamRequired (const char *key, bool yn=true)
 
bool isParamRequired (const char *key) const
 
void updateParams ()
 
void updateDefaultParams ()
 
void changeStoredID (const char *)
 
void addInput (const InputSpec &)
 
bool removeInput (int idx)
 
void removeOutputs ()
 
void addOutputDataType (Seis::DataType)
 
void setNrOutputs (Seis::DataType, int)
 
void addOutputDataTypeSameAs (int)
 
void changeOutputDataType (int, Seis::DataType)
 
DescgetStoredInput () const
 
DescID getMultiOutputInputID () const
 
DesccloneDescAndPropagateInput (const DescID &, BufferString)
 

Static Private Member Functions

static bool getAttribName (const char *defstr, BufferString &)
 
static bool getParamString (const char *defstr, const char *key, BufferString &)
 
static void getKeysValsPublic (const char *defstr, BufferStringSet &keys, BufferStringSet &vals, const char *onlyneedkey=0)
 
static const char * sKeyInlDipComp ()
 
static const char * sKeyCrlDipComp ()
 
static const char * sKeyLineDipComp ()
 

Detailed Description

Description of an attribute in an Attrib::DescSet. Each attribute has a name (e.g. "Similarity"), a user reference (e.g. "My similarity"), and at least one output. In addition, it may have parameters and inputs. If it has multiple outputs, only one of the outputs are selected.

The attrib name, the parameters and the selected output number together form a definition string that defines what the attribute calculates.

Each Desc has DescID that is unique within it's DescSet.

Member Enumeration Documentation

Enumerator
AllOk 
Warning 
Error 

Constructor & Destructor Documentation

mRefCountImpl (Desc) public Attrib::Desc::Desc ( const Desc )
private
Attrib::Desc::Desc ( const char *  attrname,
DescStatusUpdater  updater = 0,
DescDefaultsUpdater  defupdater = 0 
)
private

Member Function Documentation

void Attrib::Desc::addInput ( const InputSpec )
private
void Attrib::Desc::addOutputDataType ( Seis::DataType  )
private
void Attrib::Desc::addOutputDataTypeSameAs ( int  )
private
void Attrib::Desc::addParam ( Param )
private

Pointer becomes mine

const OD::String& Attrib::Desc::attribName ( ) const
private
void Attrib::Desc::changeOutputDataType ( int  ,
Seis::DataType   
)
private
void Attrib::Desc::changeStoredID ( const char *  )
private
Desc* Attrib::Desc::cloneDescAndPropagateInput ( const DescID ,
BufferString   
)
private
Seis::DataType Attrib::Desc::dataType ( int  output = -1) const
private
Parameters
outputspecifies which output is required, or -1 for the selected output.
DescSet* Attrib::Desc::descSet ( ) const
private
const char* Attrib::Desc::errMsg ( ) const
private
Param* Attrib::Desc::findParam ( const char *  key)
protected
void Attrib::Desc::getAncestorIDs ( DescID  cid,
TypeSet< DescID > &  ,
TypeSet< int > &   
) const
private
static bool Attrib::Desc::getAttribName ( const char *  defstr,
BufferString  
)
staticprivate
bool Attrib::Desc::getDefStr ( BufferString ) const
private
void Attrib::Desc::getDependencies ( TypeSet< Attrib::DescID > &  ) const
private

Generates list of attributes this attribute is dependant on.

Desc* Attrib::Desc::getInput ( int  )
private
const Desc* Attrib::Desc::getInput ( int  ) const
private
void Attrib::Desc::getInputs ( TypeSet< Attrib::DescID > &  ) const
private
static void Attrib::Desc::getKeysVals ( const char *  defstr,
BufferStringSet keys,
BufferStringSet vals,
const char *  onlyneedkey = 0 
)
staticprotected

Fills and with pairs of parameters from the defstr.

static void Attrib::Desc::getKeysValsPublic ( const char *  defstr,
BufferStringSet keys,
BufferStringSet vals,
const char *  onlyneedkey = 0 
)
inlinestaticprivate

Fills and with pairs of parameters from the defstr.

DescID Attrib::Desc::getMultiOutputInputID ( ) const
private
const Param* Attrib::Desc::getParam ( const char *  key) const
private
Param* Attrib::Desc::getParam ( const char *  key)
private
static bool Attrib::Desc::getParamString ( const char *  defstr,
const char *  key,
BufferString  
)
staticprivate
bool Attrib::Desc::getParentID ( DescID  cid,
DescID pid,
int &   
) const
private
BufferString Attrib::Desc::getStoredID ( bool  recursive = false) const
private
Desc* Attrib::Desc::getStoredInput ( ) const
private
BufferString Attrib::Desc::getStoredType ( bool  recursive = false) const
private
const ValParam* Attrib::Desc::getValParam ( const char *  key) const
private
ValParam* Attrib::Desc::getValParam ( const char *  key)
private
DescID Attrib::Desc::id ( ) const
private
DescID Attrib::Desc::inputId ( int  idx) const
private
InputSpec& Attrib::Desc::inputSpec ( int  )
private
const InputSpec& Attrib::Desc::inputSpec ( int  ) const
private
bool Attrib::Desc::is2D ( ) const
inlineprivate
bool Attrib::Desc::isHidden ( ) const
inlineprivate

If hidden, it won't show up in UI.

bool Attrib::Desc::isIdenticalTo ( const Desc ,
bool  cmpoutput = true 
) const
private
bool Attrib::Desc::isIdentifiedBy ( const char *  ) const
private
bool Attrib::Desc::isParamEnabled ( const char *  key) const
private
bool Attrib::Desc::isParamRequired ( const char *  key) const
private
bool Attrib::Desc::isPS ( ) const
inlineprivate
SatisfyLevel Attrib::Desc::isSatisfied ( ) const
private

Checks whether all inputs are satisfied.

bool Attrib::Desc::isSteering ( ) const
inlineprivate
bool Attrib::Desc::isStored ( ) const
private
bool Attrib::Desc::isStoredInMem ( ) const
private
Locality Attrib::Desc::locality ( ) const
inlineprivate
bool Attrib::Desc::needProvInit ( ) const
inlineprivate
int Attrib::Desc::nrInputs ( ) const
private
int Attrib::Desc::nrOutputs ( ) const
private
bool Attrib::Desc::parseDefStr ( const char *  )
private
bool Attrib::Desc::removeInput ( int  idx)
private
void Attrib::Desc::removeOutputs ( )
private
int Attrib::Desc::selectedOutput ( ) const
private
void Attrib::Desc::selectOutput ( int  )
private
void Attrib::Desc::set2D ( bool  yn)
inlineprivate
void Attrib::Desc::setDescSet ( DescSet )
private
void Attrib::Desc::setErrMsg ( const char *  str)
inlineprivate
void Attrib::Desc::setHidden ( bool  yn)
inlineprivate

If hidden, it won't show up in UI.

bool Attrib::Desc::setInput ( int  ,
const Desc  
)
private
bool Attrib::Desc::setInput_ ( int  ,
Desc  
)
protected
void Attrib::Desc::setLocality ( Locality  l)
inlineprivate
void Attrib::Desc::setNeedProvInit ( bool  yn = true)
inlineprivate
void Attrib::Desc::setNrOutputs ( Seis::DataType  ,
int   
)
private
void Attrib::Desc::setParamEnabled ( const char *  key,
bool  yn = true 
)
private
void Attrib::Desc::setParamRequired ( const char *  key,
bool  yn = true 
)
private
void Attrib::Desc::setPS ( bool  yn)
inlineprivate
void Attrib::Desc::setSteering ( bool  yn)
inlineprivate
void Attrib::Desc::setUserRef ( const char *  )
private
void Attrib::Desc::setUsesTrcPos ( bool  yn)
inlineprivate
static const char* Attrib::Desc::sKeyCrlDipComp ( )
staticprivate
static const char* Attrib::Desc::sKeyInlDipComp ( )
staticprivate
static const char* Attrib::Desc::sKeyLineDipComp ( )
staticprivate
void Attrib::Desc::updateDefaultParams ( )
private
void Attrib::Desc::updateParams ( )
private
const char* Attrib::Desc::userRef ( ) const
private
bool Attrib::Desc::usesTracePosition ( ) const
inlineprivate

Member Data Documentation

BufferString Attrib::Desc::attribname_
protected
DescDefaultsUpdater Attrib::Desc::defaultsupdater_
protected
DescSet* Attrib::Desc::descset_
protected
BufferString Attrib::Desc::errmsg_
protected
bool Attrib::Desc::hidden_
protected
ObjectSet<Desc> Attrib::Desc::inputs_
protected
TypeSet<InputSpec> Attrib::Desc::inputspecs_
protected
bool Attrib::Desc::is2d_
protected
bool Attrib::Desc::isps_
protected
bool Attrib::Desc::issteering_
protected
Locality Attrib::Desc::locality_
protected
bool Attrib::Desc::needprovinit_
protected
TypeSet<int> Attrib::Desc::outputtypelinks_
protected
TypeSet<Seis::DataType> Attrib::Desc::outputtypes_
protected
ObjectSet<Param> Attrib::Desc::params_
protected
int Attrib::Desc::seloutput_
protected
DescStatusUpdater Attrib::Desc::statusupdater_
protected
BufferString Attrib::Desc::userref_
protected
bool Attrib::Desc::usestrcpos_
protected

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