guid.h
Go to the documentation of this file.
/*
* guid.h
*
* Globally Unique Identifier
*
* Open H323 Library
*
* Copyright (c) 1998-2001 Equivalence Pty. Ltd.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Open H323 Library.
*
* The Initial Developer of the Original Code is Equivalence Pty. Ltd.
*
* Contributor(s): ______________________________________.
*
* $Revision: 21788 $
* $Author: rjongbloed $
* $Date: 2008-12-11 23:42:13 -0600 (Thu, 11 Dec 2008) $
*/
#ifndef PTLIB_GUID_H
#define PTLIB_GUID_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
class PASN_OctetString;
class PGloballyUniqueID : public PBYTEArray
{
PCLASSINFO(PGloballyUniqueID, PBYTEArray);
public:
PGloballyUniqueID();
PGloballyUniqueID(
const char * cstr
);
PGloballyUniqueID(
const PString & str
);
#if P_ASN
PGloballyUniqueID(
const PASN_OctetString & ostr
);
#endif
virtual void PrintOn(
ostream & strm
) const;
virtual void ReadFrom(
istream & strm
);
virtual PObject * Clone() const;
virtual PINDEX HashFunction() const;
PString AsString() const;
PBoolean IsNULL() const;
PBoolean operator!() const { return !IsNULL(); }
};
#endif // PTLIB_GUID_H
// End Of File ///////////////////////////////////////////////////////////////
PGloballyUniqueID::PGloballyUniqueID
PGloballyUniqueID()
Create a new ID.
PGloballyUniqueID::PrintOn
virtual void PrintOn(ostream &strm) const
Standard stream print function.
PGloballyUniqueID::Clone
virtual PObject * Clone() const
Create a clone of the ID.
PGloballyUniqueID::HashFunction
virtual PINDEX HashFunction() const
Get the hash value for the ID.
PGloballyUniqueID::IsNULL
PBoolean IsNULL() const
Test if the GUID is null, ie consists of all zeros.
PBoolean
BOOL PBoolean
Definition: object.h:102
PBYTEArray
Array of unsigned characters.
Definition: array.h:670
PGloballyUniqueID
Globally unique ID definition.
Definition: guid.h:48
PString
The character string class.
Definition: pstring.h:108
PGloballyUniqueID::ReadFrom
virtual void ReadFrom(istream &strm)
Standard stream read function.
PGloballyUniqueID::AsString
PString AsString() const
Convert the ID to human readable string.
PASN_OctetString
Class for ASN Octet String type.
Definition: asner.h:458
PObject
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
PGloballyUniqueID::operator!
PBoolean operator!() const
Definition: guid.h:124