source: branches/stable/SL/ALIVIEW/AliView.hxx

Last change on this file was 7623, checked in by westram, 8 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
File size: 1.9 KB
Line 
1// =============================================================== //
2//                                                                 //
3//   File      : AliView.hxx                                       //
4//   Purpose   : Defines a filtered view onto an alignment         //
5//                                                                 //
6//   Coded by Ralf Westram (coder@reallysoft.de) in October 2009   //
7//   Institute of Microbiology (Technical University Munich)       //
8//   http://www.arb-home.de/                                       //
9//                                                                 //
10// =============================================================== //
11
12#ifndef ALIVIEW_HXX
13#define ALIVIEW_HXX
14
15#ifndef ARBDB_BASE_H
16#include <arbdb_base.h>
17#endif
18#ifndef ARBTOOLS_H
19#include <arbtools.h>
20#endif
21
22class AP_filter;
23class AP_weights;
24
25class AliView {
26    GBDATA     *gb_main;
27    AP_filter  *filter;
28    AP_weights *weights;
29    char       *aliname;
30
31    void create_real_view(const AP_filter *filter_, const AP_weights *weights_, const char *aliname_);
32
33public:
34    explicit AliView(GBDATA *gb_main_); // not really a view (used for AP_tree w/o sequence)
35    AliView(GBDATA *gb_main_, const AP_filter& filter_, const AP_weights& weights_, const char *aliname_);
36    AliView(const AliView& other);
37    ~AliView();
38    DECLARE_ASSIGNMENT_OPERATOR(AliView);
39
40    const char *get_aliname() const { return aliname; }
41
42    const AP_filter *get_filter() const { return filter; }
43    AP_filter *get_filter() { return filter; }
44
45    const AP_weights *get_weights() const { return weights; }
46    GBDATA *get_gb_main() const { return gb_main; }
47
48    size_t get_length() const;                      // length of (filtered) alignment seen through this view
49
50    bool has_data() const { return aliname != NULL; }
51};
52
53
54#else
55#error AliView.hxx included twice
56#endif // ALIVIEW_HXX
Note: See TracBrowser for help on using the repository browser.