source: tags/arb-6.0/PROBE_DESIGN/probe_match_parser.hxx

Last change on this file was 7623, checked in by westram, 13 years ago
  • merge from dev [7450] [7452] [7456] [7457] [7458] [7459] [7460] [7461] [7464] [7465] [7466] [7467] [7468] [7469] [7482]
    • tweaked compiler options
      • activated -Weffc++
        • postfilter warnings where Scott Meyers' advices are too general.
          • base classes should not always have virtual destructors, since that renders tiny classes useless and
          • members should not always be initialized via initialization list, since that often violates the DRY principle
        • fix gcc's inability to detect that Noncopyable implements a private copy-ctor and op=
        • this slows down complete ARB recompilation by ~5%
    • added -Wold-style-cast (inactive)
    • removed -Wno-non-template-friend added in [7447]
  • postcompile.pl
    • added option —original to show unmodified compiler output
  • declared op= for classes which had a copy-ctor
  • moved op= macros to arbtools.h
  • derived classes containing pointers from Noncopyable (use Noncopyable virtually) or
  • made them copyable if needed (awt_mask_item, KnownDB, Code, AWT_registered_itemtype, GEN_gene, PosGene, PartialSequence, PlugIn, Range, Convaln_exception)
  • other related changes
    • user mask destruction working now
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 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 : virtual 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    friend class ParsedProbeMatch;
41};
42
43class ParsedProbeMatch : virtual Noncopyable {
44    const ProbeMatchParser&  parser;
45    char                    *match;
46    mutable const char      *error;
47public:
48
49    ParsedProbeMatch(const char *match_, const ProbeMatchParser& parser_);
50    ~ParsedProbeMatch();
51
52    const char *get_error() const { return error; }
53    int get_position() const;
54    const char *get_probe_region() const;
55
56    char *get_column_content(const char *columnName, bool chop_spaces) const;
57};
58
59
60#else
61#error probe_match_parser.hxx included twice
62#endif // PROBE_MATCH_PARSER_HXX
63
Note: See TracBrowser for help on using the repository browser.