Namespace for general-purpose utilities. More...
Namespaces | |
| namespace | baseutil |
DNA nucleotide (base) utility functions. | |
Classes | |
| class | DelimitedFileMetadata |
| class | DelimitedFile |
| Used to parse files delimited in the way found in a typical Complete Genomics data file. More... | |
| class | DelimitedFieldParser |
| Class that parses one field of a delimited line. More... | |
| class | IgnoreField |
| A no-op DelimitedFieldParser. More... | |
| class | ValueField |
| A DelimitedFieldParser that uses cgatools::util::parseValue to parse its value. More... | |
| class | ValueVectorField |
| DelimitedFieldParser that parses a variable length list of values separated by its own delimiter (distinct from the field delimiter). More... | |
| class | StringField |
| A DelimitedFieldParser that records a copy of the field. More... | |
| class | CharField |
| A DelimitedFieldParser that records a character (not an unsigned integer). More... | |
| class | StrandField |
| class | SideField |
| class | DelimitedLineParser |
| A class that parses delimited lines. More... | |
| class | DelimitedField |
| class | Exception |
| A basic exception type. More... | |
| class | GenericHistogram |
| class | SimpleHistogram |
| class | IndirectComparator |
| class | Md5Digest |
| The MD5 result type. More... | |
| class | Md5Context |
| A class to compute the MD5 hash of a sequence of bytes. More... | |
| struct | ValueParser |
| struct | ValueParser< Value, true > |
| struct | ValueParser< Value, false > |
| struct | ValueParser< float, true > |
| struct | ValueParser< double, true > |
| class | IntervalTree |
| Class that maintains a mapping from key to value, where the key is a type with range semantics, for the purpose of finding the intersection of a range to a set of ranges. More... | |
| class | FastRangeSet |
the class is designed to support a relatively small set of ranges and answer the questions:
| |
| class | FileDescriptorDevice |
| struct | FileSourceDevice |
| struct | FileSinkDevice |
| class | InputStream |
| A std::istream with good error messages. More... | |
| class | OutputStream |
| a std::ostream with good error messages, and which does fsync on close on UNIX. More... | |
| class | CompressedInputStream |
| class | CompressedOutputStream |
| class | StringSet |
| StringSet convenience class. More... | |
Typedefs | |
| typedef std::vector< std::string > | StringVector |
Functions | |
| std::ostream & | operator<< (std::ostream &out, const DelimitedFileMetadata &meta) |
| template<class Value , class Index > | |
| std::ostream & | operator<< (std::ostream &out, const GenericHistogram< Value, Index > &r) |
| bool | operator== (const Md5Digest &lhs, const Md5Digest &rhs) |
| bool | operator!= (const Md5Digest &lhs, const Md5Digest &rhs) |
| float | parseFloat (const char *first, const char *last) |
| double | parseDouble (const char *first, const char *last) |
| template<typename Value > | |
| Value | parseValue (const char *first, const char *last) |
| Parse the string to the given Value type. | |
| template<typename Value > | |
| Value | parseValue (const char *str) |
| Parse the string to the given Value type. | |
| template<typename Value > | |
| Value | parseValue (const std::string &str) |
| Parse the string to the given Value type. | |
| void | parseTokenString (std::string const &inputString, char const *sep, std::vector< std::string > &tokens, bool trimWhitespace=false, bool compressEmpty=false) |
| Parse a user-token-specified separated string The function can be used if the input string format is not strictly defined. | |
| void | writeBinaryBool (std::ostream &out, bool val) |
| Writes a '\0' for false or '\001' for true. | |
| template<class IntType > | |
| void | writeBinaryInt (std::ostream &out, IntType val) |
| Writes the integer out in msb -> lsb order. | |
| template<class IntType > | |
| void | writeBinaryUIntZC (std::ostream &out, IntType val) |
| Writes the integer out in "zero-compressed" format, suitable for reading in by cgatools::util::readBinaryUIntZC(). | |
| void | writeBinaryString (std::ostream &out, const std::string &val) |
| Writes the string out in a binary format, suitable for reading in by cgatools::util::readBinaryString(). | |
| void | readBinaryBool (std::istream &in, bool *val) |
| Reads one byte interpreted as a boolean, such that 0 is false and anything else is true. | |
| template<class IntType > | |
| void | readBinaryInt (std::istream &in, IntType *pVal) |
| Reads the integer in msb -> lsb order. | |
| template<class IntType > | |
| void | readBinaryUIntZC (std::istream &in, IntType *pVal) |
| Reads an integer stored in "zero-compressed" format. | |
| void | readBinaryString (std::istream &in, std::string *val) |
| Reads the string written out by cgatools::util::writeBinaryString(). | |
Namespace for general-purpose utilities.
| Value cgatools::util::parseValue | ( | const std::string & | str | ) | [inline] |
Parse the string to the given Value type.
| Value cgatools::util::parseValue | ( | const char * | str | ) | [inline] |
Parse the string to the given Value type.
| Value cgatools::util::parseValue | ( | const char * | first, | |
| const char * | last | |||
| ) | [inline] |
Parse the string to the given Value type.
Calling parseValue<Value>(str) is much like calling boost::lexical_cast<Value>(str), with the following exceptions:
| void cgatools::util::readBinaryBool | ( | std::istream & | in, | |
| bool * | val | |||
| ) |
Reads one byte interpreted as a boolean, such that 0 is false and anything else is true.
| void cgatools::util::readBinaryUIntZC | ( | std::istream & | in, | |
| IntType * | pVal | |||
| ) | [inline] |
Reads an integer stored in "zero-compressed" format.
At each iteration, a byte is read in, and the lsb 7 bits are or'd into val. If the msb is set, then the val is shifted left by 7, and the next byte must be read in.
| void cgatools::util::writeBinaryString | ( | std::ostream & | out, | |
| const std::string & | val | |||
| ) |
Writes the string out in a binary format, suitable for reading in by cgatools::util::readBinaryString().
| void cgatools::util::writeBinaryUIntZC | ( | std::ostream & | out, | |
| IntType | val | |||
| ) | [inline] |
Writes the integer out in "zero-compressed" format, suitable for reading in by cgatools::util::readBinaryUIntZC().
1.6.2