Matrix Science header

ms_wwwoptions.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_wwwoptions.hpp                                                    #
00004 # 'msparser' toolkit                                                         #
00005 # Represents "WWW" section of "mascot.dat" file                              #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2003 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011 #    $Archive:: /Mowse/ms_mascotresfile/include/ms_wwwoptions.hpp          $ #
00012 #     $Author: francoisr $ #
00013 #       $Date: 2016/05/17 12:49:19 $ #
00014 #   $Revision: 1.14 $ #
00015 # $NoKeywords::                                                            $ #
00016 ##############################################################################
00017 */
00018 
00019 #ifndef MS_WWWOPTIONS_HPP
00020 #define MS_WWWOPTIONS_HPP
00021 
00022 #ifdef _WIN32
00023 #pragma warning(disable:4251)   // Don't want all classes to be exported
00024 #pragma warning(disable:4786)   // Debug symbols too long
00025 #   ifndef _MATRIX_USE_STATIC_LIB
00026 #       ifdef MS_MASCOTRESFILE_EXPORTS
00027 #           define MS_MASCOTRESFILE_API __declspec(dllexport)
00028 #       else
00029 #           define MS_MASCOTRESFILE_API __declspec(dllimport)
00030 #       endif
00031 #   else
00032 #       define MS_MASCOTRESFILE_API
00033 #   endif
00034 #else
00035 #   define MS_MASCOTRESFILE_API
00036 #endif
00037 
00038 // for the sake of #include <string>
00039 #ifdef __ALPHA_UNIX__
00040 #include <ctype.h>
00041 #endif
00042 #include <string>
00043 #include <vector>
00044 
00045 
00046 namespace matrix_science {
00057     enum WWW_TYPE
00058     {
00059         WWW_SEQ = 0,    
00060         WWW_REP = 1     
00061     };
00062 
00064 
00070     class MS_MASCOTRESFILE_API ms_wwwentry
00071     {
00072         friend class ms_datfile;
00073         friend class ms_wwwoptions;
00074 
00075     public:
00077         ms_wwwentry();
00078 
00080         ms_wwwentry(const ms_wwwentry& src);
00081         
00083         ~ms_wwwentry();
00084 
00086         void defaultValues();
00087 
00089         void copyFrom(const ms_wwwentry* right);
00090 
00091 #ifndef SWIG
00092 
00093         ms_wwwentry& operator=(const ms_wwwentry& right);
00094 #endif
00095 
00096         std::string getName() const;
00097 
00099         void setName(const char* value);
00100 
00102         WWW_TYPE getType() const;
00103 
00105         void setType(const WWW_TYPE value);
00106 
00108         int getParseRule() const;
00109 
00111         void setParseRule(const int value);
00112 
00114         std::string getHostName() const;
00115 
00117         void setHostName(const char* value);
00118 
00120         int getPortNumber() const;
00121 
00123         void setPortNumber(const int value);
00124 
00126         std::string getPath() const;
00127 
00129         void setPath(const char* value);
00130 
00131     private:
00132         std::string name_;
00133         WWW_TYPE type_;
00134         int parseRuleNum_;
00135         std::string hostName_;
00136         int portNumber_;
00137         std::string path_;
00138 
00139         std::string getStringName() const;
00140         std::string getStringValue() const;
00141     }; // class MS_MASCOTRESFILE_API ms_wwwentry
00142 
00144 
00175     class MS_MASCOTRESFILE_API ms_wwwoptions: public ms_customproperty
00176     {
00177         friend class ms_datfile;
00178     public:
00179 
00181         ms_wwwoptions();
00182 
00184         ms_wwwoptions(const ms_wwwoptions& src);
00185 
00187         ~ms_wwwoptions();
00188 
00190         void defaultValues();
00191 
00193         void copyFrom(const ms_wwwoptions* right);
00194 
00195 #ifndef SWIG
00196 
00197         ms_wwwoptions& operator=(const ms_wwwoptions& right);
00198 #endif
00199 
00200         bool isSectionAvailable() const;
00201 
00203         void setSectionAvailable(const bool value);
00204 
00206         int getNumberOfEntries() const;
00207 
00209         const ms_wwwentry* getEntry(const int index) const;
00210 
00212         const ms_wwwentry* getSeqEntryByName(const char* dbName) const;
00213         
00215         const ms_wwwentry* getRepEntryByName(const char* dbName) const;
00216 
00218         void clearEntries();
00219         
00221         void appendEntry(const ms_wwwentry* item);
00222 
00224         void setEntry(const int index, const ms_wwwentry* item);
00225 
00227         void dropEntry(const int index);
00228 
00229 #ifdef SUPPRESS_MS_CUSTOMPROPERTY_INHERITANCE
00230 #include "suppress_ms_customproperty.hpp"
00231 #endif
00232 
00233     private:
00234         bool sectionAvailable_;
00235         std::vector< ms_wwwentry* > entries_;
00236     }; // class ms_wwwoptions // end of config_group
00238 } // namespace matrix_science
00239 
00240 #endif // MS_WWWOPTIONS_HPP
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:51