openikev2::Printable Class Reference

This abstract class defines a class wich is able to represent itself in a textual form. More...

#include <printable.h>

Inheritance diagram for openikev2::Printable:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual string toString () const
 Construct a textual representation of the object.
virtual string toStringTab (uint8_t tabs) const =0
 Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.

Static Public Member Functions

static string toHexString (void *pointer, uint16_t size)
 Construct a textual hexadecimal representation of raw array.
static string toHexString (void *pointer, uint16_t size, uint16_t line_size_max, uint16_t tabs)
 Construct a pretty textual hexadecimal representation of a raw array.
static string generateTabs (uint16_t num_tabs)
 Generate a string with the indicated number of tabs.

Static Protected Member Functions

static void fillHexValue (unsigned char *destination, unsigned char value, unsigned char terminator)
 This method writes the hexadecimal value of a byte into destination, using the indicated terminator.

Static Protected Attributes

static unsigned char hextable [16]

Detailed Description

This abstract class defines a class wich is able to represent itself in a textual form.

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


Member Function Documentation

void openikev2::Printable::fillHexValue ( unsigned char *  destination,
unsigned char  value,
unsigned char  terminator 
) [inline, static, protected]

This method writes the hexadecimal value of a byte into destination, using the indicated terminator.

Parameters:
destination 
value 
terminator 

string openikev2::Printable::toHexString ( void *  pointer,
uint16_t  size 
) [static]

Construct a textual hexadecimal representation of raw array.

Parameters:
pointer Pointer to the raw array
size Size of the raw array.
Returns:
Textual hexadecimal representation of the raw array.

string openikev2::Printable::toHexString ( void *  pointer,
uint16_t  size,
uint16_t  line_size_max,
uint16_t  tabs 
) [static]

Construct a pretty textual hexadecimal representation of a raw array.

Parameters:
pointer Pointer to a raw array
size Size of the raw array.
line_size_max Maximun size of each printed line.
tabs Number of tabs before each line
Returns:
Textual hexadecimal representation of the raw array.

string openikev2::Printable::generateTabs ( uint16_t  num_tabs  )  [static]

Generate a string with the indicated number of tabs.

Parameters:
num_tabs Number of tabs to be generated
Returns:
The new string

string openikev2::Printable::toString (  )  const [virtual]

Construct a textual representation of the object.

This method is equal to toStringTab(0).

Returns:
Textual represetation of the object.

virtual string openikev2::Printable::toStringTab ( uint8_t  tabs  )  const [pure 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.

Implemented in openikev2::Attribute, openikev2::AttributeMap, openikev2::ByteArray, openikev2::Certificate, openikev2::CertificateController, openikev2::ChildSa, openikev2::Configuration, openikev2::ConfigurationAttribute, openikev2::GeneralConfiguration, openikev2::ID, openikev2::IkeConfiguration, openikev2::IpAddress, openikev2::IpsecConfiguration, openikev2::KeyRing, openikev2::Message, openikev2::Payload, openikev2::Payload_AUTH, openikev2::Payload_CERT, openikev2::Payload_CERT_REQ, openikev2::Payload_CONF, openikev2::Payload_DEL, openikev2::Payload_EAP, openikev2::Payload_ID, openikev2::Payload_KE, openikev2::Payload_NONCE, openikev2::Payload_NOTIFY, openikev2::Payload_SA, openikev2::Payload_SK, openikev2::Payload_TS, openikev2::Payload_VENDOR, openikev2::PeerConfiguration, openikev2::Proposal, openikev2::PskController, openikev2::TrafficSelector, openikev2::Transform, and openikev2::TransformAttribute.


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