Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes

EM::dgbSurfaceWriter Class Reference

Inheritance diagram for EM::dgbSurfaceWriter:
ExecutorGroup Executor SequentialTask Task NamedObject CallBacker

List of all members.

Public Member Functions

 dgbSurfaceWriter (const IOObj *ioobj, 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.
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 const char * nrDoneText () const
virtual od_int64 totalNr () const
virtual int nextStep ()
virtual const char * message () const

Protected Member Functions

bool writeNewSection (std::ostream &)
bool writeRow (std::ostream &)
bool writeFloat (std::ostream &, float, const char *) const
bool writeInt16 (std::ostream &, unsigned short, const char *) const
bool writeInt32 (std::ostream &, od_int32, const char *) const
bool writeInt64 (std::ostream &, od_int64, const char *) const
void finishWriting ()

Static Protected Member Functions

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

Protected Attributes

bool writingfinished_
StreamConnconn_
const IOObjioobj_
TypeSet< EM::SectionIDsectionsel_
TypeSet< od_int64 > sectionoffsets_
od_int64 nrsectionsoffsetoffset_
TypeSet< int > auxdatasel_
BufferString dbinfo_
IOParpar_
BufferString msg_
int nrdone_
int sectionindex_
int oldsectionindex_
od_int64 rowoffsettableoffset_
TypeSet< od_int64 > rowoffsettable_
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_

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 
)

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

Parameters:
ioobj The IOObj with info about where to write data.
filetype The filetype that should be in the file header.
surface The 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]
virtual const char* EM::dgbSurfaceWriter::message (  )  const [virtual]

Reimplemented from ExecutorGroup.

virtual int EM::dgbSurfaceWriter::nextStep (  )  [virtual]

Reimplemented from ExecutorGroup.

int EM::dgbSurfaceWriter::nrAuxVals (  )  const
virtual od_int64 EM::dgbSurfaceWriter::nrDone (  )  const [virtual]

Reimplemented from ExecutorGroup.

virtual const char* EM::dgbSurfaceWriter::nrDoneText (  )  const [virtual]

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 (  )  [inline, static, protected]
static const char* EM::dgbSurfaceWriter::sEOLTab (  )  [inline, static, protected]
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::sMsgWriteError (  )  [inline, static, protected]
static const char* EM::dgbSurfaceWriter::sTab (  )  [inline, static, protected]
virtual od_int64 EM::dgbSurfaceWriter::totalNr (  )  const [virtual]

Reimplemented from ExecutorGroup.

bool EM::dgbSurfaceWriter::writeFloat ( std::ostream &  ,
float  ,
const char *   
) const [protected]
bool EM::dgbSurfaceWriter::writeInt16 ( std::ostream &  ,
unsigned  short,
const char *   
) const [protected]
bool EM::dgbSurfaceWriter::writeInt32 ( std::ostream &  ,
od_int32  ,
const char *   
) const [protected]
bool EM::dgbSurfaceWriter::writeInt64 ( std::ostream &  ,
od_int64  ,
const char *   
) const [protected]
bool EM::dgbSurfaceWriter::writeNewSection ( std::ostream &   )  [protected]
bool EM::dgbSurfaceWriter::writeOnlyZ (  )  const
bool EM::dgbSurfaceWriter::writeRow ( std::ostream &   )  [protected]

Member Data Documentation

const IOObj* EM::dgbSurfaceWriter::ioobj_ [protected]
float EM::dgbSurfaceWriter::shift_ [protected]