libgta  1.2.1
Read and Write Generic Tagged Array (GTA) files
Classes | Enumerations
gta Namespace Reference

The gta namespace. More...

Classes

class  custom_io
 Class for custom input/output. More...
 
class  exception
 The exception class. More...
 
class  header
 The GTA header. More...
 
class  io_state
 State for element-based input and output. More...
 
class  taglist
 Tag Lists. More...
 

Enumerations

enum  result {
  ok = GTA_OK, overflow = GTA_OVERFLOW, unsupported_data = GTA_UNSUPPORTED_DATA, unexpected_eof = GTA_UNEXPECTED_EOF,
  invalid_data = GTA_INVALID_DATA, system_error = GTA_SYSTEM_ERROR
}
 GTA result. More...
 
enum  type {
  int8 = GTA_INT8, uint8 = GTA_UINT8, int16 = GTA_INT16, uint16 = GTA_UINT16,
  int32 = GTA_INT32, uint32 = GTA_UINT32, int64 = GTA_INT64, uint64 = GTA_UINT64,
  int128 = GTA_INT128, uint128 = GTA_UINT128, float32 = GTA_FLOAT32, float64 = GTA_FLOAT64,
  float128 = GTA_FLOAT128, cfloat32 = GTA_CFLOAT32, cfloat64 = GTA_CFLOAT64, cfloat128 = GTA_CFLOAT128,
  blob = GTA_BLOB
}
 GTA data types. More...
 
enum  compression {
  none = GTA_NONE, zlib = GTA_ZLIB, zlib1 = GTA_ZLIB1, zlib2 = GTA_ZLIB2,
  zlib3 = GTA_ZLIB3, zlib4 = GTA_ZLIB4, zlib5 = GTA_ZLIB5, zlib6 = GTA_ZLIB6,
  zlib7 = GTA_ZLIB7, zlib8 = GTA_ZLIB8, zlib9 = GTA_ZLIB9, bzip2 = GTA_BZIP2,
  xz = GTA_XZ
}
 GTA compression methods. More...
 

Functions

Version information
const char * version ()
 Get the version string. More...
 
int version_major ()
 Get the major version number. More...
 
int version_minor ()
 Get the minor version number. More...
 
int version_patch ()
 Get the patch version number. More...
 

Detailed Description

The gta namespace.

Enumeration Type Documentation

◆ result

GTA result.

This is equivalent to gta_result_t from the C interface.

Enumerator
ok 

Success / no error.

overflow 

Size overflow.

unsupported_data 

Unsupported data.

The input seems to require features that are not available in this version of the library.

unexpected_eof 

Unexpected end of file.

The GTA library intended to read more data, but the input did not provide it.

invalid_data 

Invalid data.

Some data was invalid. For example, an input file is not in GTA format.

system_error 

System error.

A system error occured. More information is available in errno. Examples: memory allocation failure (errno == ENOMEM), input/output errors (errno == EIO), no space left on device (errno == ENOSPC).

◆ type

enum gta::type

GTA data types.

This is equivalent to gta_type_t from the C interface.

All integer types contain the exact number of bits indicated by their name and use the common two's complement representation.
All floating point types contain the exact number of bits indicated by their name and conform to the binary representation defined by IEEE 754.
The complex types (gta::cfloat*) consist of two floating point values with the number of bits indicated by the name, as defined above. The first value is the real part, the second value is the imaginary part. For example, gta::cfloat32 consists of two gta::float32 values.
The name gta::blob can be used for data types that are not defined in this list. In this case, the size of the data type must be given, and the data type must be independent of endianness.

Enumerator
int8 

int8_t

uint8 

uint8_t

int16 

int16_t

uint16 

uint16_t

int32 

int32_t

uint32 

uint32_t

int64 

int64_t

uint64 

uint64_t

int128 

int128_t (unavailable on many platforms)

uint128 

uint128_t (unavailable on many platforms)

float32 

IEEE 754 single precision floating point (on many platforms: float)

float64 

IEEE 754 double precision floating point (on many platforms: double)

float128 

IEEE 754 quadrupel precision floating point (unavailable on many platforms, even if long double exists)

cfloat32 

complex (re,im) based on two gta::float32

cfloat64 

complex (re,im) based on two gta::float64

cfloat128 

complex (re,im) based on two gta::float128

blob 

Data blob; must be endianness-independent; user must specify the size.

◆ compression

GTA compression methods.

These are deprecated. Do not use them anymore, they will be removed in a future version.

Enumerator
none 

No compression.

zlib 

ZLIB compression (fast, moderate compression rate)

zlib1 

ZLIB compression with level 1.

zlib2 

ZLIB compression with level 2.

zlib3 

ZLIB compression with level 3.

zlib4 

ZLIB compression with level 4.

zlib5 

ZLIB compression with level 5.

zlib6 

ZLIB compression with level 6.

zlib7 

ZLIB compression with level 7.

zlib8 

ZLIB compression with level 8.

zlib9 

ZLIB compression with level 9.

bzip2 

BZIP2 compression (moderate speed, good compression rates)

xz 

XZ compression (low/moderate speed, good/very good compression rates)

Function Documentation

◆ version()

const char* gta::version ( )
inline

Get the version string.

Returns
The version string "MAJOR.MINOR.PATCH"

◆ version_major()

int gta::version_major ( )
inline

Get the major version number.

Returns
The major version number.

◆ version_minor()

int gta::version_minor ( )
inline

Get the minor version number.

Returns
The minor version number.

◆ version_patch()

int gta::version_patch ( )
inline

Get the patch version number.

Returns
The patch version number.