librostlab-blast
1.0.0
|
Blast (default, -m 0) output parser. More...
#include <blast-parser-driver.h>
Public Types | |
typedef rostlab::blast::result | result_type |
Public Member Functions | |
parser_driver (FILE *__istream=stdin, const std::string &__istream_name="stdin") | |
virtual | ~parser_driver () |
const result_type & | parse (bool __trace_parsing=false, bool __trace_scanning=false) throw (rostlab::blast::parser_error) |
Parse one result from the input stream. | |
bool | trace_scanning () |
Get tracing of scanning. | |
void | trace_scanning (bool __b) |
Set tracing of scanning. | |
void | error (const rostlab::blast::location &__loc, const std::string __msg) |
Print error message for given location. | |
void | error (const std::string __msg) |
Print error message. | |
const result_type & | result () const |
Read-only access to results. | |
Friends | |
class | rostlab::blast::parser |
Blast (default, -m 0) output parser.
Example:
#include <iostream> #include <rostlab/blast-parser-driver.h> using namespace rostlab; int main() { rostlab::blast::parser_driver p(stdin); while( const rostlab::blast::result& res = p.parse() ) std::cout << res; return 0; } // Compile with: // g++ -Wall -lrostlab-blast parseblast.cpp -o parseblast -L../lib/.libs
Definition at line 59 of file blast-parser-driver.h.
Definition at line 63 of file blast-parser-driver.h.
rostlab::blast::parser_driver::parser_driver | ( | FILE * | __istream = stdin , |
const std::string & | __istream_name = "stdin" |
||
) | [inline] |
Definition at line 79 of file blast-parser-driver.h.
virtual rostlab::blast::parser_driver::~parser_driver | ( | ) | [inline, virtual] |
Definition at line 83 of file blast-parser-driver.h.
void rostlab::blast::parser_driver::error | ( | const rostlab::blast::location & | __loc, |
const std::string | __msg | ||
) | [inline] |
Print error message for given location.
Definition at line 99 of file blast-parser-driver.h.
void rostlab::blast::parser_driver::error | ( | const std::string | __msg | ) | [inline] |
Print error message.
Definition at line 105 of file blast-parser-driver.h.
const result_type& rostlab::blast::parser_driver::parse | ( | bool | __trace_parsing = false , |
bool | __trace_scanning = false |
||
) | throw (rostlab::blast::parser_error) |
Parse one result from the input stream.
Each call returns a reference to the filled result structure. The structure may be empty in case there are no more results in the stream.
const result_type& rostlab::blast::parser_driver::result | ( | ) | const [inline] |
Read-only access to results.
This method provides access to the last parsed results or an empty result structure if parse() was not yet called.
Definition at line 113 of file blast-parser-driver.h.
Get tracing of scanning.
void rostlab::blast::parser_driver::trace_scanning | ( | bool | __b | ) |
Set tracing of scanning.
friend class rostlab::blast::parser [friend] |
Definition at line 60 of file blast-parser-driver.h.