openikev2::AttributeMap Class Reference

This class represents an attribute map that allows to extend dynamically the number of attributes of a class (integers, strings, booleans. More...

#include <attributemap.h>

Inheritance diagram for openikev2::AttributeMap:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 AttributeMap ()
 Creates a new empty attribute map.
virtual bool addAttribute (string key, auto_ptr< Attribute > attribute)
 Adds an attribute to the AttributeMap.
virtual AttributegetAttribute (string key)
 Gets an Attribute by its name.
virtual void deleteAttribute (string key)
 Deletes the Attribute with the indicated name.
virtual auto_ptr< AttributeMapclone () const
 Creates a new AttributeMap exactly equals to this one, with the same attributes inside.
virtual string toStringTab (uint8_t tabs) const
 Construct a textual representation of the object, preceded of a num of tabs of size TAB_SIZE.

Protected Attributes

map< string, Attribute * > attribute_map
 Attribute map.

Detailed Description

This class represents an attribute map that allows to extend dynamically the number of attributes of a class (integers, strings, booleans.

..)

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


Member Function Documentation

bool openikev2::AttributeMap::addAttribute ( string  key,
auto_ptr< Attribute attribute 
) [virtual]

Adds an attribute to the AttributeMap.

Parameters:
key Name of the attribute to be added
attribute Attribute to be added
Returns:
TRUE if attribute was added. FALSE if already exists an attribute with the same name

Attribute * openikev2::AttributeMap::getAttribute ( string  key  )  [virtual]

Gets an Attribute by its name.

Parameters:
key Name of the attribute to be obtained
Returns:
The attribute with such name. NULL if the attribute was not found

void openikev2::AttributeMap::deleteAttribute ( string  key  )  [virtual]

Deletes the Attribute with the indicated name.

Parameters:
key Attribute name

auto_ptr< AttributeMap > openikev2::AttributeMap::clone (  )  const [virtual]

Creates a new AttributeMap exactly equals to this one, with the same attributes inside.

Returns:
The new AttributeMap created

string openikev2::AttributeMap::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:49 2007 for libopenikev2 by  doxygen 1.5.1