ARB
Location.h
Go to the documentation of this file.
1 // ================================================================ //
2 // //
3 // File : Location.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 LOCATION_H
12 #define LOCATION_H
13 
14 #ifndef SMARTPTR_H
15 #include <smartptr.h>
16 #endif
17 #ifndef _GLIBCXX_VECTOR
18 #include <vector>
19 #endif
20 #ifndef _GLIBCXX_MAP
21 #include <map>
22 #endif
23 #ifndef _GLIBCXX_STRING
24 #include <string>
25 #endif
26 
27 typedef std::map<std::string, std::string> stringMap;
28 
29 typedef std::vector<int> intVector;
30 typedef std::vector<char> charVector;
31 typedef std::vector<bool> boolVector;
32 
33 struct GEN_position;
34 
36  LJT_UNDEF, // undefined
37  LJT_NOT_JOINED, // location does not contain multiple parts
38  LJT_JOIN, // sequence data may be joined
39  LJT_ORDER, // nothing is implied about the reasonableness about joining
40 };
41 
42 
43 struct Location : public Noncopyable {
44  Location() {}
45  virtual ~Location() {}
46 
47  virtual int count() const = 0;
48  virtual bool isInRange(long pos1, long pos2) const = 0;
49  virtual void save(GEN_position *into, bool complementary) const = 0;
50  virtual LocationJoinType getJoinType() const = 0;
51  virtual std::string as_string() const = 0;
52 
54 };
55 
57 
60 
61 #else
62 #error Location.h included twice
63 #endif // LOCATION_H
64 
virtual ~Location()
Definition: Location.h:45
return string(buffer, length)
virtual bool isInRange(long pos1, long pos2) const =0
static int pos1
Definition: ClustalV.cxx:58
std::vector< int > intVector
Definition: Location.h:29
std::vector< bool > boolVector
Definition: Location.h:31
LocationPtr parseLocation(const std::string &source)
Definition: Location.cxx:243
virtual void save(GEN_position *into, bool complementary) const =0
virtual std::string as_string() const =0
std::vector< char > charVector
Definition: Location.h:30
LocationPtr to_Location(const GEN_position *gp)
Definition: Location.cxx:333
GEN_position * create_GEN_position() const
Definition: Location.cxx:309
SmartPtr< Location > LocationPtr
Definition: Location.h:56
std::map< std::string, std::string > stringMap
Definition: Location.h:27
static int pos2
Definition: ClustalV.cxx:59
virtual int count() const =0
LocationJoinType
Definition: Location.h:35
virtual LocationJoinType getJoinType() const =0
Location()
Definition: Location.h:44