Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends

CBVSReader Class Reference

Reader for CBVS format. More...

Inheritance diagram for CBVSReader:
CBVSIO

List of all members.

Public Member Functions

 CBVSReader (std::istream *, bool glob_info_only=false)
 ~CBVSReader ()
const CBVSInfoinfo () const
void close ()
BinID nextBinID () const
bool goTo (const BinID &, bool nearest_is_ok=false)
bool toStart ()
bool toNext ()
bool hasAuxInfo () const
void fetchAuxInfo (bool yn=true)
bool getAuxInfo (PosAuxInfo &)
bool fetch (void **buffers, const bool *comps=0, const Interval< int > *samps=0, int offs=0)
int trcNrAtPosition () const
const TypeSet< Coord > & trailerCoords () const

Static Public Member Functions

static const char * check (std::istream &)

Protected Member Functions

void getAuxInfoSel (const char *)
bool readComps ()
bool readGeom ()
bool readTrailer ()
void getText (int, BufferString &)
void toOffs (od_int64)
int getNextBinID (BinID &, int &, int &) const
 see nextPosIdx() for ret value
int getPosNr (const BinID &, bool, bool) const
Coord getTrailerCoord (const BinID &) const
void mkPosNrs ()
bool goToPosNrOffs (int posnr)
void setPos (int, const BinID &, int, int)

Protected Attributes

std::istream & strm_
CBVSInfo info_

Private Member Functions

bool readInfo (bool)
int nextPosIdx ()
CoordPol coordPol () const

Private Attributes

bool hinfofetched
int bytespertrace
BinID firstbinid
BinID lastbinid
int posidx
int auxnrbytes
bool needaux
DataInterpreter< int > iinterp
DataInterpreter< float > finterp
DataInterpreter< double > dinterp
HorSampling hs
Interval< int > samprg
TypeSet< int > posnrs
od_int64 lastposfo
od_int64 datastartfo
int curinlinfnr_
int cursegnr_

Friends

class CBVSReadMgr

Detailed Description

Reader for CBVS format.

The stream it works on will be deleted on destruction or if close() is explicitly called.

If you construct with glob_info_only == true, you cannot use the reader. After construction, the info() is then usable but no precise positioning is available. In other words, the trailer is not read.

From OpendTect v2.2.1, The toNext() interface will always return ascending inlines, no matter whether the data is stored with descending inlines.


Constructor & Destructor Documentation

CBVSReader::CBVSReader ( std::istream *  ,
bool  glob_info_only = false 
)
CBVSReader::~CBVSReader (  ) 

Member Function Documentation

static const char* CBVSReader::check ( std::istream &   )  [static]

Determines whether a file is a CBVS file returns an error message, or null if OK.

void CBVSReader::close (  )  [virtual]

Implements CBVSIO.

CoordPol CBVSReader::coordPol (  )  const [inline, private]
bool CBVSReader::fetch ( void **  buffers,
const bool *  comps = 0,
const Interval< int > *  samps = 0,
int  offs = 0 
)

Gets the sample data. 'comps', if provided, selects the components. If 'samps' is non-null, it should hold start and end sample to read. offs is an offset in the buffers.

void CBVSReader::fetchAuxInfo ( bool  yn = true  )  [inline]
bool CBVSReader::getAuxInfo ( PosAuxInfo  ) 

Gets the aux info. Follow by fetch() to get the sample data.

void CBVSReader::getAuxInfoSel ( const char *   )  [protected]
int CBVSReader::getNextBinID ( BinID ,
int &  ,
int &   
) const [protected]

see nextPosIdx() for ret value

int CBVSReader::getPosNr ( const BinID ,
bool  ,
bool   
) const [protected]
void CBVSReader::getText ( int  ,
BufferString  
) [protected]
Coord CBVSReader::getTrailerCoord ( const BinID  )  const [protected]
bool CBVSReader::goTo ( const BinID ,
bool  nearest_is_ok = false 
)
bool CBVSReader::goToPosNrOffs ( int  posnr  )  [protected]
bool CBVSReader::hasAuxInfo (  )  const [inline]
const CBVSInfo& CBVSReader::info (  )  const [inline]
void CBVSReader::mkPosNrs (  )  [protected]
BinID CBVSReader::nextBinID (  )  const
int CBVSReader::nextPosIdx (  )  [private]

0 = no more traces 1 = next trace adjacent to current 2 = next trace needs a jump

bool CBVSReader::readComps (  )  [protected]
bool CBVSReader::readGeom (  )  [protected]
bool CBVSReader::readInfo ( bool   )  [private]
bool CBVSReader::readTrailer (  )  [protected]
void CBVSReader::setPos ( int  ,
const BinID ,
int  ,
int   
) [protected]
bool CBVSReader::toNext (  ) 
void CBVSReader::toOffs ( od_int64   )  [protected]
bool CBVSReader::toStart (  ) 
const TypeSet<Coord>& CBVSReader::trailerCoords (  )  const [inline]
int CBVSReader::trcNrAtPosition (  )  const [inline]

Friends And Related Function Documentation

friend class CBVSReadMgr [friend]

Member Data Documentation

int CBVSReader::auxnrbytes [private]
int CBVSReader::curinlinfnr_ [mutable, private]
int CBVSReader::cursegnr_ [mutable, private]
od_int64 CBVSReader::datastartfo [private]
bool CBVSReader::hinfofetched [private]
od_int64 CBVSReader::lastposfo [private]
bool CBVSReader::needaux [private]
int CBVSReader::posidx [private]
TypeSet<int> CBVSReader::posnrs [private]
Interval<int> CBVSReader::samprg [private]
std::istream& CBVSReader::strm_ [protected]