OpendTect-6_4  6.4
Public Member Functions | Protected Attributes | List of all members
ascbinostream Class Reference

writes to a stream that can be Ascii or Binary. More...

Public Member Functions

 ascbinostream (od_ostream &, bool binary)
 
 ascbinostream (od_ostream *, bool binary)
 
virtual ~ascbinostream ()
 
bool isOK () const
 
bool isBad () const
 
ascbinostreamadd (char, char post= '\t')
 
ascbinostreamadd (char, const char *post)
 
ascbinostreamadd (unsigned char, char post= '\t')
 
ascbinostreamadd (unsigned char, const char *post)
 
ascbinostreamadd (short, char post= '\t')
 
ascbinostreamadd (short, const char *post)
 
ascbinostreamadd (unsigned short, char post= '\t')
 
ascbinostreamadd (unsigned short, const char *post)
 
ascbinostreamadd (int, char post= '\t')
 
ascbinostreamadd (int, const char *post)
 
ascbinostreamadd (unsigned int, char post= '\t')
 
ascbinostreamadd (unsigned int, const char *post)
 
ascbinostreamadd (int64_t, char post= '\t')
 
ascbinostreamadd (int64_t, const char *post)
 
ascbinostreamadd (uint64_t, char post= '\t')
 
ascbinostreamadd (uint64_t, const char *post)
 
ascbinostreamadd (float, char post= '\t')
 
ascbinostreamadd (float, const char *post)
 
ascbinostreamadd (double, char post= '\t')
 
ascbinostreamadd (double, const char *post)
 
template<class T >
ascbinostreamaddEOL (T t)
 
template<class T , class IT >
ascbinostreamaddArr (const T *, IT sz, const char *between="\t", const char *post="\n")
 Will write both sz and the array. More...
 
ascbinostreamaddBin (const void *, od_stream_Count nrbytes)
 
template<class T >
ascbinostreamaddBin (const T &t)
 
od_ostreamstream ()
 

Protected Attributes

od_ostreamstrm_
 
const bool binary_
 
const bool strmmine_
 

Detailed Description

writes to a stream that can be Ascii or Binary.

In Ascii mode every write will get a post-character or post-string written, usually either a tab (default) or a newline. In binary mode the bytes of the input values are simply dumped to the stream.

Constructor & Destructor Documentation

ascbinostream::ascbinostream ( od_ostream ,
bool  binary 
)
ascbinostream::ascbinostream ( od_ostream ,
bool  binary 
)
virtual ascbinostream::~ascbinostream ( )
virtual

Member Function Documentation

ascbinostream& ascbinostream::add ( char  ,
char  post = '\t' 
)
ascbinostream& ascbinostream::add ( char  ,
const char *  post 
)
ascbinostream& ascbinostream::add ( unsigned  char,
char  post = '\t' 
)
ascbinostream& ascbinostream::add ( unsigned  char,
const char *  post 
)
ascbinostream& ascbinostream::add ( short  ,
const char *  post 
)
ascbinostream& ascbinostream::add ( short  ,
char  post = '\t' 
)
ascbinostream& ascbinostream::add ( unsigned  short,
char  post = '\t' 
)
ascbinostream& ascbinostream::add ( unsigned  short,
const char *  post 
)
ascbinostream& ascbinostream::add ( int  ,
char  post = '\t' 
)
ascbinostream& ascbinostream::add ( int  ,
const char *  post 
)
ascbinostream& ascbinostream::add ( unsigned  int,
char  post = '\t' 
)
ascbinostream& ascbinostream::add ( unsigned  int,
const char *  post 
)
ascbinostream& ascbinostream::add ( int64_t  ,
const char *  post 
)
ascbinostream& ascbinostream::add ( int64_t  ,
char  post = '\t' 
)
ascbinostream& ascbinostream::add ( uint64_t  ,
char  post = '\t' 
)
ascbinostream& ascbinostream::add ( uint64_t  ,
const char *  post 
)
ascbinostream& ascbinostream::add ( float  ,
const char *  post 
)
ascbinostream& ascbinostream::add ( float  ,
char  post = '\t' 
)
ascbinostream& ascbinostream::add ( double  ,
char  post = '\t' 
)
ascbinostream& ascbinostream::add ( double  ,
const char *  post 
)
template<class T , class IT >
ascbinostream & ascbinostream::addArr ( const T *  arr,
IT  sz,
const char *  between = "\t",
const char *  post = "\n" 
)
inline

Will write both sz and the array.

ascbinostream& ascbinostream::addBin ( const void *  ,
od_stream_Count  nrbytes 
)
template<class T >
ascbinostream& ascbinostream::addBin ( const T &  t)
inline
template<class T >
ascbinostream& ascbinostream::addEOL ( t)
inline
bool ascbinostream::isBad ( ) const
bool ascbinostream::isOK ( ) const
od_ostream& ascbinostream::stream ( )
inline

Member Data Documentation

const bool ascbinostream::binary_
protected
od_ostream& ascbinostream::strm_
protected
const bool ascbinostream::strmmine_
protected

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