UNIVERS
15.3
UNIVERS base processing software API
|
#include <zqb_header.hpp>
Public Member Functions | |
ZqbHeader () | |
ZqbHeader (int trhdr_size, const void *trhdr=NULL) | |
ZqbHeader (const ZqbHeader &hdr) | |
virtual | ~ZqbHeader () |
ZqbHeader & | operator= (const ZqbHeader &hdr) |
virtual int | size () const |
virtual void | setHeader (int trhdr_size, const void *trhdr=NULL) |
virtual void | setHeader (const void *trhdr) |
virtual void | resetSortOrder () |
virtual void | setSortOrder (int hwId, ZqbOrder eOrder=Z_O_ASCENT) |
virtual void | setSortOrder (int hwId1, ZqbOrder eOrder1, int hwId2, ZqbOrder eOrder2) |
virtual void | setSortOrder (int hwId1, ZqbOrder eOrder1, int hwId2, ZqbOrder eOrder2, int hwId3, ZqbOrder eOrder3) |
virtual bool | operator< (const ZqbHeader &hdr) const |
virtual bool | operator== (const ZqbHeader &hdr) const |
bool | operator!= (const ZqbHeader &hdr) const |
int | hwCompare (int hwId, const ZqbHeader &hdr, double fPrec=1e-32) const |
virtual ZqbType | hdrType (int hwId) const |
virtual const char * | hdrLabel (int hwId) const |
virtual char | hdrChar (int hwId) const |
virtual int | hdrInt (int hwId) const |
virtual float | hdrFloat (int hwId) const |
virtual void | hdrChar (int hwId, char cValue) |
virtual void | hdrInt (int hwId, int iValue) |
virtual void | hdrFloat (int hwId, float fValue) |
virtual int | hwid2index (int hwId) const |
ZqbHeader () | |
ZqbHeader (int trhdr_size, const void *trhdr=NULL) | |
ZqbHeader (const ZqbHeader &hdr) | |
virtual | ~ZqbHeader () |
ZqbHeader & | operator= (const ZqbHeader &hdr) |
virtual int | size () const |
virtual void | setHeader (int trhdr_size, const void *trhdr=NULL) |
virtual void | setHeader (const void *trhdr) |
virtual void | resetSortOrder () |
virtual void | setSortOrder (int hwId, ZqbOrder eOrder=Z_O_ASCENT) |
virtual void | setSortOrder (int hwId1, ZqbOrder eOrder1, int hwId2, ZqbOrder eOrder2) |
virtual void | setSortOrder (int hwId1, ZqbOrder eOrder1, int hwId2, ZqbOrder eOrder2, int hwId3, ZqbOrder eOrder3) |
virtual bool | operator< (const ZqbHeader &hdr) const |
virtual bool | operator== (const ZqbHeader &hdr) const |
bool | operator!= (const ZqbHeader &hdr) const |
int | hwCompare (int hwId, const ZqbHeader &hdr, double fPrec=1e-32) const |
virtual ZqbType | hdrType (int hwId) const |
virtual const char * | hdrLabel (int hwId) const |
virtual char | hdrChar (int hwId) const |
virtual int | hdrInt (int hwId) const |
virtual float | hdrFloat (int hwId) const |
virtual void | hdrChar (int hwId, char cValue) |
virtual void | hdrInt (int hwId, int iValue) |
virtual void | hdrFloat (int hwId, float fValue) |
virtual int | hwid2index (int hwId) const |
virtual int | hwid2offset (int hwId) const |
Static Public Member Functions | |
static bool | compareLess (const ZqbHeader *hdr1, const ZqbHeader *hdr2) |
static bool | compareEqual (const ZqbHeader *hdr1, const ZqbHeader *hdr2) |
static bool | compareNotEqual (const ZqbHeader *hdr1, const ZqbHeader *hdr2) |
static bool | byteCompare (const ZqbHeader &hdr1, const ZqbHeader &hdr2) |
static bool | compareLess (const ZqbHeader *hdr1, const ZqbHeader *hdr2) |
static bool | compareEqual (const ZqbHeader *hdr1, const ZqbHeader *hdr2) |
static bool | compareNotEqual (const ZqbHeader *hdr1, const ZqbHeader *hdr2) |
static bool | byteCompare (const ZqbHeader &hdr1, const ZqbHeader &hdr2) |
Public Attributes | |
int | m_nHdrSize |
void * | m_pHdr |
ZqbHeaderDef * | m_pHdrDef |
bool | m_bUseful |
Static Public Attributes | |
static double | s_fEpsilon |
Protected Attributes | |
int | m_nCriteria |
int | m_iSortHW [3] |
ZqbOrder | m_eSortOrder [3] |
Class implements the most common seismic trace header storage and access entity. Truely it may be used not only seismic headers but for other attributes.
Header words are addressed by their indeces counted from 0. Negative index allows to address from the end of the header. This feature allows to use extended header words simply by creating the object with larger header size.
Please handle data members with care bacause changing them directly may lead to SEGV.
ZqbHeader::ZqbHeader | ( | ) |
Create empty header container. It's supposed that later is will be assigned by some meaningful header.
ZqbHeader::ZqbHeader | ( | int | trhdr_size, |
const void * | trhdr = NULL |
||
) |
Create header of given size and with given header contents. Header size should be represented in bytes.
ZqbHeader::ZqbHeader | ( | const ZqbHeader & | hdr | ) |
Create header as a copy of some othe one.
|
virtual |
Destroy the object.
ZqbHeader::ZqbHeader | ( | ) |
Create empty header container. It's supposed that later is will be assigned by some meaningful header.
ZqbHeader::ZqbHeader | ( | int | trhdr_size, |
const void * | trhdr = NULL |
||
) |
Create header of given size and with given header contents. Header size should be represented in bytes.
ZqbHeader::ZqbHeader | ( | const ZqbHeader & | hdr | ) |
Create header as a copy of some othe one.
|
virtual |
Destroy the object.
Compare headers. Returns true is two headers are identical byte-to-byte. This method does not use sort orders.
Compare headers. Returns true is two headers are identical byte-to-byte. This method does not use sort orders.
Compare two headers by their pointer and defined criteria.
Compare two headers by their pointer and defined criteria.
Compare two headers by their pointer and defined criteria.
Compare two headers by their pointer and defined criteria.
Compare two headers by their pointer and defined criteria.
Compare two headers by their pointer and defined criteria.
|
virtual |
Get the first one byte character value of given header word. If the header word is unknown, does not exist or header value has different type then return value is undefined. By default hwId is interpreted as 4-byte word index in the header counted from 0.
|
virtual |
Get the first one byte character value of given header word. If the header word is unknown, does not exist or header value has different type then return value is undefined. By default hwId is interpreted as 4-byte word index in the header counted from 0.
|
virtual |
Set one byte character value in given header word as the first byte. If the header word is unknown, does not exist or header value has different type then value will not be stored. By default hwId is interpreted as 4-byte word index in the header counted from 0.
|
virtual |
Set one byte character value in given header word as the first byte. If the header word is unknown, does not exist or header value has different type then value will not be stored. By default hwId is interpreted as 4-byte word index in the header counted from 0.
|
virtual |
Get floaing point value of given header word. If the header word is unknown, does not exist or header value has different type then return value is undefined. By default hwId is interpreted as 4-byte word index in the header counted from 0.
|
virtual |
Get floaing point value of given header word. If the header word is unknown, does not exist or header value has different type then return value is undefined. By default hwId is interpreted as 4-byte word index in the header counted from 0.
|
virtual |
Set floaing point value in given header word. If the header word is unknown, does not exist or header value has different type then return value will not be stored. By default hwId is interpreted as 4-byte word index in the header counted from 0.
|
virtual |
Set floaing point value in given header word. If the header word is unknown, does not exist or header value has different type then return value will not be stored. By default hwId is interpreted as 4-byte word index in the header counted from 0.
|
virtual |
Get integer value of given header word. If the header word is unknown, does not exist or header value has different type then return value is undefined. By default hwId is interpreted as 4-byte word index in the header counted from 0.
|
virtual |
Get integer value of given header word. If the header word is unknown, does not exist or header value has different type then return value is undefined. By default hwId is interpreted as 4-byte word index in the header counted from 0.
|
virtual |
Set integer value in given header word. If the header word is unknown, does not exist or header value has different type then value will not be stored. By default hwId is interpreted as 4-byte word index in the header counted from 0.
|
virtual |
Set integer value in given header word. If the header word is unknown, does not exist or header value has different type then value will not be stored. By default hwId is interpreted as 4-byte word index in the header counted from 0.
|
virtual |
Return text string with header word label. By default "Header word ##" is returned. The returned value points to static memory buffer!
|
virtual |
Return text string with header word label. By default "Header word ##" is returned. The returned value points to static memory buffer!
|
virtual |
Return type of given header word. By default header word information is not supported.
|
virtual |
Return type of given header word. By default header word information is not supported.
int ZqbHeader::hwCompare | ( | int | hwId, |
const ZqbHeader & | hdr, | ||
double | fPrec = 1e-32 |
||
) | const |
Compare headers by given header word. -1 - means this header is less than pointed; 0 - they are equal; 1 - this header is greater. A precision is applied in case of floating point comparison. This method does not use sort orders.
int ZqbHeader::hwCompare | ( | int | hwId, |
const ZqbHeader & | hdr, | ||
double | fPrec = 1e-32 |
||
) | const |
Compare headers by given header word. -1 - means this header is less than pointed; 0 - they are equal; 1 - this header is greater. A precision is applied in case of floating point comparison. This method does not use sort orders.
|
virtual |
Convert header word id to the word index in hdr{Type} methods. By default it performs mapping based on m_mHwId2Index map. If the hwid is not found in the map then 0 is returned. If the map is empty then hwid is used as index.
|
virtual |
Convert header word id to the word index in hdr{Type} methods. By default it performs mapping based on m_mHwId2Index map. If the hwid is not found in the map then 0 is returned. If the map is empty then hwid is used as index.
|
virtual |
Convert header word id to the offset in hdr{Type} methods. By default it performs mapping based on m_mHwId2Index map. If the hwid is not found in the map then 0 is returned. If the map is empty then hwid is used as index.
|
inline |
Compare two headers by header words in defined criteria.
|
inline |
Compare two headers by header words in defined criteria.
|
virtual |
Compare two headers by defined criteria.
|
virtual |
Compare two headers by defined criteria.
|
virtual |
Compare two headers by header words in defined criteria.
|
virtual |
Compare two headers by header words in defined criteria.
|
virtual |
Unset all comparison criteria.
|
virtual |
Unset all comparison criteria.
|
virtual |
Assign new header size and contents (optionally).
|
virtual |
Assign new header size and contents (optionally).
|
virtual |
Assign new header contents of the same size.
|
virtual |
Assign new header contents of the same size.
|
virtual |
Set comparison criteria by given header word identifier in given order.
|
virtual |
Set comparison criteria by given header word identifier in given order.
|
virtual |
Set comparison criteria by two given header words. First header word will be used as primary one and the second - the secondary.
|
virtual |
Set comparison criteria by two given header words. First header word will be used as primary one and the second - the secondary.
|
virtual |
Set comparison criteria by three given header words.
|
virtual |
Set comparison criteria by three given header words.
|
virtual |
Return size of header (in bytes).
|
virtual |
Return size of header (in bytes).
|
mutable |
For marking the trace as usefull trace for paint in ZqSeismicView. It is probably temporary solution for optimization and may be removed later.
|
protected |
List of header word criteria direction.
|
protected |
List of header words used to compare headers.
|
protected |
Number of header words used for comparison criteria.
int ZqbHeader::m_nHdrSize |
Size of trace header in bytes.
void * ZqbHeader::m_pHdr |
Pointer to trace header.
ZqbHeaderDef * ZqbHeader::m_pHdrDef |
Special map from hwId to index (if not NULL).
|
static |
Custom precision for floating point header words matching.