Matrix Science header

ms_computeraddress.hpp

00001 /*
00002 ##############################################################################
00003 # file: ms_computeraddress.hpp                                               #
00004 # 'msparser' toolkit                                                         #
00005 # Contains computer address parameters required by cluster mode              #
00006 ##############################################################################
00007 # COPYRIGHT NOTICE                                                           #
00008 # Copyright 1998-2003 Matrix Science Limited  All Rights Reserved.           #
00009 #                                                                            #
00010 ##############################################################################
00011 #    $Archive:: /Mowse/ms_mascotresfile/include/ms_computeraddress.hpp     $ #
00012 #     $Author: francoisr $ #
00013 #       $Date: 2016/05/17 12:49:19 $ #
00014 #   $Revision: 1.7 $ #
00015 # $NoKeywords::                                                            $ #
00016 ##############################################################################
00017 */
00018 
00019 #ifndef MS_COMPUTERADDRESS_HPP
00020 #define MS_COMPUTERADDRESS_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 namespace matrix_science {
00051 
00052     class MS_MASCOTRESFILE_API ms_computeraddress
00053     {
00054         friend class ms_datfile;
00055         friend class ms_clusterparams;
00056 
00057     public:
00059         ms_computeraddress();
00060 
00062         ms_computeraddress(const ms_computeraddress& src);
00063 
00065         ~ms_computeraddress();
00066 
00068         void defaultValues();
00069 
00071         void copyFrom(const ms_computeraddress* right);
00072 
00073 #ifndef SWIG
00074 
00075         ms_computeraddress& operator=(const ms_computeraddress& right);
00076 #endif
00077 
00078         std::string getInetAddress() const;
00079 
00081         void setInetAddress(const char* address);
00082 
00084         std::string getHostName() const;
00085 
00087         void setHostName(const char* name);
00088 
00090         unsigned int getPort() const;
00091 
00093         void setPort(const unsigned int value);
00094 
00095     private:
00096         std::string     inetAddress_;
00097         std::string     hostName_;
00098         unsigned short  port_;
00099 
00100         void setCustomString();
00101         std::string     customString_;
00102     }; // class ms_computeraddress // end of config_group
00104 } // namespace matrix_science
00105 
00106 #endif // MS_COMPUTERADDRESS_HPP
00107 
00108 /*------------------------------- End of File -------------------------------*/
Copyright © 2016 Matrix Science Ltd.  All Rights Reserved. Generated on Fri Jun 2 2017 01:44:50