00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef MS_QUANT_CONFIGFILE_HPP
00019 #define MS_QUANT_CONFIGFILE_HPP
00020
00021
00022 #include <string>
00023
00024
00025 namespace msparser_internal {
00026 class ms_quant_xmlloader;
00027 class ms_quant_configfile_impl;
00028 }
00029
00030 namespace matrix_science {
00031
00032 class ms_connection_settings;
00033 class ms_quant_method;
00034
00040
00041
00051 class MS_MASCOTRESFILE_API ms_quant_configfile: public ms_errors
00052 {
00053 friend class msparser_internal::ms_quant_xmlloader;
00054 public:
00056 ms_quant_configfile();
00057
00059 ms_quant_configfile(const ms_quant_configfile& src);
00060
00062 ms_quant_configfile(const char* fileName, const char* schemaFileName,
00063 const ms_connection_settings * cs = 0);
00064
00066 ~ms_quant_configfile();
00067
00069 void defaultValues();
00070
00072 void copyFrom(const ms_quant_configfile* right);
00073
00074 #ifndef SWIG
00075
00076 ms_quant_configfile& operator=(const ms_quant_configfile& right);
00077 #endif
00078
00079 void setFileName(const char* name);
00080
00082 std::string getFileName() const;
00083
00085 void setSchemaFileName(const char* name);
00086
00088 std::string getSchemaFileName() const;
00089
00091 void setSchemaDirectory(const char * dir);
00092
00094 std::string getSchemaDirectory() const;
00095
00097 void setConnectionSettings(const ms_connection_settings & cs);
00098
00100 ms_connection_settings getConnectionSettings() const;
00101
00103 void read_file();
00104
00106 void save_file();
00107
00109 void read_buffer(const char *buffer);
00110
00112 std::string save_buffer();
00113
00115 std::string validateDocument() const;
00116
00118 int getNumberOfMethods() const;
00119
00121 void clearMethods();
00122
00124 void appendMethod(const ms_quant_method *item);
00125
00127 const ms_quant_method * getMethodByNumber(const int idx) const;
00128
00130 const ms_quant_method * getMethodByName(const char *name) const;
00131
00133 bool updateMethodByNumber(const int idx, const ms_quant_method *mod);
00134
00136 bool updateMethodByName(const char *name, const ms_quant_method *mod);
00137
00139 bool deleteMethodByNumber(const int idx);
00140
00142 bool deleteMethodByName(const char *name);
00143
00145 std::string getMajorVersion() const;
00146
00148 std::string getMinorVersion() const;
00149
00150 private:
00151 msparser_internal::ms_quant_configfile_impl * m_pImpl;
00152 };
00153
00155
00156 }
00157
00158 #endif // MS_QUANT_CONFIGFILE_HPP
00159
00160
00161