Loading...
Searching...
No Matches
rostlab::blast::parser_driver Class Reference

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)
| 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

## Detailed Description

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
blast-parser-driver.h
rostlab::blast::parser_driver
Blast (default, -m 0) output parser.
Definition blast-parser-driver.h:59
rostlab
Definition blast-parser-driver.h:45
rostlab::blast::result
Blast result for one query.
Definition blast-result.h:164

Definition at line 59 of file blast-parser-driver.h.

## Member Typedef Documentation

## result_type

typedef rostlab::blast::result rostlab::blast::parser_driver::result_type

Definition at line 63 of file blast-parser-driver.h.

## Constructor & Destructor Documentation

## parser_driver()

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.

## ~parser_driver()

virtual rostlab::blast::parser_driver::~parser_driver | ( |  | ) |

inline virtual

Definition at line 83 of file blast-parser-driver.h.

## Member Function Documentation

## error() [1/2]

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.

## error() [2/2]

void rostlab::blast::parser_driver::error | ( | const std::string | __msg | ) |

inline

Print error message.

Definition at line 105 of file blast-parser-driver.h.

## parse()

const result_type & rostlab::blast::parser_driver::parse | ( | bool | __trace_parsing = false,
|  | bool | __trace_scanning = false )

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.

## result()

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.

## trace_scanning() [1/2]

bool rostlab::blast::parser_driver::trace_scanning | ( |  | ) |

Get tracing of scanning.

## trace_scanning() [2/2]

void rostlab::blast::parser_driver::trace_scanning | ( | bool | __b | ) |

Set tracing of scanning.

## Friends And Related Symbol Documentation

## rostlab::blast::parser

friend class rostlab::blast::parser

friend

Definition at line 60 of file blast-parser-driver.h.

The documentation for this class was generated from the following file:

- rostlab/blast-parser-driver.h