OpalGloballyUniqueID Class Reference

#include <guid.h>

List of all members.

Public Member Functions

Construction
 OpalGloballyUniqueID ()
 OpalGloballyUniqueID (const char *cstr)
 OpalGloballyUniqueID (const PString &str)
 OpalGloballyUniqueID (const PASN_OctetString &ostr)
Overrides from PObject
virtual void PrintOn (ostream &strm) const
virtual void ReadFrom (istream &strm)
virtual PObject * Clone () const
virtual PINDEX HashFunction () const
Operations
PString AsString () const
BOOL IsNULL () const
bool operator! () const


Detailed Description

Globally unique ID definition. This implements a 128 bit globally unique ID as required by many protocols and software systems. The value is constructed in such a way as to make a duplicate anywhere in the world highly unlikely.

Definition at line 70 of file guid.h.


Constructor & Destructor Documentation

OpalGloballyUniqueID::OpalGloballyUniqueID (  ) 

Create a new ID. The ID created with this will be initialised to a globally unique ID as per specification.

Definition at line 96 of file guid.cxx.

Referenced by Clone().

OpalGloballyUniqueID::OpalGloballyUniqueID ( const char *  cstr  ) 

Create an ID from a C string of hex (as produced by AsString()). A useful construct is to construct a OpalGloballyUniqueID() with NULL which produces an all zero GUID, etectable with the isNULL() function.

Parameters:
cstr  C string to convert

Definition at line 187 of file guid.cxx.

References ReadFrom().

OpalGloballyUniqueID::OpalGloballyUniqueID ( const PString &  str  ) 

Create an ID from a PString of hex (as produced by AsString()).

Parameters:
str  String of hex to convert

Definition at line 197 of file guid.cxx.

References ReadFrom().

OpalGloballyUniqueID::OpalGloballyUniqueID ( const PASN_OctetString &  ostr  ) 

Create an ID from an octet string in an ASN PDU.

Parameters:
ostr  Octet string from ASN to convert

Definition at line 205 of file guid.cxx.


Member Function Documentation

void OpalGloballyUniqueID::PrintOn ( ostream &  strm  )  const [virtual]

Standard stream print function. The PObject class has a << operator defined that calls this function polymorphically.

Parameters:
strm  Stream to output text representation

Definition at line 231 of file guid.cxx.

Referenced by AsString().

void OpalGloballyUniqueID::ReadFrom ( istream &  strm  )  [virtual]

Standard stream read function. The PObject class has a >> operator defined that calls this function polymorphically.

Parameters:
strm  Stream to output text representation

Definition at line 257 of file guid.cxx.

Referenced by OpalGloballyUniqueID().

PObject * OpalGloballyUniqueID::Clone (  )  const [virtual]

Create a clone of the ID. The duplicate ID has the same value as the source. Required for having this object as a key in dictionaries.

Definition at line 213 of file guid.cxx.

References OpalGloballyUniqueID().

PINDEX OpalGloballyUniqueID::HashFunction (  )  const [virtual]

Get the hash value for the ID. Creates a number based on the ID value for use in the hash table of a dictionary. Required for having this object as a key in dictionaries.

Definition at line 221 of file guid.cxx.

PString OpalGloballyUniqueID::AsString (  )  const

Convert the ID to human readable string.

Definition at line 293 of file guid.cxx.

References PrintOn().

Referenced by H323PeerElement::AddServiceRelationship(), H460_FeatureContent::H460_FeatureContent(), and H323PeerElement::ServiceRequestByAddr().

BOOL OpalGloballyUniqueID::IsNULL (  )  const

Test if the GUID is null, ie consists of all zeros.

Definition at line 301 of file guid.cxx.

Referenced by H323RasPDU::BuildServiceControlIndication(), and operator!().


The documentation for this class was generated from the following files:
Generated on Thu Oct 25 13:46:07 2007 for h323plus by  doxygen 1.5.2