source: tags/svn.1.5.4/PARSIMONY/AP_error.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: 848 bytes
Line 
1#ifndef _AP_ERROR_INC
2#define _AP_ERROR_INC
3
4#ifndef ATTRIBUTES_H
5#include <attributes.h>
6#endif
7#ifndef ARBTOOLS_H
8#include <arbtools.h>
9#endif
10
11
12class AP_ERR : virtual Noncopyable {
13    static int  mode;                               // output mode 0 = no warnings, 1 = warnings
14    int         anzahl;                             // errortext count
15    const char *text;                               // pointer to errortext
16
17public:
18    AP_ERR(const char *errorstring);                // sets error
19    AP_ERR(const char *, const int core) __ATTR__NORETURN;
20    AP_ERR(const char *, const char *, const int core) __ATTR__NORETURN;
21    AP_ERR(const char *, const char *);
22    ~AP_ERR();
23
24    const char *show();                             // shows error messages
25    void        set_mode(int i);                    // set error mode
26};
27
28#endif
Note: See TracBrowser for help on using the repository browser.