source: trunk/PROBE_SET/ps_defs.hxx

Last change on this file was 8903, checked in by westram, 12 years ago
  • fixed cppcheck warnings
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1#ifndef PS_DEFS_HXX
2#define PS_DEFS_HXX
3
4#ifndef _GLIBCXX_MAP
5#include <map>
6#endif
7#ifndef _GLIBCXX_SET
8#include <set>
9#endif
10#ifndef _GLIBCXX_VECTOR
11#include <vector>
12#endif
13#ifndef _GLIBCXX_STRING
14#include <string>
15#endif
16
17typedef int SpeciesID;
18
19// ----------------------------------------------------------------
20// SpeciesID <-> shortname mapping
21
22typedef std::map<std::string, SpeciesID> Name2IDMap;
23typedef Name2IDMap::iterator             Name2IDMapIter;
24typedef Name2IDMap::const_iterator       Name2IDMapCIter;
25typedef std::map<SpeciesID, std::string>  ID2NameMap;
26typedef ID2NameMap::iterator             ID2NameMapIter;
27typedef ID2NameMap::const_iterator       ID2NameMapCIter;
28
29// ----------------------------------------------------------------
30// SpeciesID list (as vector)
31
32typedef std::vector<SpeciesID>   IDVector;
33typedef IDVector::iterator       IDVectorIter;
34typedef IDVector::const_iterator IDVectorCIter;
35
36// ----------------------------------------------------------------
37// SpeciesID list (as set)
38
39typedef std::set<SpeciesID>   IDSet;
40typedef IDSet::iterator       IDSetIter;
41typedef IDSet::const_iterator IDSetCIter;
42
43// ----------------------------------------------------------------
44// SpeciesID <-> SpeciesID (as map)
45
46typedef std::map<SpeciesID, SpeciesID> ID2IDMap;
47typedef ID2IDMap::iterator            ID2IDMapIter;
48typedef ID2IDMap::const_iterator      ID2IDMapCIter;
49
50// ----------------------------------------------------------------
51// SpeciesID <-> SpeciesID (as set)
52
53typedef std::pair<SpeciesID, SpeciesID> ID2IDPair;
54typedef std::set<ID2IDPair>            ID2IDSet;
55typedef ID2IDSet::iterator             ID2IDSetIter;
56typedef ID2IDSet::const_iterator       ID2IDSetCIter;
57
58// ----------------------------------------------------------------
59// (SpeciesID,SpeciesID) <-> set of SpeciesID (as map)
60
61typedef std::map<ID2IDPair, IDSet>     IDID2IDSetMap;
62typedef IDID2IDSetMap::iterator       IDID2IDSetMapIter;
63typedef IDID2IDSetMap::const_iterator IDID2IDSetMapCIter;
64
65struct PS_Callback {
66    virtual ~PS_Callback() {}
67    virtual void callback(void *_caller) = 0;
68};
69
70#else
71#error ps_defs.hxx included twice
72#endif
Note: See TracBrowser for help on using the repository browser.