Last change
on this file was
7623,
checked in by westram, 14 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
mask destruction working now
|
File size:
1.3 KB
|
Line | |
---|
1 | #ifndef FUN_H |
---|
2 | #define FUN_H |
---|
3 | |
---|
4 | #ifndef ARBTOOLS_H |
---|
5 | #include <arbtools.h> |
---|
6 | #endif |
---|
7 | |
---|
8 | // forward decls for prototypes |
---|
9 | |
---|
10 | enum Format { |
---|
11 | // input/output formats |
---|
12 | EMBL, |
---|
13 | GENBANK, |
---|
14 | MACKE, |
---|
15 | SWISSPROT, |
---|
16 | LAST_INPUT_FORMAT = SWISSPROT, |
---|
17 | |
---|
18 | // output-only formats |
---|
19 | GCG, |
---|
20 | NEXUS, |
---|
21 | PHYLIP, |
---|
22 | FASTDNAML, |
---|
23 | PRINTABLE, |
---|
24 | |
---|
25 | UNKNOWN, |
---|
26 | }; |
---|
27 | |
---|
28 | inline bool is_input_format(Format inType) { return inType <= LAST_INPUT_FORMAT; } |
---|
29 | |
---|
30 | class Reader; |
---|
31 | class Writer; |
---|
32 | |
---|
33 | struct Embl; |
---|
34 | struct Emblref; |
---|
35 | struct EmblSwissprotReader; |
---|
36 | struct GenBank; |
---|
37 | struct GenbankRef; |
---|
38 | struct GenbankReader; |
---|
39 | struct Macke; |
---|
40 | struct MackeReader; |
---|
41 | struct Paup; |
---|
42 | struct Seq; |
---|
43 | struct Alignment; |
---|
44 | |
---|
45 | struct RDP_comments; |
---|
46 | struct OrgInfo; |
---|
47 | struct SeqInfo; |
---|
48 | |
---|
49 | typedef void (*RDP_comment_parser)(char*& datastring, int start_index, Reader& reader); |
---|
50 | |
---|
51 | class FormattedFile : virtual Noncopyable { |
---|
52 | char *name_; |
---|
53 | Format type_; |
---|
54 | public: |
---|
55 | FormattedFile() : name_(0), type_(UNKNOWN) {} |
---|
56 | FormattedFile(const char *Name, Format Type); |
---|
57 | ~FormattedFile(); |
---|
58 | |
---|
59 | void init(const char *Name, Format Type); |
---|
60 | |
---|
61 | const char *name() const { return name_; } |
---|
62 | Format type() const { return type_; } |
---|
63 | }; |
---|
64 | |
---|
65 | #ifndef FILEBUFFER_H |
---|
66 | #include <FileBuffer.h> |
---|
67 | #endif |
---|
68 | #ifndef PROTOTYPES_H |
---|
69 | #include "prototypes.h" |
---|
70 | #endif |
---|
71 | |
---|
72 | #else |
---|
73 | #error fun.h included twice |
---|
74 | #endif // FUN_H |
---|
75 | |
---|
Note: See
TracBrowser
for help on using the repository browser.