Matrix Science header

ms_quant_configfile.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_quant_configfile.hpp                                              #
00004 # 'msparser' toolkit                                                         #
00005 # Encapsulates "quantitation.xml"-file that serves as quantitation       #
00006 # configuration file                                                         #
00007 ##############################################################################
00008 # COPYRIGHT NOTICE                                                           #
00009 # Copyright 1998-2006 Matrix Science Limited  All Rights Reserved.           #
00010 #                                                                            #
00011 ##############################################################################
00012  * @(#)$Source: /vol/cvsroot/parser/inc/ms_quant_configfile.hpp,v $
00013  * @(#)$Revision: 1.13 $
00014  * @(#)$Date: 2014/01/14 10:04:34 $
00015 ##############################################################################
00016  */
00017 
00018 #ifndef MS_QUANT_CONFIGFILE_HPP
00019 #define MS_QUANT_CONFIGFILE_HPP
00020 
00021 #ifdef _WIN32
00022 #pragma warning(disable:4251)   // Don't want all classes to be exported
00023 #pragma warning(disable:4786)   // Debug symbols too long
00024 #   ifndef _MATRIX_USE_STATIC_LIB
00025 #       ifdef MS_MASCOTRESFILE_EXPORTS
00026 #           define MS_MASCOTRESFILE_API __declspec(dllexport)
00027 #       else
00028 #           define MS_MASCOTRESFILE_API __declspec(dllimport)
00029 #       endif
00030 #   else
00031 #       define MS_MASCOTRESFILE_API
00032 #   endif
00033 #else
00034 #   define MS_MASCOTRESFILE_API
00035 #endif
00036 
00037 #include <string>
00038 
00039 // forward declarations
00040 namespace msparser_internal {
00041     class ms_quant_xmlloader;
00042     class ms_quant_configfile_impl;
00043 } 
00044 
00045 namespace matrix_science {
00046 
00047     class ms_connection_settings; // forward declaration
00048     class ms_quant_method; // forward declaration
00049 
00055 
00056 
00066     class MS_MASCOTRESFILE_API ms_quant_configfile: public ms_errors
00067     {
00068         friend class msparser_internal::ms_quant_xmlloader;
00069     public:
00071         ms_quant_configfile();
00072 
00074         ms_quant_configfile(const ms_quant_configfile& src);
00075 
00077         ms_quant_configfile(const char* fileName, const char* schemaFileName,
00078                    const ms_connection_settings * cs = 0);
00079 
00081         ~ms_quant_configfile();
00082 
00084         void defaultValues();
00085 
00087         void copyFrom(const ms_quant_configfile* right);
00088 
00089 #ifndef SWIG
00090 
00091         ms_quant_configfile& operator=(const ms_quant_configfile& right);
00092 #endif
00093 
00094         void setFileName(const char* name);
00095 
00097         std::string getFileName() const;
00098 
00100         void setSchemaFileName(const char* name);
00101 
00103         std::string getSchemaFileName() const;
00104 
00106         void setSchemaDirectory(const char * dir);
00107 
00109         std::string getSchemaDirectory() const;
00110 
00112         void setConnectionSettings(const ms_connection_settings & cs);
00113 
00115         ms_connection_settings getConnectionSettings() const;
00116 
00118         void read_file();
00119 
00121         void save_file();
00122 
00124         void read_buffer(const char *buffer);
00125 
00127         std::string save_buffer();
00128 
00130         std::string validateDocument() const;
00131 
00133         int getNumberOfMethods() const;
00134 
00136         void clearMethods();
00137 
00139         void appendMethod(const ms_quant_method *item);
00140 
00142         const ms_quant_method * getMethodByNumber(const int idx) const;
00143 
00145         const ms_quant_method * getMethodByName(const char *name) const;
00146 
00148         bool updateMethodByNumber(const int idx, const ms_quant_method *mod);
00149 
00151         bool updateMethodByName(const char *name, const ms_quant_method *mod);
00152 
00154         bool deleteMethodByNumber(const int idx);
00155 
00157         bool deleteMethodByName(const char *name);
00158 
00160         std::string getMajorVersion() const;
00161 
00163         std::string getMinorVersion() const;
00164 
00165     private:
00166         msparser_internal::ms_quant_configfile_impl * m_pImpl;
00167     }; // class ms_quant_configfile
00168  // end of config_group
00170 
00171 } // namespace matrix_science
00172 
00173 #endif // MS_QUANT_CONFIGFILE_HPP
00174 
00175 /*------------------------------- End of File -------------------------------*/
00176 
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:51