Matrix Science header

ms_obofile.hpp

00001 /*
00002 ##############################################################################
00003 # File: ms_obofile.hpp                                                       #
00004 # Mascot Parser toolkit                                                      #
00005 # Utility functions for accessing ontology files in the .obo format          #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2008 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011 #    $Source: parser/inc/ms_obofile.hpp $
00012 #    $Author: villek@matrixscience.com $ 
00013 #      $Date: 2018-07-30 16:23:53 +0100 $ 
00014 #  $Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_2_8_1-0-gea32989045 $
00015 # $NoKeywords::                                                            $ #
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     }; // class ms_obofile // end of config_group
00088 } // namespace matrix_science
00089 
00090 #endif // MS_OBOFILE_HPP
00091 
00092 /*------------------------------- End of File -------------------------------*/

Copyright © 2022 Matrix Science Ltd.  All Rights Reserved. Generated on Thu Mar 31 2022 01:12:29