OpendTect  6.6
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BinDataDesc Class Reference

Description of binary data. More...

Inheritance diagram for BinDataDesc:
[legend]

Public Types

enum  ByteCount { N1 =1 , N2 =2 , N4 =4 , N8 =8 }
 

Public Member Functions

 BinDataDesc (bool ii, bool is, int b)
 
 BinDataDesc (bool ii=false, bool is=true, ByteCount b=N4)
 
 BinDataDesc (const char *s)
 
 BinDataDesc (const double &)
 
 BinDataDesc (const double *)
 
 BinDataDesc (const float &)
 
 BinDataDesc (const float *)
 
 BinDataDesc (const int &)
 
 BinDataDesc (const int *)
 
 BinDataDesc (const short &)
 
 BinDataDesc (const short *)
 
 BinDataDesc (const signed char &)
 
 BinDataDesc (const signed char *)
 
 BinDataDesc (const unsigned char &)
 
 BinDataDesc (const unsigned char *)
 
 BinDataDesc (const unsigned int &)
 
 BinDataDesc (const unsigned int *)
 
 BinDataDesc (const unsigned short &)
 
 BinDataDesc (const unsigned short *)
 
 BinDataDesc (unsigned char c1, unsigned char c2)
 
virtual ~BinDataDesc ()
 
virtual bool convertsWellTo (const BinDataDesc &) const
 
virtual void dump (unsigned char &, unsigned char &) const
 
bool isEqual (const BinDataDesc &dc) const
 
bool isInteger () const
 
bool isSigned () const
 
virtual int maxStringifiedSize () const
 
ByteCount nrBytes () const
 
bool operator!= (const BinDataDesc &dc) const
 
bool operator== (const BinDataDesc &dc) const
 
void set (bool ii, bool is, ByteCount b)
 
void set (bool ii, bool is, int b)
 
virtual void set (const char *)
 
virtual void set (unsigned char, unsigned char)
 
void setInteger (bool yn)
 
void setNrBytes (ByteCount n)
 
void setNrBytes (int n)
 
void setSigned (bool yn)
 
int sizeFor (int n) const
 
virtual void toString (BufferString &) const
 

Static Public Member Functions

static ByteCount nearestByteCount (bool is_int, int s)
 
static int nextSize (bool is_int, int s)
 

Protected Member Functions

void setFrom (unsigned char, bool)
 

Protected Attributes

bool isint_
 
bool issigned_
 
ByteCount nrbytes_
 

Detailed Description

Description of binary data.

Binary data in 'blobs' can usually be described by only a few pieces of info. These are:

Is the data of floating point type or integer? Is the data signed or unsigned? Usually, floating point data cannot be unsigned. How big is each number in terms of bytes? This can be 1, 2, 4 or 8 bytes.

The info from this class can be stringified (user readable string) or dumped binary into two unsigned chars.

In normal work one will use the DataCharacteristics subclass, which can also provide a 'run-time' data interpreter class for fast conversion to internal data types.

<>

Member Enumeration Documentation

◆ ByteCount

Enumerator
N1 
N2 
N4 
N8 

Constructor & Destructor Documentation

◆ BinDataDesc() [1/20]

BinDataDesc::BinDataDesc ( bool  ii = false,
bool  is = true,
ByteCount  b = N4 
)
inline

◆ BinDataDesc() [2/20]

BinDataDesc::BinDataDesc ( bool  ii,
bool  is,
int  b 
)
inline

◆ BinDataDesc() [3/20]

BinDataDesc::BinDataDesc ( unsigned char  c1,
unsigned char  c2 
)
inline

◆ BinDataDesc() [4/20]

BinDataDesc::BinDataDesc ( const char *  s)
inline

◆ ~BinDataDesc()

virtual BinDataDesc::~BinDataDesc ( )
inlinevirtual

◆ BinDataDesc() [5/20]

BinDataDesc::BinDataDesc ( const signed char *  )
inline

◆ BinDataDesc() [6/20]

BinDataDesc::BinDataDesc ( const signed char &  )
inline

◆ BinDataDesc() [7/20]

BinDataDesc::BinDataDesc ( const short *  )
inline

◆ BinDataDesc() [8/20]

BinDataDesc::BinDataDesc ( const short &  )
inline

◆ BinDataDesc() [9/20]

BinDataDesc::BinDataDesc ( const int *  )
inline

◆ BinDataDesc() [10/20]

BinDataDesc::BinDataDesc ( const int &  )
inline

◆ BinDataDesc() [11/20]

BinDataDesc::BinDataDesc ( const unsigned char *  )
inline

◆ BinDataDesc() [12/20]

BinDataDesc::BinDataDesc ( const unsigned char &  )
inline

◆ BinDataDesc() [13/20]

BinDataDesc::BinDataDesc ( const unsigned short *  )
inline

◆ BinDataDesc() [14/20]

BinDataDesc::BinDataDesc ( const unsigned short &  )
inline

◆ BinDataDesc() [15/20]

BinDataDesc::BinDataDesc ( const unsigned int *  )
inline

◆ BinDataDesc() [16/20]

BinDataDesc::BinDataDesc ( const unsigned int &  )
inline

◆ BinDataDesc() [17/20]

BinDataDesc::BinDataDesc ( const float *  )
inline

◆ BinDataDesc() [18/20]

BinDataDesc::BinDataDesc ( const float &  )
inline

◆ BinDataDesc() [19/20]

BinDataDesc::BinDataDesc ( const double *  )
inline

◆ BinDataDesc() [20/20]

BinDataDesc::BinDataDesc ( const double &  )
inline

Member Function Documentation

◆ convertsWellTo()

virtual bool BinDataDesc::convertsWellTo ( const BinDataDesc ) const
virtual

◆ dump()

virtual void BinDataDesc::dump ( unsigned char &  ,
unsigned char &   
) const
virtual

Reimplemented in DataCharacteristics.

◆ isEqual()

bool BinDataDesc::isEqual ( const BinDataDesc dc) const
inline

◆ isInteger()

bool BinDataDesc::isInteger ( ) const
inline

◆ isSigned()

bool BinDataDesc::isSigned ( ) const
inline

◆ maxStringifiedSize()

virtual int BinDataDesc::maxStringifiedSize ( ) const
inlinevirtual

Reimplemented in DataCharacteristics.

◆ nearestByteCount()

static ByteCount BinDataDesc::nearestByteCount ( bool  is_int,
int  s 
)
inlinestatic

◆ nextSize()

static int BinDataDesc::nextSize ( bool  is_int,
int  s 
)
inlinestatic

◆ nrBytes()

ByteCount BinDataDesc::nrBytes ( ) const
inline

◆ operator!=()

bool BinDataDesc::operator!= ( const BinDataDesc dc) const
inline

◆ operator==()

bool BinDataDesc::operator== ( const BinDataDesc dc) const
inline

◆ set() [1/4]

void BinDataDesc::set ( bool  ii,
bool  is,
ByteCount  b 
)
inline

◆ set() [2/4]

void BinDataDesc::set ( bool  ii,
bool  is,
int  b 
)
inline

◆ set() [3/4]

virtual void BinDataDesc::set ( const char *  )
virtual

Reimplemented in DataCharacteristics.

◆ set() [4/4]

virtual void BinDataDesc::set ( unsigned char  ,
unsigned char   
)
virtual

Reimplemented in DataCharacteristics.

◆ setFrom()

void BinDataDesc::setFrom ( unsigned char  ,
bool   
)
protected

◆ setInteger()

void BinDataDesc::setInteger ( bool  yn)
inline

◆ setNrBytes() [1/2]

void BinDataDesc::setNrBytes ( ByteCount  n)
inline

◆ setNrBytes() [2/2]

void BinDataDesc::setNrBytes ( int  n)
inline

◆ setSigned()

void BinDataDesc::setSigned ( bool  yn)
inline

◆ sizeFor()

int BinDataDesc::sizeFor ( int  n) const
inline

◆ toString()

virtual void BinDataDesc::toString ( BufferString ) const
virtual

Reimplemented in DataCharacteristics.

Member Data Documentation

◆ isint_

bool BinDataDesc::isint_
protected

◆ issigned_

bool BinDataDesc::issigned_
protected

◆ nrbytes_

ByteCount BinDataDesc::nrbytes_
protected

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