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: villek@matrixscience.com $ #
00013 #       $Date: 2018-07-30 16:23:53 +0100 $ #
00014 #   $Revision: 1b450440f9c97e1e41d0fc6016a27d68951d4532 | MSPARSER_REL_2_8_1-0-gea32989045 $ #
00015 # $NoKeywords::                                                            $ #
00016 ##############################################################################
00017 */
00018 
00019 #ifndef MS_WWWOPTIONS_HPP
00020 #define MS_WWWOPTIONS_HPP
00021 
00022 
00023 #include <string>
00024 #include <vector>
00025 
00026 
00027 namespace matrix_science {
00038     enum WWW_TYPE
00039     {
00040         WWW_SEQ = 0,    
00041         WWW_REP = 1     
00042     };
00043 
00045 
00051     class MS_MASCOTRESFILE_API ms_wwwentry
00052     {
00053         friend class ms_datfile;
00054         friend class ms_wwwoptions;
00055 
00056     public:
00058         ms_wwwentry();
00059 
00061         ms_wwwentry(const ms_wwwentry& src);
00062         
00064         ~ms_wwwentry();
00065 
00067         void defaultValues();
00068 
00070         void copyFrom(const ms_wwwentry* right);
00071 
00072 #ifndef SWIG
00073 
00074         ms_wwwentry& operator=(const ms_wwwentry& right);
00075 #endif
00076 
00077         std::string getName() const;
00078 
00080         void setName(const char* value);
00081 
00083         WWW_TYPE getType() const;
00084 
00086         void setType(const WWW_TYPE value);
00087 
00089         int getParseRule() const;
00090 
00092         void setParseRule(const int value);
00093 
00095         std::string getHostName() const;
00096 
00098         void setHostName(const char* value);
00099 
00101         int getPortNumber() const;
00102 
00104         void setPortNumber(const int value);
00105 
00107         std::string getPath() const;
00108 
00110         void setPath(const char* value);
00111 
00112     private:
00113         std::string name_;
00114         WWW_TYPE type_;
00115         int parseRuleNum_;
00116         std::string hostName_;
00117         int portNumber_;
00118         std::string path_;
00119 
00120         std::string getStringName() const;
00121         std::string getStringValue() const;
00122     }; // class MS_MASCOTRESFILE_API ms_wwwentry
00123 
00125 
00156     class MS_MASCOTRESFILE_API ms_wwwoptions: public ms_customproperty
00157     {
00158         friend class ms_datfile;
00159     public:
00160 
00162         ms_wwwoptions();
00163 
00165         ms_wwwoptions(const ms_wwwoptions& src);
00166 
00168         ~ms_wwwoptions();
00169 
00171         void defaultValues();
00172 
00174         void copyFrom(const ms_wwwoptions* right);
00175 
00176 #ifndef SWIG
00177 
00178         ms_wwwoptions& operator=(const ms_wwwoptions& right);
00179 #endif
00180 
00181         bool isSectionAvailable() const;
00182 
00184         void setSectionAvailable(const bool value);
00185 
00187         int getNumberOfEntries() const;
00188 
00190         const ms_wwwentry* getEntry(const int index) const;
00191 
00193         const ms_wwwentry* getSeqEntryByName(const char* dbName) const;
00194         
00196         const ms_wwwentry* getRepEntryByName(const char* dbName) const;
00197 
00199         void clearEntries();
00200         
00202         void appendEntry(const ms_wwwentry* item);
00203 
00205         void setEntry(const int index, const ms_wwwentry* item);
00206 
00208         void dropEntry(const int index);
00209 
00210 #ifdef SUPPRESS_MS_CUSTOMPROPERTY_INHERITANCE
00211 #include "suppress_ms_customproperty.hpp"
00212 #endif
00213 
00214     private:
00215         bool sectionAvailable_;
00216         std::vector< ms_wwwentry* > entries_;
00217     }; // class ms_wwwoptions // end of config_group
00219 } // namespace matrix_science
00220 
00221 #endif // MS_WWWOPTIONS_HPP

Copyright © 2022 Matrix Science Ltd.  All Rights Reserved. Generated on Thu Mar 31 2022 01:12:30