Matrix Science header

ms_quant_localdef.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_quant_localdef.hpp                                                #
00004 # 'msparser' toolkit                                                         #
00005 # Encapsulates \c local_definition element from "quantitation.xml"-file       #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2006 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011  * @(#)$Source: /vol/cvsroot/parser/inc/ms_quant_localdef.hpp,v $
00012  * @(#)$Revision: 1.8 $
00013  * @(#)$Date: 2010/09/06 16:18:57 $
00014 ##############################################################################
00015  */
00016 
00017 #ifndef MS_QUANT_LOCALDEF_HPP
00018 #define MS_QUANT_LOCALDEF_HPP
00019 
00020 #ifdef _WIN32
00021 #pragma warning(disable:4251)   // Don't want all classes to be exported
00022 #pragma warning(disable:4786)   // Debug symbols too long
00023 #   ifndef _MATRIX_USE_STATIC_LIB
00024 #       ifdef MS_MASCOTRESFILE_EXPORTS
00025 #           define MS_MASCOTRESFILE_API __declspec(dllexport)
00026 #       else
00027 #           define MS_MASCOTRESFILE_API __declspec(dllimport)
00028 #       endif
00029 #   else
00030 #       define MS_MASCOTRESFILE_API
00031 #   endif
00032 #else
00033 #   define MS_MASCOTRESFILE_API
00034 #endif
00035 
00036 #include <string>
00037 #include <vector>
00038 
00039 // forward declarations
00040 namespace msparser_internal {
00041     class ms_quant_xmlloader;
00042 }
00043 
00044 namespace matrix_science {
00045 
00046     class ms_quant_specificity; // forward declaration
00047     class ms_quant_composition; // forward declaration
00048     class ms_xml_schema; // forward declaration
00049 
00055 
00056     class MS_MASCOTRESFILE_API ms_quant_localdef: public ms_xml_IValidatable
00057     {
00058         friend class msparser_internal::ms_quant_xmlloader;
00059 
00060     public:
00062         ms_quant_localdef();
00063 
00065         ms_quant_localdef(const ms_quant_localdef& src);
00066 
00068         virtual ~ms_quant_localdef();
00069 
00071         void defaultValues();
00072 
00074         void copyFrom(const ms_quant_localdef* right);
00075 
00076 #ifndef SWIG
00077 
00078         ms_quant_localdef& operator=(const ms_quant_localdef& right);
00079 #endif
00080 
00081         virtual std::string getSchemaType() const;
00082 
00084         virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
00085 
00087         virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
00088 
00089 
00091         int getNumberOfSpecificities() const;
00092 
00094         void clearSpecificities();
00095 
00097         void appendSpecificity(const ms_quant_specificity *specificity);
00098 
00100         const ms_quant_specificity * getSpecificity(const int idx) const;
00101 
00103         bool updateSpecificity(const int idx, const ms_quant_specificity* specificity);
00104 
00106         bool deleteSpecificity(const int idx);
00107 
00109         std::string getSpecificitySchemaType() const;
00110 
00111 
00113         bool haveDelta() const;
00114 
00116         const ms_quant_composition* getDelta() const;
00117 
00119         void setDelta(const ms_quant_composition *delta);
00120 
00122         void dropDelta();
00123 
00125         std::string getDeltaSchemaType() const;
00126 
00127 
00129         int getNumberOfIgnores() const;
00130 
00132         void clearIgnores();
00133 
00135         void appendIgnore(const ms_quant_composition *ignore);
00136 
00138         const ms_quant_composition * getIgnore(const int idx) const;
00139 
00141         bool updateIgnore(const int idx, const ms_quant_composition* ignore);
00142 
00144         bool deleteIgnore(const int idx);
00145 
00147         std::string getIgnoreSchemaType() const;
00148 
00149 
00151         bool haveTitle() const;
00152 
00154         std::string getTitle() const;
00155 
00157         void setTitle(const char* value);
00158 
00160         void dropTitle();
00161 
00163         std::string getTitleSchemaType() const;
00164 
00165 
00166     private:
00167         // elements
00168         typedef std::vector< ms_quant_specificity* > specificity_vector;
00169         specificity_vector _specificities;
00170 
00171         ms_quant_composition* _pDelta;
00172         bool _delta_set;
00173 
00174         typedef std::vector< ms_quant_composition* > composition_vector;
00175         composition_vector _ignores;
00176 
00177         // attributes
00178         std::string _title;
00179         bool _title_set;
00180 
00181     }; // class ms_quant_localdef
00182  // end of config_group
00184 
00185 } // namespace matrix_science
00186 
00187 #endif // MS_QUANT_LOCALDEF_HPP
00188 
00189 /*------------------------------- End of File -------------------------------*/
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:51