Matrix Science header

ms_umod_elemref.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_umod_elemref.hpp                                                  #
00004 # 'msparser' toolkit                                                         #
00005 # Represents 'elemref_t' type in unimod.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_umod_elemref.hpp,v $
00012  * @(#)$Revision: 1.8 $
00013  * @(#)$Date: 2010/09/06 16:18:57 $
00014 ##############################################################################
00015  */
00016 
00017 #ifndef MS_UMOD_ELEMREF_HPP
00018 #define MS_UMOD_ELEMREF_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_umod_xmlloader;
00042 }
00043 
00044 namespace matrix_science {
00045 
00046     class ms_quant_element; // forward declaration;
00047     class ms_xml_schema; // forward declaration
00048 
00054 
00055 
00059     class MS_MASCOTRESFILE_API ms_umod_elemref: public ms_xml_IValidatable
00060     {
00061         friend class msparser_internal::ms_umod_xmlloader;
00062         friend class ms_umod_configfile;
00063 
00064     public:
00066         ms_umod_elemref();
00067 
00069         ms_umod_elemref(const ms_umod_elemref& src);
00070 
00072         ms_umod_elemref(const ms_quant_element& src);
00073 
00074 
00076         virtual ~ms_umod_elemref();
00077 
00079         void defaultValues();
00080 
00082         void copyFrom(const ms_umod_elemref* right);
00083 
00085         void copyFrom(const ms_quant_element* right);
00086 
00087 #ifndef SWIG
00088 
00089         ms_umod_elemref& operator=(const ms_umod_elemref& right);
00090 #endif
00091 
00092         virtual std::string getSchemaType() const;
00093 
00095         virtual std::string validateShallow(const ms_xml_schema *pSchemaFileObj) const;
00096 
00098         virtual std::string validateDeep(const ms_xml_schema *pSchemaFileObj) const;
00099 
00100 
00102         bool haveSymbol() const;
00103 
00105         std::string getSymbol() const;
00106 
00108         void setSymbol(const char* value);
00109 
00111         void dropSymbol();
00112 
00114         std::string getSymbolSchemaType() const;
00115 
00116 
00118         bool haveNumber() const;
00119 
00121         int getNumber() const;
00122 
00124         void setNumber(const int value);
00125 
00127         void dropNumber();
00128 
00130         std::string getNumberSchemaType() const;
00131 
00132     private:
00133 
00134         std::string _symbol;
00135         bool _symbol_set;
00136 
00137         int _number;
00138         bool _number_set;
00139     }; // class ms_umod_elemref
00140  // end of config_group
00142 
00143 } // namespace matrix_science
00144 
00145 #endif // MS_UMOD_ELEMREF_HPP
00146 
00147 /*------------------------------- End of File -------------------------------*/
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:51