![]() |
MAK RTIspy API Documentation for HLA 1.3
|
DtHostNameAddress stores information on a host, input as either hostname, IP address, or both. More...
Collaboration diagram for DtHostNameAddress:Public Member Functions | |
| DtHostNameAddress (const MAKRti::DtString &hostName, const MAKRti::DtInetAddr &addr) | |
| Input both hostname and address. | |
| DtHostNameAddress (const MAKRti::DtString &address) | |
| Input either ipstring or hostname string. | |
| DtHostNameAddress (const DtHostNameAddress &orig) | |
| copy constructor | |
| virtual | ~DtHostNameAddress () |
| virtual bool | operator< (const DtHostNameAddress &other) const |
| Less than, if address has been resolved to (or input as) an IP will just compare the IP number (Ipv4 or Ipv6). | |
| virtual bool | operator== (const DtHostNameAddress &other) const |
| Equals operator. | |
| virtual bool | operator!= (const DtHostNameAddress &other) const |
| Not equals operator. | |
| virtual DtHostNameAddress & | operator= (const DtHostNameAddress &other) |
| Assignment operator. | |
| virtual const MAKRti::DtInetAddr & | ip () const |
| Get IP address represented by this, returns 0 if error, unresolvable. | |
| virtual void | setIp (const MAKRti::DtInetAddr &newIp) |
| Sets the IP address. Will not affect the hostname. | |
| virtual const MAKRti::DtString & | hostName () const |
| Get the hostname represented by this, returns "" if error, can't look up. | |
| virtual void | setHostName (const MAKRti::DtString &newHostName) |
| Sets the hostname. | |
| virtual void | setHostFromString (const MAKRti::DtString &newAddr) |
| Attempts to set the hostname and IP from the given string. | |
| virtual const MAKRti::DtString & | compareHostName () const |
| Return the hostname that should be used for comparison's sake. | |
| virtual bool | isValid () const |
| Is this valid, IP address is ok. | |
| virtual bool | isLocal () const |
| Is this host a local interface. | |
Protected Member Functions | |
| virtual void | setIsValid () |
| Determines and sets whether the current information is a valid host. | |
| virtual MAKRti::DtInetAddr | dottedStringToAddress (const MAKRti::DtString &address) |
| Convert a dotted string address to an IP. | |
Protected Attributes | |
| MAKRti::DtString | myHostName |
| Hostname. | |
| MAKRti::DtString | myCaseInsensitiveHostname |
| Case insensitive hostname, for comparison. | |
| MAKRti::DtInetAddr | myHostIp |
| IP. | |
| bool | myIsLocal |
| Does this represent a local address. | |
| bool | myIsValid |
| Are both my ip and hostname valid? | |
Private Member Functions | |
| DtHostNameAddress () | |
DtHostNameAddress stores information on a host, input as either hostname, IP address, or both.
| DtHostNameAddress::DtHostNameAddress | ( | const MAKRti::DtString & | hostName, |
| const MAKRti::DtInetAddr & | addr | ||
| ) |
Input both hostname and address.
| DtHostNameAddress::DtHostNameAddress | ( | const MAKRti::DtString & | address | ) |
Input either ipstring or hostname string.
| DtHostNameAddress::DtHostNameAddress | ( | const DtHostNameAddress & | orig | ) |
copy constructor
|
virtual |
|
private |
|
virtual |
Return the hostname that should be used for comparison's sake.
References myCaseInsensitiveHostname.
Referenced by DtRtiConnectionInfo::isEquivalentHost(), operator<(), and operator==().
|
protectedvirtual |
Convert a dotted string address to an IP.
Returns INADDR_ANY if not a dotted string.
Referenced by setHostFromString().
|
virtual |
Get the hostname represented by this, returns "" if error, can't look up.
References myHostName.
Referenced by DtRtiConnectionInfo::constructConnDescription(), DtRtiConnectionInfo::constructConnName(), DtAssistantInfo::hostName(), DtRtiConnectionInfo::hostName(), and DtRtiConnectionInfo::operator=().
|
virtual |
Get IP address represented by this, returns 0 if error, unresolvable.
References myHostIp.
Referenced by DtAssistantInfo::address(), DtRtiConnectionInfo::constructConnDescription(), DtRtiConnectionInfo::constructConnName(), DtRtiConnectionInfo::isEquivalentHost(), and DtRtiConnectionInfo::reliableIp().
|
virtual |
Is this host a local interface.
References myIsLocal.
Referenced by DtRtiConnectionInfo::isLocalHost(), and DtAssistantInfo::isThisAssistant().
|
virtual |
Is this valid, IP address is ok.
References myIsValid.
Referenced by DtRtiConnectionInfo::constructConnName(), DtAssistantFederateViewMgr::federateStatDlgClosing(), DtAssistantInfo::findMatchingHostInfo(), DtAssistantFomViewMgr::fomStatDlgClosing(), DtRtiConnectionInfo::isEquivalentHost(), DtRtiConnectionInfo::isValid(), DtAssistantFomViewMgr::lrcNetStatsUpdateIntervalUpdated(), DtAssistantFederateViewMgr::lrcNetStatsUpdateIntervalUpdated(), operator<(), DtRtiConnectionInfo::operator=(), operator==(), DtAssistantFederationsInfoMgr::requestFederateLoc(), DtAssistantFederateViewMgr::sendFederateObservationRequest(), DtAssistantFomViewMgr::sendFomObservationRequest(), DtRtiAssistantPeer::sendMsgToAssistant(), DtAssistantNetStatsObservationMgr::sendNetStatsObserveRsp(), DtAssistantFederationsViewMgr::sendPendingRidRequest(), and DtAssistantFederationsViewMgr::updateRidParams().
|
virtual |
Not equals operator.
See note in operator< comments for parameters which are used in comparison.
|
virtual |
Less than, if address has been resolved to (or input as) an IP will just compare the IP number (Ipv4 or Ipv6).
References compareHostName(), isValid(), myCaseInsensitiveHostname, myHostIp, and myIsValid.
|
virtual |
Assignment operator.
References myCaseInsensitiveHostname, myHostIp, myHostName, myIsLocal, and myIsValid.
|
virtual |
Equals operator.
See note in operator< comments for parameters which are used in comparison.
References compareHostName(), isValid(), myCaseInsensitiveHostname, myHostIp, and myIsValid.
|
virtual |
Attempts to set the hostname and IP from the given string.
References dottedStringToAddress(), myCaseInsensitiveHostname, myHostIp, myHostName, and setIsValid().
Referenced by setHostName().
|
virtual |
Sets the hostname.
If IP is already set, will not reset. If not, will try to look up the IP based on the hostname.
References myCaseInsensitiveHostname, myHostName, myIsValid, setHostFromString(), and setIsValid().
Referenced by DtRtiConnectionInfo::operator=(), DtAssistantInfo::setHostName(), and DtRtiConnectionInfo::setHostName().
|
virtual |
Sets the IP address. Will not affect the hostname.
References myHostIp, and setIsValid().
Referenced by DtRtiConnectionInfo::operator=(), DtAssistantInfo::setAddress(), and DtRtiConnectionInfo::setReliableIp().
|
protectedvirtual |
Determines and sets whether the current information is a valid host.
References DtIsIpOfLocalInterface(), myHostIp, myIsLocal, and myIsValid.
Referenced by setHostFromString(), setHostName(), and setIp().
|
protected |
Case insensitive hostname, for comparison.
Referenced by compareHostName(), operator<(), operator=(), operator==(), setHostFromString(), and setHostName().
|
protected |
IP.
Referenced by ip(), operator<(), operator=(), operator==(), setHostFromString(), setIp(), and setIsValid().
|
protected |
Hostname.
Referenced by hostName(), operator=(), setHostFromString(), and setHostName().
|
protected |
Does this represent a local address.
Referenced by isLocal(), operator=(), and setIsValid().
|
protected |
Are both my ip and hostname valid?
Referenced by isValid(), operator<(), operator=(), operator==(), setHostName(), and setIsValid().