00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MS_OBOFILE_HPP
00020 #define MS_OBOFILE_HPP
00021
00022
00023 #include <string>
00024 #include <vector>
00025 #include <map>
00026
00027 namespace matrix_science {
00033
00034
00042 class MS_MASCOTRESFILE_API ms_obofile: public ms_errors
00043 {
00044 public:
00046 ms_obofile();
00047
00049 ms_obofile(const char * oboFileName);
00050
00052 ms_obofile(const ms_obofile& right);
00053
00055 ~ms_obofile();
00056
00057 #ifndef SWIG
00058
00059 ms_obofile& operator=(const ms_obofile& right);
00060 #endif
00061
00062 void copyFrom(const ms_obofile* right);
00063
00065 void defaultValues();
00066
00068 std::vector<std::string> getItemFromId(const char * id) const;
00069
00071 std::string findIDFromTagValue(const char * tag, const char * value) const;
00072
00074 void parseLine(const std::string str, std::string & tag, std::string & value, std::string & comment) const;
00075
00077 int getNumberOfEntries() const;
00078
00079
00080 private:
00081 void clearOntology();
00082 typedef std::vector<std::string> ontologyItem_t;
00083 typedef std::map<std::string, ontologyItem_t> ontology_t;
00084 ontology_t ontology_;
00085
00086 };
00088 }
00089
00090 #endif // MS_OBOFILE_HPP
00091
00092