| Line | |
|---|
| 1 | // ================================================================ // |
|---|
| 2 | // // |
|---|
| 3 | // File : types.h // |
|---|
| 4 | // Purpose : // |
|---|
| 5 | // // |
|---|
| 6 | // Coded by Ralf Westram (coder@reallysoft.de) in November 2006 // |
|---|
| 7 | // Institute of Microbiology (Technical University Munich) // |
|---|
| 8 | // http://www.arb-home.de/ // |
|---|
| 9 | // // |
|---|
| 10 | // ================================================================ // |
|---|
| 11 | #ifndef TYPES_H |
|---|
| 12 | #define TYPES_H |
|---|
| 13 | |
|---|
| 14 | #ifndef DEFS_H |
|---|
| 15 | #include "defs.h" |
|---|
| 16 | #endif |
|---|
| 17 | |
|---|
| 18 | #ifndef _CPP_MAP |
|---|
| 19 | #include <map> |
|---|
| 20 | #endif |
|---|
| 21 | #ifndef _CPP_SET |
|---|
| 22 | #include <set> |
|---|
| 23 | #endif |
|---|
| 24 | #ifndef _CPP_VECTOR |
|---|
| 25 | #include <vector> |
|---|
| 26 | #endif |
|---|
| 27 | |
|---|
| 28 | using std::vector; |
|---|
| 29 | using std::map; |
|---|
| 30 | using std::set; |
|---|
| 31 | |
|---|
| 32 | typedef set<string> stringSet; |
|---|
| 33 | typedef map<string, string> stringMap; |
|---|
| 34 | typedef vector<string> stringVector; |
|---|
| 35 | |
|---|
| 36 | #define DEFINE_ITERATORS(type) \ |
|---|
| 37 | typedef type::iterator type##Iter; \ |
|---|
| 38 | typedef type::const_iterator type##CIter; \ |
|---|
| 39 | typedef type::reverse_iterator type##RIter; \ |
|---|
| 40 | typedef type::const_reverse_iterator type##CRIter |
|---|
| 41 | |
|---|
| 42 | DEFINE_ITERATORS(string); |
|---|
| 43 | DEFINE_ITERATORS(stringSet); |
|---|
| 44 | DEFINE_ITERATORS(stringMap); |
|---|
| 45 | DEFINE_ITERATORS(stringVector); |
|---|
| 46 | |
|---|
| 47 | #else |
|---|
| 48 | #error types.h included twice |
|---|
| 49 | #endif // TYPES_H |
|---|
| 50 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.