source: branches/port5/PROBE_DESIGN/probe_match_parser.hxx

Last change on this file was 5675, checked in by westram, 16 years ago
  • removed automatic timestamps (the best they were good for, were vc-conflicts)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1//  ==================================================================== //
2//                                                                       //
3//    File      : probe_match_parser.hxx                                 //
4//    Purpose   : parse the results of a probe match                     //
5//                                                                       //
6//                                                                       //
7//  Coded by Ralf Westram (coder@reallysoft.de) in June 2004             //
8//  Copyright Department of Microbiology (Technical University Munich)   //
9//                                                                       //
10//  Visit our web site at: http://www.arb-home.de/                       //
11//                                                                       //
12//  ==================================================================== //
13
14#ifndef PROBE_MATCH_PARSER_HXX
15#define PROBE_MATCH_PARSER_HXX
16
17#ifndef ARBTOOLS_H
18#include <arbtools.h>
19#endif
20
21// --------------------------------------------------------------------------------
22// helper class to parse probe match results
23
24class ProbeMatch_impl;
25
26class ProbeMatchParser : Noncopyable {
27    ProbeMatch_impl *pimpl;
28    char            *init_error;
29
30public:
31    ProbeMatchParser(const char *probe_target, const char *headline);
32    ~ProbeMatchParser();
33
34    const char * get_error() const { return init_error; }
35    bool is_gene_result() const;
36    int get_probe_region_offset() const;
37
38    bool getColumnRange(const char *columnName, int *startCol, int *endCol) const;
39
40    // bool parse_match(const char *match, const char *& result_probeRegion, int& result_startPos, GB_ERROR& error);
41    friend class ParsedProbeMatch;
42};
43
44class ParsedProbeMatch : Noncopyable {
45    const ProbeMatchParser&  parser;
46    char                    *match;
47    mutable const char      *error;
48public:
49
50    ParsedProbeMatch(const char *match_, const ProbeMatchParser& parser_);
51    ~ParsedProbeMatch();
52
53    const char *get_error() const { return error; }
54    int get_position() const;
55    const char *get_probe_region() const;
56
57    char *get_column_content(const char *columnName, bool chop_spaces) const;
58};
59
60
61#else
62#error probe_match_parser.hxx included twice
63#endif // PROBE_MATCH_PARSER_HXX
64
Note: See TracBrowser for help on using the repository browser.