OpendTect  7.0
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
od_istream Class Reference

OD class for stream read common access to the std::cin. More...

Inheritance diagram for od_istream:
[legend]

Public Member Functions

 od_istream ()
 
 od_istream (const char *fnm)
 
 od_istream (const FilePath &fp)
 
 od_istream (const OS::MachineCommand &mc, const char *workdir=nullptr)
 
 od_istream (od_istream &&)
 
 od_istream (std::istream &s)
 
 od_istream (std::istream *s)
 
bool atEOF () const
 
Pos endPosition () const
 
od_istreamget (BufferString &bs, bool allowgotonextline=true)
 
od_istreamget (char &)
 
od_istreamget (char *)=delete
 
od_istreamget (CompoundKey &)
 
od_istreamget (double &)
 
od_istreamget (float &)
 
od_istreamget (IOPar &)
 
od_istreamget (long &)
 
od_istreamget (SeparString &)
 
od_istreamget (std::int16_t &)
 
od_istreamget (std::int32_t &)
 
od_istreamget (std::int64_t &)
 
od_istreamget (std::uint16_t &)
 
od_istreamget (std::uint32_t &)
 
od_istreamget (std::uint64_t &)
 
od_istreamget (StringView &)=delete
 
od_istreamget (unsigned char &)
 
od_istreamget (unsigned long &)
 
od_istreamget (void *)=delete
 
bool getAll (BufferString &)
 
template<class T >
od_istreamgetBin (T &)
 
bool getBin (void *, Count nrbytes)
 
od_istreamgetC (char *, int sz, int maxnrchar)
 
bool getLine (BufferString &, bool *newline_found=0)
 
bool getWord (BufferString &, bool allowgotonextline=true)
 
void ignore (Count)
 
Count lastNrBytesRead () const
 
bool open (const char *)
 
od_istreamoperator= (od_istream &&)
 
char peek () const
 
bool reOpen ()
 
void setReadPosition (Pos, Ref r=Abs)
 
bool skipLine ()
 
bool skipUntil (char)
 
bool skipWord ()
 
std::istream & stdStream ()
 
- Public Member Functions inherited from od_stream
virtual ~od_stream ()
 
void addErrMsgTo (BufferString &) const
 
void addErrMsgTo (uiRetVal &) const
 
void addErrMsgTo (uiString &) const
 
void close ()
 
uiString errMsg () const
 see also below. More...
 
const char * fileName () const
 
bool forRead () const
 
bool forWrite () const
 
bool isBad () const
 eof is not Bad More...
 
bool isLocal () const
 
bool isOK () const
 eof is not OK More...
 
Pos position () const
 
void setFileName (const char *)
 
void setNoClose (bool yn=true)
 
void setPosition (Pos, Ref r=Abs)
 
StreamDatastreamData ()
 
const StreamDatastreamData () const
 

Static Public Member Functions

static od_istreamnullStream ()
 
- Static Public Member Functions inherited from od_stream
static od_streamcreate (const char *, bool forread, BufferString &errmsg)
 returns null on failure, never a bad stream More...
 
static od_streamcreate (const char *, bool forread, uiString &errmsg)
 returns null on failure, never a bad stream More...
 
static const char * sStdErr ()
 pass this as filename to get cerr More...
 
static const char * sStdIO ()
 pass this as filename to get cin or cout More...
 

Private Member Functions

 od_istream (const od_istream &)=delete
 
od_istreamoperator= (const od_istream &)=delete
 

Additional Inherited Members

- Public Types inherited from od_stream
typedef od_stream_Count Count
 
typedef od_stream_Pos Pos
 
enum  Ref { Abs , Rel , End }
 
- Protected Member Functions inherited from od_stream
 od_stream ()
 
 od_stream (const char *, bool, bool editmode=false)
 
 od_stream (const FilePath &, bool, bool editmode=false)
 
 od_stream (const OS::MachineCommand &, const char *workdir, bool editmode=false)
 
 od_stream (std::istream &)
 
 od_stream (std::istream *)
 
 od_stream (std::ostream &)
 
 od_stream (std::ostream *)
 
BufferString noStdStreamPErrMsg () const
 
od_streamoperator= (const od_stream &)=delete
 
- Protected Attributes inherited from od_stream
uiString errmsg_
 
bool mine_ = true
 
bool noclose_ = false
 
StreamData sd_
 

Detailed Description

OD class for stream read common access to the std::cin.

<>

Constructor & Destructor Documentation

◆ od_istream() [1/8]

od_istream::od_istream ( )
inline

◆ od_istream() [2/8]

od_istream::od_istream ( const char *  fnm)
inline

◆ od_istream() [3/8]

od_istream::od_istream ( const FilePath fp)
inline

◆ od_istream() [4/8]

od_istream::od_istream ( const OS::MachineCommand mc,
const char *  workdir = nullptr 
)
inline

◆ od_istream() [5/8]

od_istream::od_istream ( std::istream *  s)
inline

◆ od_istream() [6/8]

od_istream::od_istream ( std::istream &  s)
inline

◆ od_istream() [7/8]

od_istream::od_istream ( od_istream &&  )

◆ od_istream() [8/8]

od_istream::od_istream ( const od_istream )
privatedelete

Member Function Documentation

◆ atEOF()

bool od_istream::atEOF ( ) const

equivalent to: !isOK() && !isBad() avoid using it in normal circumstances

◆ endPosition()

Pos od_istream::endPosition ( ) const

◆ get() [1/19]

od_istream& od_istream::get ( BufferString bs,
bool  allowgotonextline = true 
)
inline

◆ get() [2/19]

od_istream& od_istream::get ( char &  )

◆ get() [3/19]

od_istream& od_istream::get ( char *  )
delete

◆ get() [4/19]

od_istream& od_istream::get ( CompoundKey )

◆ get() [5/19]

od_istream& od_istream::get ( double &  )

◆ get() [6/19]

od_istream& od_istream::get ( float &  )

◆ get() [7/19]

od_istream& od_istream::get ( IOPar )

◆ get() [8/19]

od_istream& od_istream::get ( long &  )

◆ get() [9/19]

od_istream& od_istream::get ( SeparString )

◆ get() [10/19]

od_istream& od_istream::get ( std::int16_t &  )

◆ get() [11/19]

od_istream& od_istream::get ( std::int32_t &  )

◆ get() [12/19]

od_istream& od_istream::get ( std::int64_t &  )

◆ get() [13/19]

od_istream& od_istream::get ( std::uint16_t &  )

◆ get() [14/19]

od_istream& od_istream::get ( std::uint32_t &  )

◆ get() [15/19]

od_istream& od_istream::get ( std::uint64_t &  )

◆ get() [16/19]

od_istream& od_istream::get ( StringView )
delete

◆ get() [17/19]

od_istream& od_istream::get ( unsigned char &  )

◆ get() [18/19]

od_istream& od_istream::get ( unsigned long &  )

◆ get() [19/19]

od_istream& od_istream::get ( void *  )
delete

◆ getAll()

bool od_istream::getAll ( BufferString )

◆ getBin() [1/2]

template<class T >
od_istream & od_istream::getBin ( T &  t)
inline

◆ getBin() [2/2]

bool od_istream::getBin ( void *  ,
Count  nrbytes 
)

◆ getC()

od_istream& od_istream::getC ( char *  ,
int  sz,
int  maxnrchar 
)

◆ getLine()

bool od_istream::getLine ( BufferString ,
bool *  newline_found = 0 
)

◆ getWord()

bool od_istream::getWord ( BufferString ,
bool  allowgotonextline = true 
)

◆ ignore()

void od_istream::ignore ( Count  )

◆ lastNrBytesRead()

Count od_istream::lastNrBytesRead ( ) const

◆ nullStream()

static od_istream& od_istream::nullStream ( )
static

◆ open()

bool od_istream::open ( const char *  )

◆ operator=() [1/2]

od_istream& od_istream::operator= ( const od_istream )
privatedelete

◆ operator=() [2/2]

od_istream& od_istream::operator= ( od_istream &&  )

◆ peek()

char od_istream::peek ( ) const

◆ reOpen()

bool od_istream::reOpen ( )

◆ setReadPosition()

void od_istream::setReadPosition ( Pos  ,
Ref  r = Abs 
)

◆ skipLine()

bool od_istream::skipLine ( )

◆ skipUntil()

bool od_istream::skipUntil ( char  )

◆ skipWord()

bool od_istream::skipWord ( )

◆ stdStream()

std::istream& od_istream::stdStream ( )

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