Matrix Science header

ms_quant_ratio.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_quant_ratio.hpp                                                   #
00004 # 'msparser' toolkit                                                         #
00005 # Encapsulates "ratioType" 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_ratio.hpp,v $
00012  * @(#)$Revision: 1.8 $
00013  * @(#)$Date: 2010/09/06 16:18:57 $
00014 ##############################################################################
00015  */
00016 
00017 #ifndef MS_QUANT_RATIO_HPP
00018 #define MS_QUANT_RATIO_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_numerator; // forward declaration
00047     class ms_xml_schema; // forward declaration
00048 
00054 
00055     class MS_MASCOTRESFILE_API ms_quant_ratio: public ms_xml_IValidatable
00056     {
00057         friend class msparser_internal::ms_quant_xmlloader;
00058 
00059     public:
00061         ms_quant_ratio();
00062 
00064         ms_quant_ratio(const ms_quant_ratio& src);
00065 
00067         virtual ~ms_quant_ratio();
00068 
00070         void defaultValues();
00071 
00073         void copyFrom(const ms_quant_ratio* right);
00074 
00075 #ifndef SWIG
00076 
00077         ms_quant_ratio& operator=(const ms_quant_ratio& right);
00078 #endif
00079 
00080         virtual std::string getSchemaType() const;
00081 
00083         virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
00084 
00086         virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
00087 
00088 
00090         int getNumberOfNumerators() const;
00091 
00093         void clearNumerators();
00094 
00096         void appendNumerator(const ms_quant_numerator *numerator);
00097 
00099         const ms_quant_numerator * getNumeratorByNumber(const int idx) const;
00100 
00102         const ms_quant_numerator * getNumeratorByName(const char *name) const;
00103 
00105         bool updateNumeratorByNumber(const int idx, const ms_quant_numerator* numerator);
00106 
00108         bool updateNumeratorByName(const char *name, const ms_quant_numerator* numerator);
00109 
00111         bool deleteNumeratorByNumber(const int idx);
00112 
00114         bool deleteNumeratorByName(const char *name);
00115 
00117         std::string getNumeratorSchemaType() const;
00118 
00119 
00121         int getNumberOfDenominators() const;
00122 
00124         void clearDenominators();
00125 
00127         void appendDenominator(const ms_quant_numerator *denominator);
00128 
00130         const ms_quant_numerator * getDenominatorByNumber(const int idx) const;
00131 
00133         const ms_quant_numerator * getDenominatorByName(const char *name) const;
00134 
00136         bool updateDenominatorByNumber(const int idx, const ms_quant_numerator* denominator);
00137 
00139         bool updateDenominatorByName(const char *name, const ms_quant_numerator* denominator);
00140 
00142         bool deleteDenominatorByNumber(const int idx);
00143 
00145         bool deleteDenominatorByName(const char *name);
00146 
00148         std::string getDenominatorSchemaType() const;
00149 
00150 
00152         bool haveName() const;
00153 
00155         std::string getName() const;
00156 
00158         void setName(const char* value);
00159 
00161         void dropName();
00162 
00164         std::string getNameSchemaType() const;
00165 
00166     private:
00167         typedef std::vector< ms_quant_numerator* > numerator_vector;
00168         numerator_vector _numerators;
00169 
00170         numerator_vector _denominators;
00171 
00172         std::string _name;
00173         bool _name_set;
00174 
00175     }; // class ms_quant_ratio
00176  // end of config_group
00178 
00179 } // namespace matrix_science
00180 
00181 #endif // MS_QUANT_RATIO_HPP
00182 
00183 /*------------------------------- End of File -------------------------------*/
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:51