OpendTect-6_4  6.4
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
EM::dgbSurfaceWriter Class Reference

Surface Writer. More...

Inheritance diagram for EM::dgbSurfaceWriter:
[legend]

Public Member Functions

 dgbSurfaceWriter (const IOObj *ioobj, const char *filetype, const EM::Surface &surface, bool binary)
 
 dgbSurfaceWriter (const char *fulluserexpr, const char *filetype, const EM::Surface &surface, bool binary)
 
 ~dgbSurfaceWriter ()
 
int nrSections () const
 
EM::SectionID sectionID (int) const
 
const char * sectionName (int) const
 
void selSections (const TypeSet< EM::SectionID > &, bool add=false)
 
void setShift (float)
 Shift is added to z values before writing. More...
 
int nrAuxVals () const
 
const char * auxDataName (int) const
 
const char * auxDataInfo (int) const
 
void selAuxData (const TypeSet< int > &)
 
const StepInterval< int > & rowInterval () const
 
const StepInterval< int > & colInterval () const
 
void setRowInterval (const StepInterval< int > &)
 
void setColInterval (const StepInterval< int > &)
 
bool writeOnlyZ () const
 
void setWriteOnlyZ (bool yn)
 
IOParpars ()
 
virtual od_int64 nrDone () const
 
virtual uiString uiNrDoneText () const
 will be nrDoneText() in 7.x More...
 
virtual od_int64 totalNr () const
 
virtual int nextStep ()
 
virtual uiString uiMessage () const
 will be message() again in 7.x More...
 
- Public Member Functions inherited from ExecutorGroup
 ExecutorGroup (const char *nm, bool parallel=false, bool ownsexecs=true)
 
virtual ~ExecutorGroup ()
 
virtual void add (Executor *)
 
int nrExecutors ()
 
ExecutorgetExecutor (int idx)
 
void setNrDoneText (const uiString &txt)
 If set, will use this and the counted nrdone. More...
 
- Public Member Functions inherited from Executor
 Executor (const char *nm)
 
virtual ~Executor ()
 
virtual int doStep ()
 
bool go (od_ostream *s=0, bool isfirst=true, bool islast=true, int delaybtwnstepsinms=0)
 
bool go (od_ostream &s, bool isfirst=true, bool islast=true, int delaybtwnstepsinms=0)
 
virtual bool execute ()
 
- Public Member Functions inherited from SequentialTask
 SequentialTask (const char *nm=0)
 
virtual ~SequentialTask ()
 
void setProgressMeter (ProgressMeter *)
 Must be called before execute() More...
 
ProgressMeterprogressMeter ()
 
const ProgressMeterprogressMeter () const
 
bool execute ()
 
- Public Member Functions inherited from Task
virtual ~Task ()
 
virtual void enableWorkControl (bool=true)
 Must be called before execute() More...
 
bool workControlEnabled () const
 
virtual void controlWork (Control)
 
virtual Control getState () const
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=0)
 
 NamedObject (const NamedObject *linkedto)
 
 NamedObject (const NamedObject &)
 
virtual ~NamedObject ()
 
void setLinkedTo (NamedObject *)
 
bool operator== (const NamedObject &oth) const
 
virtual const OD::Stringname () const
 
virtual const OD::StringannotName () const
 
virtual void setName (const char *)
 
void setCleanName (const char *)
 cleans string first More...
 
void deleteNotify (const CallBack &)
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

Protected Member Functions

bool writeNewSection (od_ostream &)
 
bool writeRow (od_ostream &)
 
bool writeDouble (od_ostream &, double, const char *) const
 
bool writeInt16 (od_ostream &, unsigned short, const char *) const
 
bool writeInt32 (od_ostream &, od_int32, const char *) const
 
bool writeInt64 (od_ostream &, od_int64, const char *) const
 
void finishWriting ()
 
void init (const char *fulluserexp)
 
- Protected Member Functions inherited from ExecutorGroup
virtual bool goToNextExecutor ()
 
void findNextSumStop ()
 
- Protected Member Functions inherited from Executor
virtual bool goImpl (od_ostream *, bool, bool, int)
 
- Protected Member Functions inherited from Task
 Task (const char *nm=0)
 
virtual bool shouldContinue ()
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Static Protected Member Functions

static const char * sTab ()
 
static const char * sEOL ()
 
static const char * sEOLTab ()
 

Protected Attributes

bool writingfinished_
 
StreamConnconn_
 
TypeSet< EM::SectionIDsectionsel_
 
TypeSet< od_int64sectionoffsets_
 
od_int64 nrsectionsoffsetoffset_
 
TypeSet< int > auxdatasel_
 
BufferString dbinfo_
 
IOParpar_
 
uiString msg_
 
BufferString fulluserexpr_
 
MultiID objectmid_
 
int nrdone_
 
int sectionindex_
 
int oldsectionindex_
 
od_int64 rowoffsettableoffset_
 
TypeSet< od_int64rowoffsettable_
 
int firstrow_
 
int nrrows_
 
int rowindex_
 
const EM::Surfacesurface_
 
const EM::RowColSurfaceGeometrygeometry_
 
StepInterval< int > rowrange_
 
StepInterval< int > colrange_
 
Interval< float > zrange_
 
StepInterval< int > * writerowrange_
 
StepInterval< int > * writecolrange_
 
Interval< int > writtenrowrange_
 
Interval< int > writtencolrange_
 
bool writeonlyz_
 
bool binary_
 
float shift_
 
BufferString filetype_
 
- Protected Attributes inherited from ExecutorGroup
int sumstart_
 
int sumstop_
 
const bool parallel_
 
int currentexec_
 
uiString nrdonetext_
 
ObjectSet< Executor > & executors_
 
TypeSet< int > executorres_
 
bool ownsexecs_
 
- Protected Attributes inherited from SequentialTask
ProgressMeterprogressmeter_
 
int lastupdate_
 
- Protected Attributes inherited from Task
Control control_
 
Threads::ConditionVarworkcontrolcondvar_
 
- Protected Attributes inherited from NamedObject
BufferStringname_
 
NamedObjectlinkedto_
 
CallBackSetdelnotify_
 

Private Member Functions

 mODTextTranslationClass (dgbSurfaceWriter)
 

Additional Inherited Members

- Public Types inherited from Task
enum  Control { Run, Pause, Stop }
 
- Static Public Member Functions inherited from SequentialTask
static int ErrorOccurred ()
 
static int Finished ()
 
static int MoreToDo ()
 
static int WarningAvailable ()
 
- Static Public Member Functions inherited from Task
static uiString stdNrDoneText ()
 
static uiString uiStdNrDoneText ()
 
- Public Attributes inherited from Executor
Notifier< Executorprestep
 
Notifier< Executorpoststep
 Only when MoreToDo will be returned. More...
 

Detailed Description

Surface Writer.

  1. Construct (no changes are made to filesystem)
  2. Select what you want to write
  3. Do NextStep

Constructor & Destructor Documentation

EM::dgbSurfaceWriter::dgbSurfaceWriter ( const IOObj ioobj,
const char *  filetype,
const EM::Surface surface,
bool  binary 
)
EM::dgbSurfaceWriter::dgbSurfaceWriter ( const char *  fulluserexpr,
const char *  filetype,
const EM::Surface surface,
bool  binary 
)

Sets up object, but does not touch file (that's done in nextStep() )

Parameters
ioobjThe IOObj with info about where to write data.
filetypeThe filetype that should be in the file header.
surfaceThe surface that should be written with data.
EM::dgbSurfaceWriter::~dgbSurfaceWriter ( )

Closes the stream

Member Function Documentation

const char* EM::dgbSurfaceWriter::auxDataInfo ( int  ) const
const char* EM::dgbSurfaceWriter::auxDataName ( int  ) const
const StepInterval<int>& EM::dgbSurfaceWriter::colInterval ( ) const
void EM::dgbSurfaceWriter::finishWriting ( )
protected
void EM::dgbSurfaceWriter::init ( const char *  fulluserexp)
protected
EM::dgbSurfaceWriter::mODTextTranslationClass ( dgbSurfaceWriter  )
private
virtual int EM::dgbSurfaceWriter::nextStep ( )
virtual
Return values
MoreToDo()Not finished. Call me again.
Finished()Nothing more to do.
ErrorOccurred()Something went wrong.
Note
if function returns a value greater than cMoreToDo(), it should be interpreted as cMoreToDo().

Reimplemented from ExecutorGroup.

int EM::dgbSurfaceWriter::nrAuxVals ( ) const
virtual od_int64 EM::dgbSurfaceWriter::nrDone ( ) const
virtual
Note
nrDone is only used for displaying progress and will be compared to totalNr to show user how large part of the task that is finished.

Reimplemented from ExecutorGroup.

int EM::dgbSurfaceWriter::nrSections ( ) const
IOPar* EM::dgbSurfaceWriter::pars ( )
const StepInterval<int>& EM::dgbSurfaceWriter::rowInterval ( ) const
EM::SectionID EM::dgbSurfaceWriter::sectionID ( int  ) const
const char* EM::dgbSurfaceWriter::sectionName ( int  ) const
void EM::dgbSurfaceWriter::selAuxData ( const TypeSet< int > &  )

The specified data will be written. If this function is not called, all avaliable auxdata will be written.

void EM::dgbSurfaceWriter::selSections ( const TypeSet< EM::SectionID > &  ,
bool  add = false 
)

The given sectionIDs will be written. If this function is not called, all avaliable sections will be written.

static const char* EM::dgbSurfaceWriter::sEOL ( )
inlinestaticprotected
static const char* EM::dgbSurfaceWriter::sEOLTab ( )
inlinestaticprotected
void EM::dgbSurfaceWriter::setColInterval ( const StepInterval< int > &  )
void EM::dgbSurfaceWriter::setRowInterval ( const StepInterval< int > &  )
void EM::dgbSurfaceWriter::setShift ( float  )

Shift is added to z values before writing.

void EM::dgbSurfaceWriter::setWriteOnlyZ ( bool  yn)
static const char* EM::dgbSurfaceWriter::sTab ( )
inlinestaticprotected
virtual od_int64 EM::dgbSurfaceWriter::totalNr ( ) const
virtual

Reimplemented from ExecutorGroup.

virtual uiString EM::dgbSurfaceWriter::uiMessage ( ) const
virtual

will be message() again in 7.x

Note
totalNr is only used for displaying progress.

Reimplemented from ExecutorGroup.

virtual uiString EM::dgbSurfaceWriter::uiNrDoneText ( ) const
virtual

will be nrDoneText() in 7.x

Reimplemented from ExecutorGroup.

bool EM::dgbSurfaceWriter::writeDouble ( od_ostream ,
double  ,
const char *   
) const
protected
bool EM::dgbSurfaceWriter::writeInt16 ( od_ostream ,
unsigned  short,
const char *   
) const
protected
bool EM::dgbSurfaceWriter::writeInt32 ( od_ostream ,
od_int32  ,
const char *   
) const
protected
bool EM::dgbSurfaceWriter::writeInt64 ( od_ostream ,
od_int64  ,
const char *   
) const
protected
bool EM::dgbSurfaceWriter::writeNewSection ( od_ostream )
protected
bool EM::dgbSurfaceWriter::writeOnlyZ ( ) const
bool EM::dgbSurfaceWriter::writeRow ( od_ostream )
protected

Member Data Documentation

TypeSet<int> EM::dgbSurfaceWriter::auxdatasel_
protected
bool EM::dgbSurfaceWriter::binary_
protected
StepInterval<int> EM::dgbSurfaceWriter::colrange_
protected
StreamConn* EM::dgbSurfaceWriter::conn_
protected
BufferString EM::dgbSurfaceWriter::dbinfo_
protected
BufferString EM::dgbSurfaceWriter::filetype_
protected
int EM::dgbSurfaceWriter::firstrow_
protected
BufferString EM::dgbSurfaceWriter::fulluserexpr_
protected
const EM::RowColSurfaceGeometry* EM::dgbSurfaceWriter::geometry_
protected
uiString EM::dgbSurfaceWriter::msg_
protected
int EM::dgbSurfaceWriter::nrdone_
protected
int EM::dgbSurfaceWriter::nrrows_
protected
od_int64 EM::dgbSurfaceWriter::nrsectionsoffsetoffset_
protected
MultiID EM::dgbSurfaceWriter::objectmid_
protected
int EM::dgbSurfaceWriter::oldsectionindex_
protected
IOPar* EM::dgbSurfaceWriter::par_
protected
int EM::dgbSurfaceWriter::rowindex_
protected
TypeSet<od_int64> EM::dgbSurfaceWriter::rowoffsettable_
protected
od_int64 EM::dgbSurfaceWriter::rowoffsettableoffset_
protected
StepInterval<int> EM::dgbSurfaceWriter::rowrange_
protected
int EM::dgbSurfaceWriter::sectionindex_
protected
TypeSet<od_int64> EM::dgbSurfaceWriter::sectionoffsets_
protected
TypeSet<EM::SectionID> EM::dgbSurfaceWriter::sectionsel_
protected
float EM::dgbSurfaceWriter::shift_
protected
const EM::Surface& EM::dgbSurfaceWriter::surface_
protected
StepInterval<int>* EM::dgbSurfaceWriter::writecolrange_
protected
bool EM::dgbSurfaceWriter::writeonlyz_
protected
StepInterval<int>* EM::dgbSurfaceWriter::writerowrange_
protected
bool EM::dgbSurfaceWriter::writingfinished_
protected
Interval<int> EM::dgbSurfaceWriter::writtencolrange_
protected
Interval<int> EM::dgbSurfaceWriter::writtenrowrange_
protected
Interval<float> EM::dgbSurfaceWriter::zrange_
protected

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