openikev2::ID Class Reference

This class represents a peer identity. More...

#include <id.h>

Inheritance diagram for openikev2::ID:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ID (Enums::ID_TYPE type, auto_ptr< ByteArray > id_data)
 Creates a new ID.
 ID (IpAddress &ip_address)
 Creates a new ID based on an IP address.
 ID (Enums::ID_TYPE type, string id_data)
 Creates a new ID based on a string (to be used with all the textual ID types).
 ID (const ID &other)
 Creates a new ID cloning another one.
bool operator== (const ID &other) const
 Indicates if this ID is equals to another.
auto_ptr< IDclone () const
 Creates a clone of this ID.
virtual string toStringTab (uint8_t tabs) const
 Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.

Public Attributes

Enums::ID_TYPE id_type
 Type of identification data.
auto_ptr< ByteArrayid_data
 Identification data.

Detailed Description

This class represents a peer identity.

Author:
Alejandro Perez Mendez, Pedro J. Fernandez Ruiz <alejandro_perez@dif.um.es, pedroj.fernandez@dif.um.es>


Constructor & Destructor Documentation

openikev2::ID::ID ( Enums::ID_TYPE  type,
auto_ptr< ByteArray id_data 
)

Creates a new ID.

Parameters:
type Identification type
id_data Identification data

openikev2::ID::ID ( IpAddress ip_address  ) 

Creates a new ID based on an IP address.

Parameters:
ip_address IP Address

openikev2::ID::ID ( Enums::ID_TYPE  type,
string  id_data 
)

Creates a new ID based on a string (to be used with all the textual ID types).

Parameters:
type ID type
id_data string containing identification data

openikev2::ID::ID ( const ID other  ) 

Creates a new ID cloning another one.

Parameters:
other Other ID


Member Function Documentation

bool openikev2::ID::operator== ( const ID other  )  const

Indicates if this ID is equals to another.

Parameters:
other Other ID
Returns:
TRUE if both are equals. FALSE otherwise.

auto_ptr< ID > openikev2::ID::clone (  )  const

Creates a clone of this ID.

Returns:
A new ID object

string openikev2::ID::toStringTab ( uint8_t  tabs  )  const [virtual]

Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.

Parameters:
tabs Num of tabs preceding the textual representation.
Returns:
Textual tabulated represetation of the object.

Implements openikev2::Printable.


Generated on Fri Jul 27 11:04:51 2007 for libopenikev2 by  doxygen 1.5.1