ARB
Feature.h
Go to the documentation of this file.
1 // ================================================================ //
2 // //
3 // File : Feature.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 FEATURE_H
12 #define FEATURE_H
13 
14 #ifndef LOCATION_H
15 #include "Location.h"
16 #endif
17 
18 class Feature {
19  std::string type;
20  LocationPtr location;
21  stringMap qualifiers; // qualifiers with content (content of multiple identical qualifiers gets merged)
22 
23 public:
24  Feature(const std::string& Type, const std::string& locationString);
25 
26  void addQualifiedEntry(const std::string& qualifier, const std::string& value);
27 
28  std::string createGeneName() const; // creates a (non-unique) default name for gene
29 
30  const std::string& getType() const { return type; }
31  const Location& getLocation() const { return *location; }
32  const stringMap& getQualifiers() const { return qualifiers; }
33 
34  void expectLocationInSequence(long seqLength) const;
35 
36  void fixEmptyQualifiers();
37 };
38 
39 
40 #else
41 #error Feature.h included twice
42 #endif // FEATURE_H
43 
return string(buffer, length)
Feature(const std::string &Type, const std::string &locationString)
Definition: Feature.cxx:20
const stringMap & getQualifiers() const
Definition: Feature.h:32
std::string createGeneName() const
Definition: Feature.cxx:97
std::map< std::string, std::string > stringMap
Definition: types.h:29
const std::string & getType() const
Definition: Feature.h:30
void addQualifiedEntry(const std::string &qualifier, const std::string &value)
Definition: Feature.cxx:36
void expectLocationInSequence(long seqLength) const
Definition: Feature.cxx:124
const Location & getLocation() const
Definition: Feature.h:31
void fixEmptyQualifiers()
Definition: Feature.cxx:133