UNIVERS
15.3
UNIVERS base processing software API
|
#include <trace.hpp>
Public Types | |
enum | AttrId { TA_NTR = 0, TA_NMGL, TA_NSP, TA_NSL, TA_NSS, TA_NRP, TA_NRL, TA_NRS, TA_NDP, TA_XSP, TA_YSP, TA_ZSP, TA_XOP, TA_YOP, TA_ZOP, TA_L, TA_HCAB, TA_COMP, TA_TFB, TA_PSC_STRIDE, TA_PSC_DIR, TA_PSC_QMINNEG, TA_PSC_QMAXPOS, TA_RESERVE_0, TA_RESERVE_1, TA_RESERVE_2, TA_RESERVE_3, TA_RESERVE_4 } |
Public Member Functions | |
Header () | |
Header (TimeT i_t0, TimeT i_timestep, OffsetT i_offset) | |
bool | compatiable (const Header &hdr) const |
bool | operator== (const Header &hdr) const |
template<typename T > | |
void | setAttr (AttrId id, const T &value) |
template<typename T > | |
const T & | getAttrValue (AttrId id, bool *result=0x0) const |
bool | hasAttr (AttrId id) const |
void | clearAttrs () |
bool | hasNAN () |
bool | hasInf () |
bool | hasNANInf () |
Static Public Member Functions | |
static std::string | toString (const AttrId &attr) |
Public Attributes | |
TimeT | t0 |
TimeT | timestep |
OffsetT | offset |
std::map< AttrId, TrHdrAttrVal > | m_attrs |
Header of the trace.
Header attributes identifiers.
Trace::Header::Header | ( | ) |
Default constructor (t0, timestep and offset are zero.)
Constructs header with provided parameters.
void Trace::Header::clearAttrs | ( | ) |
Clears all header attributes.
bool Trace::Header::compatiable | ( | const Header & | hdr | ) | const |
Does this header is compatiable to provided.
Compatiable headers has the same t0 and timestep.
const T & Trace::Header::getAttrValue | ( | AttrId | id, |
bool * | result = 0x0 |
||
) | const |
Gets attribute value. Result will be false
if attribute with provided id absents.
Gets attribute value. Result will be false if attribute with provided id absents.
bool Trace::Header::hasAttr | ( | AttrId | id | ) | const |
True if header has provided attribute.
bool Trace::Header::hasInf | ( | ) |
True if has any Inf in parameters.
bool Trace::Header::hasNAN | ( | ) |
True if has any NAN in parameters.
bool Trace::Header::hasNANInf | ( | ) |
True if has any NAN or Inf in parameters. Zero time of the trace.
bool Trace::Header::operator== | ( | const Header & | hdr | ) | const |
Equality of headers.
void Trace::Header::setAttr | ( | AttrId | id, |
const T & | value | ||
) |
Sets new attribute. Replaces value if attribute
with such identifier is presents.
Sets new attribute. Replaces value if attribute with such identifier is presents.
|
static |
Name of attribute as a string.
OffsetT Trace::Header::offset |
Attributes of the header.
TimeT Trace::Header::t0 |
Step of time.
TimeT Trace::Header::timestep |
Offset of the trace.