tpt Namespace Reference


Typedefs

typedef unsigned char uchar
typedef uint32_t id_type
typedef uint32_t count_type
typedef uint64_t filepos_type

Functions

void numwrite (std::ostream &out, uint16_t const &x)
void numwrite (std::ostream &out, uint32_t const &x)
void numwrite (std::ostream &out, uint64_t const &x)
char const * numread (char const *src, uint16_t &x)
char const * numread (char const *src, uint32_t &x)
char const * numread (char const *src, uint64_t &x)
uint64_t getFileSize (const std::string &fname)
template<typename T >
void binwrite_unsigned_integer (std::ostream &out, T data)
template<typename T >
void binread_unsigned_integer (std::istream &in, T &data)
void binwrite (std::ostream &out, unsigned char data)
void binwrite (std::ostream &out, unsigned short data)
void binwrite (std::ostream &out, unsigned long data)
void binwrite (std::ostream &out, unsigned long long data)
void binwrite (std::ostream &out, size_t data)
void binread (std::istream &in, unsigned short &data)
void binread (std::istream &in, unsigned int &data)
void binread (std::istream &in, unsigned long &data)
void binread (std::istream &in, unsigned long long &data)
void binwrite (std::ostream &out, std::string const &s)
void binread (std::istream &in, std::string &s)
void binwrite (std::ostream &out, float x)
void binread (std::istream &in, float &x)
char const * binread (char const *p, uint16_t &buf)
char const * binread (char const *p, uint32_t &buf)
char const * binread (char const *p, filepos_type &buf)
char const * binread (char const *p, float &buf)
void binwrite (std::ostream &out, char data)
void binwrite (std::ostream &out, unsigned int data)
void binread (std::istream &in, char &data)
void binread (std::istream &in, unsigned char &data)
void binread (std::istream &in, size_t &data)
std::ostream & write (std::ostream &out, char x)
std::ostream & write (std::ostream &out, unsigned char x)
std::ostream & write (std::ostream &out, short x)
std::ostream & write (std::ostream &out, unsigned short x)
std::ostream & write (std::ostream &out, long x)
std::ostream & write (std::ostream &out, size_t x)
std::ostream & write (std::ostream &out, float x)
std::istream & read (std::istream &in, char &x)
std::istream & read (std::istream &in, unsigned char &x)
std::istream & read (std::istream &in, short &x)
std::istream & read (std::istream &in, unsigned short &x)
std::istream & read (std::istream &in, long &x)
std::istream & read (std::istream &in, size_t &x)
std::istream & read (std::istream &in, float &x)
template<typename K , typename V >
void binwrite (std::ostream &out, std::pair< K, V > const &data)
template<typename K , typename V >
void binread (std::istream &in, std::pair< K, V > &data)
template<typename K , typename V >
char const * binread (char const *p, std::pair< K, V > &data)
template<typename V >
char const * binread (char const *p, std::vector< V > &v)
template<typename T >
T read (std::istream &in)
template<typename T >
T binread (std::istream &in)
template<typename T >
void binwrite (std::ostream &out, std::vector< T > const &data)
template<typename T >
void binread (std::istream &in, std::vector< T > &data)
template<typename K , typename V >
void binread (std::istream &in, std::map< K, V > &data)
template<typename K , typename V >
void binwrite (std::ostream &out, std::map< K, V > const &data)
template<typename WHATEVER >
char const * binread (char const *p, WHATEVER *buf)
void tightwrite (std::ostream &out, uint64_t data, bool flag)
filepos_type tightread (std::istream &in, std::ios::pos_type stop)
bool tightfind_midpoint (std::istream &in, filepos_type start, filepos_type stop)
char const * tightfind_midpoint (char const *const start, char const *const stop)
bool linear_search (std::istream &in, filepos_type start, filepos_type stop, id_type key, unsigned char &flags)
bool tightfind (std::istream &in, filepos_type start, filepos_type stop, id_type key, unsigned char &flags)
char const * tightfind (char const *const start, char const *const stop, id_type key, unsigned char &flags)
char const * tightfind_noflags (char const *const start, char const *const stop, id_type key)
bool linear_search_noflags (std::istream &in, filepos_type start, filepos_type stop, id_type key)
bool tightfind_noflags (std::istream &in, filepos_type start, filepos_type stop, id_type key)
void tightwrite2 (std::ostream &out, size_t data, bool flag)
char const * tightread8 (char const *start, char const *stop, uint64_t &dest)
char const * tightread4 (char const *start, char const *stop, uint32_t &dest)
char const * tightread2 (char const *start, char const *stop, uint16_t &dest)
template<typename numType >
char const * tightread (char const *start, char const *stop, numType &dest)

Typedef Documentation

typedef uint32_t tpt::count_type

Definition at line 11 of file tpt_typedefs.h.

typedef uint64_t tpt::filepos_type

Definition at line 12 of file tpt_typedefs.h.

typedef uint32_t tpt::id_type

Definition at line 10 of file tpt_typedefs.h.

typedef unsigned char tpt::uchar

Definition at line 3 of file num_read_write.cc.


Function Documentation

template<typename WHATEVER >
char const* tpt::binread ( char const *  p,
WHATEVER *  buf 
) [inline]

Definition at line 204 of file tpt_pickler.h.

References binread().

Here is the call graph for this function:

template<typename K , typename V >
void tpt::binread ( std::istream &  in,
std::map< K, V > &  data 
) [inline]

Definition at line 156 of file tpt_pickler.h.

References binread(), k, and V.

Here is the call graph for this function:

template<typename T >
void tpt::binread ( std::istream &  in,
std::vector< T > &  data 
) [inline]

Definition at line 145 of file tpt_pickler.h.

References binread().

Here is the call graph for this function:

template<typename T >
T tpt::binread ( std::istream &  in  )  [inline]

Definition at line 126 of file tpt_pickler.h.

References binread(), and T.

Here is the call graph for this function:

template<typename V >
char const * tpt::binread ( char const *  p,
std::vector< V > &  v 
) [inline]

Definition at line 104 of file tpt_pickler.h.

References binread().

Here is the call graph for this function:

template<typename K , typename V >
char const * tpt::binread ( char const *  p,
std::pair< K, V > &  data 
) [inline]

Definition at line 93 of file tpt_pickler.h.

References binread().

Here is the call graph for this function:

template<typename K , typename V >
void tpt::binread ( std::istream &  in,
std::pair< K, V > &  data 
) [inline]

Definition at line 195 of file tpt_pickler.h.

References binread().

Here is the call graph for this function:

void tpt::binread ( std::istream &  in,
size_t &  data 
)

void tpt::binread ( std::istream &  in,
unsigned char &  data 
)

void tpt::binread ( std::istream &  in,
char &  data 
)

char const * tpt::binread ( char const *  p,
float &  buf 
)

Definition at line 397 of file tpt_pickler.cc.

char const * tpt::binread ( char const *  p,
filepos_type &  buf 
)

Definition at line 330 of file tpt_pickler.cc.

char const * tpt::binread ( char const *  p,
uint32_t &  buf 
)

Definition at line 293 of file tpt_pickler.cc.

char const * tpt::binread ( char const *  p,
uint16_t &  buf 
)

Definition at line 270 of file tpt_pickler.cc.

void tpt::binread ( std::istream &  in,
float &  x 
)

Definition at line 262 of file tpt_pickler.cc.

void tpt::binread ( std::istream &  in,
std::string &  s 
)

Definition at line 242 of file tpt_pickler.cc.

References binread().

Here is the call graph for this function:

void tpt::binread ( std::istream &  in,
unsigned long long &  data 
)

Definition at line 197 of file tpt_pickler.cc.

void tpt::binread ( std::istream &  in,
unsigned long &  data 
)

Definition at line 152 of file tpt_pickler.cc.

void tpt::binread ( std::istream &  in,
unsigned int &  data 
)

Definition at line 130 of file tpt_pickler.cc.

void tpt::binread ( std::istream &  in,
unsigned short &  data 
)

template<typename T >
void tpt::binread_unsigned_integer ( std::istream &  in,
T data 
) [inline]

Definition at line 39 of file tpt_pickler.cc.

References T.

template<typename K , typename V >
void tpt::binwrite ( std::ostream &  out,
std::map< K, V > const &  data 
) [inline]

Definition at line 174 of file tpt_pickler.h.

References binwrite(), and m.

Here is the call graph for this function:

template<typename T >
void tpt::binwrite ( std::ostream &  out,
std::vector< T > const &  data 
) [inline]

Definition at line 136 of file tpt_pickler.h.

References binwrite().

Here is the call graph for this function:

template<typename K , typename V >
void tpt::binwrite ( std::ostream &  out,
std::pair< K, V > const &  data 
) [inline]

Definition at line 187 of file tpt_pickler.h.

References binwrite().

Here is the call graph for this function:

void tpt::binwrite ( std::ostream &  out,
unsigned int  data 
)

void tpt::binwrite ( std::ostream &  out,
char  data 
)

The following functions write and read data in a compact binary representation. Write and read errors can be checked directly on the std::ostream object after the function call, so no return value is necessary.

void tpt::binwrite ( std::ostream &  out,
float  x 
)

Definition at line 254 of file tpt_pickler.cc.

void tpt::binwrite ( std::ostream &  out,
std::string const &  s 
)

Definition at line 234 of file tpt_pickler.cc.

References binwrite().

Here is the call graph for this function:

void tpt::binwrite ( std::ostream &  out,
size_t  data 
)

Definition at line 107 of file tpt_pickler.cc.

References binwrite_unsigned_integer().

Here is the call graph for this function:

void tpt::binwrite ( std::ostream &  out,
unsigned long long  data 
)

Definition at line 94 of file tpt_pickler.cc.

References binwrite_unsigned_integer().

Here is the call graph for this function:

void tpt::binwrite ( std::ostream &  out,
unsigned long  data 
)

Definition at line 88 of file tpt_pickler.cc.

References binwrite_unsigned_integer().

Here is the call graph for this function:

void tpt::binwrite ( std::ostream &  out,
unsigned short  data 
)

Definition at line 82 of file tpt_pickler.cc.

References binwrite_unsigned_integer().

Here is the call graph for this function:

void tpt::binwrite ( std::ostream &  out,
unsigned char  data 
)

Definition at line 76 of file tpt_pickler.cc.

References binwrite_unsigned_integer().

Referenced by sapt::imBitext< TKN >::add(), binwrite(), and procSymalLine().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
void tpt::binwrite_unsigned_integer ( std::ostream &  out,
T  data 
) [inline]

Definition at line 25 of file tpt_pickler.cc.

Referenced by binwrite().

Here is the caller graph for this function:

uint64_t tpt::getFileSize ( const std::string &  fname  ) 

Utility method placed here for lack of a better place

Returns:
the size of file fname.

Definition at line 16 of file tpt_pickler.cc.

bool tpt::linear_search ( std::istream &  in,
filepos_type  start,
filepos_type  stop,
id_type  key,
unsigned char &  flags 
)

Definition at line 203 of file tpt_tightindex.cc.

References debug, FLAGBITS, FLAGMASK, and tightread().

Referenced by tightfind().

Here is the call graph for this function:

Here is the caller graph for this function:

bool tpt::linear_search_noflags ( std::istream &  in,
filepos_type  start,
filepos_type  stop,
id_type  key 
)

Definition at line 384 of file tpt_tightindex.cc.

References tightread().

Referenced by tightfind_noflags().

Here is the call graph for this function:

Here is the caller graph for this function:

char const * tpt::numread ( char const *  src,
uint64_t &  x 
)

Definition at line 60 of file num_read_write.cc.

char const * tpt::numread ( char const *  src,
uint32_t &  x 
)

Definition at line 49 of file num_read_write.cc.

char const * tpt::numread ( char const *  src,
uint16_t &  x 
)

Definition at line 41 of file num_read_write.cc.

Referenced by sapt::mmTtrack< TKN >::open(), sapt::mmTSA< TOKEN >::open(), sapt::mmTtrack< TKN >::remap(), and remap().

Here is the caller graph for this function:

void tpt::numwrite ( std::ostream &  out,
uint64_t const &  x 
)

Definition at line 26 of file num_read_write.cc.

void tpt::numwrite ( std::ostream &  out,
uint32_t const &  x 
)

Definition at line 15 of file num_read_write.cc.

void tpt::numwrite ( std::ostream &  out,
uint16_t const &  x 
)

template<typename T >
T tpt::read ( std::istream &  in  )  [inline]

Definition at line 118 of file tpt_pickler.h.

References read(), and T.

Here is the call graph for this function:

std::istream& tpt::read ( std::istream &  in,
float &  x 
)

std::istream& tpt::read ( std::istream &  in,
size_t &  x 
)

std::istream& tpt::read ( std::istream &  in,
long &  x 
)

std::istream& tpt::read ( std::istream &  in,
unsigned short &  x 
)

std::istream& tpt::read ( std::istream &  in,
short &  x 
)

std::istream& tpt::read ( std::istream &  in,
unsigned char &  x 
)

std::istream& tpt::read ( std::istream &  in,
char &  x 
)

Referenced by read().

Here is the caller graph for this function:

char const * tpt::tightfind ( char const *const   start,
char const *const   stop,
id_type  key,
unsigned char &  flags 
)

Definition at line 320 of file tpt_tightindex.cc.

References FLAGBITS, FLAGMASK, NULL, tightfind(), tightfind_midpoint(), and tightread().

Here is the call graph for this function:

bool tpt::tightfind ( std::istream &  in,
filepos_type  start,
filepos_type  stop,
id_type  key,
unsigned char &  flags 
)

Definition at line 254 of file tpt_tightindex.cc.

References debug, FLAGBITS, FLAGMASK, linear_search(), tightfind_midpoint(), and tightread().

Referenced by tightfind().

Here is the call graph for this function:

Here is the caller graph for this function:

char const* tpt::tightfind_midpoint ( char const *const   start,
char const *const   stop 
)

Definition at line 193 of file tpt_tightindex.cc.

bool tpt::tightfind_midpoint ( std::istream &  in,
filepos_type  start,
filepos_type  stop 
)

move read header in istream /in/ to the first entry after the midpoint of file position range [start,stop) in in a 'tight' index

Parameters:
in the data input stream
start start of the search range
stop end of the search range
Returns:
true if no errors occurred

Definition at line 154 of file tpt_tightindex.cc.

References debug.

Referenced by tightfind(), and tightfind_noflags().

Here is the caller graph for this function:

bool tpt::tightfind_noflags ( std::istream &  in,
filepos_type  start,
filepos_type  stop,
id_type  key 
)

Definition at line 405 of file tpt_tightindex.cc.

References linear_search_noflags(), tightfind_midpoint(), tightfind_noflags(), and tightread().

Here is the call graph for this function:

char const * tpt::tightfind_noflags ( char const *const   start,
char const *const   stop,
id_type  key 
)

Definition at line 355 of file tpt_tightindex.cc.

References NULL, tightfind_midpoint(), and tightread().

Referenced by tightfind_noflags().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename numType >
char const* tpt::tightread ( char const *  start,
char const *  stop,
numType &  dest 
) [inline]

Definition at line 96 of file tpt_tightindex.h.

References NULL, tightread2(), tightread4(), and tightread8().

Here is the call graph for this function:

filepos_type tpt::tightread ( std::istream &  in,
std::ios::pos_type  stop 
)

char const * tpt::tightread2 ( char const *  start,
char const *  stop,
uint16_t &  dest 
)

read a number from a tight index directy from a memory location

Parameters:
start start of read range
stop non-inclusive end of read range
dest destination
Returns:
first memory position after the number

Definition at line 569 of file tpt_tightindex.cc.

Referenced by tightread().

Here is the caller graph for this function:

char const * tpt::tightread4 ( char const *  start,
char const *  stop,
uint32_t &  dest 
)

Definition at line 534 of file tpt_tightindex.cc.

Referenced by tightread().

Here is the caller graph for this function:

char const * tpt::tightread8 ( char const *  start,
char const *  stop,
uint64_t &  dest 
)

Definition at line 479 of file tpt_tightindex.cc.

Referenced by tightread().

Here is the caller graph for this function:

void tpt::tightwrite ( std::ostream &  out,
uint64_t  data,
bool  flag 
)

Definition at line 30 of file tpt_tightindex.cc.

Referenced by sapt::imTSA< TOKEN >::save_as_mm_tsa().

Here is the caller graph for this function:

void tpt::tightwrite2 ( std::ostream &  out,
size_t  data,
bool  flag 
)

Definition at line 451 of file tpt_tightindex.cc.

std::ostream& tpt::write ( std::ostream &  out,
float  x 
)

std::ostream& tpt::write ( std::ostream &  out,
size_t  x 
)

std::ostream& tpt::write ( std::ostream &  out,
long  x 
)

std::ostream& tpt::write ( std::ostream &  out,
unsigned short  x 
)

std::ostream& tpt::write ( std::ostream &  out,
short  x 
)

std::ostream& tpt::write ( std::ostream &  out,
unsigned char  x 
)

std::ostream& tpt::write ( std::ostream &  out,
char  x 
)


Generated on Thu Jul 6 00:34:47 2017 for Moses by  doxygen 1.5.9