source: tags/arb_5.1/GENOM_IMPORT/Location.h

Last change on this file was 5777, checked in by westram, 15 years ago
  • again removed timestamps
File size: 1.8 KB
Line 
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 TYPES_H
18#include "types.h"
19#endif
20
21
22typedef vector<int>  intVector;
23typedef vector<char> charVector;
24typedef vector<bool> boolVector;
25
26class GEN_position;
27
28enum LocationJoinType {
29    LJT_UNDEF,                  // undefined
30    LJT_NOT_JOINED,             // location does not contain multiple parts
31    LJT_JOIN,                   // sequence data may be joined
32    LJT_ORDER,                  // nothing is implied about the reasonableness about joining
33};
34
35
36struct Location : public Noncopyable {
37    Location() {}
38    virtual ~Location() {}
39
40    virtual int count() const                                       = 0;
41    virtual bool isInRange(long pos1, long pos2) const              = 0;
42    virtual void save(GEN_position *into, bool complementary) const = 0;
43    virtual LocationJoinType getJoinType() const                    = 0;
44
45    GEN_position *create_GEN_position() const;
46};
47
48typedef SmartPtr<Location> LocationPtr;
49
50LocationPtr parseLocation(const string& source);
51
52#else
53#error Location.h included twice
54#endif // LOCATION_H
55
Note: See TracBrowser for help on using the repository browser.