Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PString PASNIPAddress::GetString (  )  const [virtual]

Return the value of the object as a PString. This function can be use for all ASN object types

Reimplemented from PASNString.

Definition at line 1238 of file pasn.cxx.

  PINDEX len = value.GetSize();
  if (len == 0) 
    return "(empty)";

  if (len < 4) {
    PString out = "Hex";
    for (PINDEX i = 0; i < len; i++)
      out &= psprintf("%02x", (BYTE)value[i]);
    return out;

  return psprintf("%i.%i.%i.%i",
         (BYTE)value[0], (BYTE)value[1],
         (BYTE)value[2], (BYTE)value[3]);

Generated by  Doxygen 1.6.0   Back to index