![]() |
GetAddressForWhois() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Public Function |
Declared in: WhoisSocket.h |
Declaration
static std::string GetAddressForWhois(
const std::string& rAddress);
DescriptionGet an address for whois
Function Body
try
{
//Get the vector
AddressVector aVector;
aVector=AnalyzeAddress(rAddress);
//Do we have data
if (aVector.begin()==aVector.end())
return "";
//Get the iterator
AddressVector::const_iterator aIterator;
aIterator=aVector.begin();
//Our address
std::string sAddress;
std::string sAddAddress;
//Get the first one
sAddress+=*aIterator;
//Do we have the second one ?
++aIterator;
if (aIterator==aVector.end())
return "";
//Add it
sAddAddress=*aIterator;
sAddAddress+='.';
sAddAddress+=sAddress;
//What type is it
if (!(*aIterator=="COM" ||
*aIterator=="NET" ||
*aIterator=="ORG" ||
*aIterator=="MIL" ||
*aIterator=="EDU" ||
*aIterator=="CO") ||
sAddress.length()==3)
//Done
return sAddAddress;
//Another sub address
++aIterator;
if (aIterator==aVector.end())
return "";
//This is the final address
sAddress=*aIterator;
sAddress+='.';
sAddress+=sAddAddress;
//Done
return sAddress;
}
ERROR_HANDLER_STATIC_RETURN(CWhoisSocket_Class,"GetAddressForWhois","")
See Also
This web site was generated
using Surveyor V4.50.811.1. Click
here
for more information. |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |