inttypes_AMOS.hh File Reference

Include file for all the AMOS integer types. More...

#include <inttypes.h>
#include <limits.h>
#include <string>

Include dependency graph for inttypes_AMOS.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  AMOS

Classes

struct  AMOS::BankFlags_t
 8 bit flag set for IBankable types More...

Defines

#define __inttypes_AMOS_HH   1
 ints of the form [u]int(size)_t, i.e. int32_t
#define swap16(x)   ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
 swaps the bytes in a 16-bit value
#define swap32(x)
 swaps the bytes in a 32-bit value
#define swap64(x)
 swaps the bytes in a 64-bit value
#define htol16(x)   (x)
 host to little-endian 16-bits
#define htol32(x)   (x)
 host to little-endian 32-bits
#define htol64(x)   (x)
 host to little-endian 64-bits
#define ltoh16(x)   (x)
 little-endian to host 16-bits
#define ltoh32(x)   (x)
 little-endian to host 32-bits
#define ltoh64(x)   (x)
 little-endian to host 64-bits
#define htob16(x)   swap16(x)
 host to big-endian 16-bits
#define htob32(x)   swap32(x)
 host to big-endian 32-bits
#define htob64(x)   swap64(x)
 host to big-endian 64-bits
#define btoh16(x)   swap16(x)
 big-endian to host 16-bits
#define btoh32(x)   swap32(x)
 big-endian to host 32-bits
#define btoh64(x)   swap64(x)
 big-endian to host 64-bits

Typedefs

typedef uint32_t AMOS::ID_t
 ID type for iid's.
typedef uint32_t AMOS::NCode_t
 unique integer code for dynamic typing
typedef uint32_t AMOS::SD_t
 standard deviation type
typedef int32_t AMOS::Size_t
 size type (for links,etc)
typedef Size_t AMOS::Pos_t
 position type (in a sequence,etc)
typedef char AMOS::Status_t
 status type

Functions

char AMOS::Qual2Char (uint8_t qual)
 Converts a quality int into a printable character.
uint8_t AMOS::Char2Qual (char qual)
 Converts a printable quality character to an int.
std::string AMOS::Decode (NCode_t ncode)
 Converts an NCode integer to an AMOS message/field type.
NCode_t AMOS::Encode (const std::string &str)
 Converts an AMOS message/field type to an NCode integer.

Variables

const uint8_t AMOS::NCODE_SIZE = 3
 length of the NCode strings
const NCode_t AMOS::NULL_NCODE = 0
 NULL NCode definition.
const ID_t AMOS::NULL_ID = 0
 NULL ID definition.
const Status_t AMOS::NULL_STATUS = 0
 NULL status definition.
const char AMOS::MIN_QUALITY = '0'
 min quality score definition
const char AMOS::MAX_QUALITY = '0' + 63
 max quality score definition
const char AMOS::NULL_CHAR = '\0'
 null char
const char AMOS::NL_CHAR = '\n'
 newline char
const std::string AMOS::NULL_STRING = &NULL_CHAR
 null string
const ID_t AMOS::MAX_ID = ~((uint32_t)0)
 (unsigned 32bit int)
const Size_t AMOS::MAX_SIZE = ~((uint32_t)0) >> 1
 ( signed 32bit int)
const Pos_t AMOS::MAX_POS = ~((uint32_t)0) >> 1
 ( signed 32bit int)


Detailed Description

Include file for all the AMOS integer types.

Author:
Adam M Phillippy
Date:
11/12/2003

Definition in file inttypes_AMOS.hh.


Define Documentation

#define __inttypes_AMOS_HH   1

ints of the form [u]int(size)_t, i.e. int32_t

Definition at line 11 of file inttypes_AMOS.hh.

#define btoh16 (  )     swap16(x)

big-endian to host 16-bits

Definition at line 216 of file inttypes_AMOS.hh.

#define btoh32 (  )     swap32(x)

big-endian to host 32-bits

Definition at line 217 of file inttypes_AMOS.hh.

#define btoh64 (  )     swap64(x)

big-endian to host 64-bits

Definition at line 218 of file inttypes_AMOS.hh.

#define htob16 (  )     swap16(x)

host to big-endian 16-bits

Definition at line 213 of file inttypes_AMOS.hh.

#define htob32 (  )     swap32(x)

host to big-endian 32-bits

Definition at line 214 of file inttypes_AMOS.hh.

#define htob64 (  )     swap64(x)

host to big-endian 64-bits

Definition at line 215 of file inttypes_AMOS.hh.

#define htol16 (  )     (x)

host to little-endian 16-bits

Definition at line 196 of file inttypes_AMOS.hh.

Referenced by AMOS::writeLE().

#define htol32 (  )     (x)

host to little-endian 32-bits

Definition at line 197 of file inttypes_AMOS.hh.

Referenced by AMOS::writeLE().

#define htol64 (  )     (x)

host to little-endian 64-bits

Definition at line 198 of file inttypes_AMOS.hh.

Referenced by AMOS::writeLE().

#define ltoh16 (  )     (x)

little-endian to host 16-bits

Definition at line 199 of file inttypes_AMOS.hh.

Referenced by AMOS::readLE().

#define ltoh32 (  )     (x)

little-endian to host 32-bits

Definition at line 200 of file inttypes_AMOS.hh.

Referenced by AMOS::readLE().

#define ltoh64 (  )     (x)

little-endian to host 64-bits

Definition at line 201 of file inttypes_AMOS.hh.

Referenced by AMOS::readLE().

#define swap16 (  )     ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))

swaps the bytes in a 16-bit value

Definition at line 152 of file inttypes_AMOS.hh.

#define swap32 (  ) 

Value:

((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8)    \
      | (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24))
swaps the bytes in a 32-bit value

Definition at line 158 of file inttypes_AMOS.hh.

#define swap64 (  ) 

Value:

((((x) & 0xff00000000000000ull) >> 56)    \
      | (((x) & 0x00ff000000000000ull) >> 40)  \
      | (((x) & 0x0000ff0000000000ull) >> 24)  \
      | (((x) & 0x000000ff00000000ull) >> 8)   \
      | (((x) & 0x00000000ff000000ull) << 8)   \
      | (((x) & 0x0000000000ff0000ull) << 24)  \
      | (((x) & 0x000000000000ff00ull) << 40)  \
      | (((x) & 0x00000000000000ffull) << 56))
swaps the bytes in a 64-bit value

Definition at line 166 of file inttypes_AMOS.hh.


Generated on Mon Feb 22 17:36:31 2010 for libAMOS by  doxygen 1.4.7