![]() |
MAK RTIspy API Documentation for HLA Evolved
|
00001 /********************************************************************* 00002 ** Copyright (c) 2008 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: hostNameAddress.h,v $ $Revision: 1.5 $ $State: Exp $ 00007 *********************************************************************/ 00008 00009 #ifndef hostNameAddress_H_ 00010 #define hostNameAddress_H_ 00011 00014 00015 00016 #include <rtiUtil.h> 00017 #include <vlutil/vlInetAddr.h> 00018 00019 00020 00023 class DT_DLL_RTIUTIL DtHostNameAddress 00024 { 00025 public: 00026 00028 DtHostNameAddress(const MAKRti::DtString& hostName, const MAKRti::DtInetAddr& addr); 00029 00031 DtHostNameAddress(const MAKRti::DtString& address); 00032 00034 DtHostNameAddress(const DtHostNameAddress& orig); 00035 00036 virtual ~DtHostNameAddress(); 00037 00040 virtual bool operator<(const DtHostNameAddress& other) const; 00041 00044 virtual bool operator==(const DtHostNameAddress& other) const; 00045 00048 virtual bool operator!=(const DtHostNameAddress& other) const; 00049 00051 virtual DtHostNameAddress& operator=(const DtHostNameAddress& other); 00052 00054 virtual const MAKRti::DtInetAddr& ip() const; 00055 00057 virtual void setIp(const MAKRti::DtInetAddr& newIp); 00058 00060 virtual const MAKRti::DtString& hostName() const; 00061 00064 virtual void setHostName(const MAKRti::DtString& newHostName); 00065 00067 virtual void setHostFromString(const MAKRti::DtString& newAddr); 00068 00070 virtual const MAKRti::DtString& compareHostName() const; 00071 00073 virtual bool isValid() const; 00074 00076 virtual bool isLocal() const; 00077 00078 00079 protected: 00080 00082 virtual void setIsValid(); 00083 00086 virtual MAKRti::DtInetAddr dottedStringToAddress( const MAKRti::DtString& address ); 00087 00088 protected: 00089 00091 MAKRti::DtString myHostName; 00092 00094 MAKRti::DtString myCaseInsensitiveHostname; 00095 00097 MAKRti::DtInetAddr myHostIp; 00098 00100 bool myIsLocal; 00101 00103 bool myIsValid; 00104 00105 private: 00106 // Default constructor not implemented. 00107 DtHostNameAddress(); 00108 00109 00110 }; 00111 00112 00113 00114 #endif