SourceForge Logo
Main Page   Class Hierarchy   Compound List   File List   Compound Members  

PasswordTreeElement Class Reference

Main element of the password composite. More...

#include <PasswordTreeElement.h>

Inheritance diagram for PasswordTreeElement:

PassguardErrorManager PasswordGroupElement PasswordManagerElement PasswordRootElement List of all members.

Public Methods

virtual ~PasswordTreeElement ()
 Destructor of the PasswordTreeElement class. More...

bool isSavable (void) const
 Informs if the composite's element can be saved. More...

virtual void setSavable (bool savable)
 Defines if the composite's element can be saved. More...

string getName (void) const
 Informs of the name of the composite's element. More...

void setName (string name)
 Defines the name of the composite's element. More...

int getDeepness (void) const
 Informs of the level of the element in the composite's structure. More...

void setDeepness (int deepness)
 Defines of the level in the composite's structure. More...

virtual bool addElement (PasswordTreeElement *element)
 Add a child to the element of the composite. More...

virtual bool delElement (PasswordTreeElement *element)
 Delete a child of the composite's element. More...

virtual int getNbChild (void)
 Returns the number of child that the element have. More...

virtual bool allow (PasswordTreeElementAbstractVisitor &visitor)=0
 Defines the visitor interface to deal with data processing accross the composite. More...


Protected Methods

 PasswordTreeElement (string name, int deepness)
 Constructor of the PasswordTreeElement class. More...


Protected Attributes

string _name
int _deepness
bool _savable

Detailed Description

Main element of the password composite.


Constructor & Destructor Documentation

PasswordTreeElement::~PasswordTreeElement void    [virtual]
 

Destructor of the PasswordTreeElement class.

Nothing is done by default, but must be overloaded by subclasses if necessary.

Returns:
none

PasswordTreeElement::PasswordTreeElement string    name,
int    deepness
[protected]
 

Constructor of the PasswordTreeElement class.

Parameters:
name  name associated with the composite's element
deepness  deepness in the tree of the composite (Root = 0)
Returns:
none


Member Function Documentation

bool PasswordTreeElement::addElement PasswordTreeElement *    element [virtual]
 

Add a child to the element of the composite.

Parameters:
element  the element to add
Returns:
true if the element has been added successfully / false otherwise.
Note:
By default, the behaviour is the one of leaves, so they can't add a child.

Reimplemented in PasswordGroupElement.

bool PasswordTreeElement::allow PasswordTreeElementAbstractVisitor   visitor [pure virtual]
 

Defines the visitor interface to deal with data processing accross the composite.

Parameters:
visitor  the visitor class that will make the wanted data processing
Return values:
false  data can't be processed in this branch so switch to next one of the current level
true  data have been processed so stop running through the composite

Implemented in PasswordGroupElement, PasswordManagerElement, and PasswordRootElement.

bool PasswordTreeElement::delElement PasswordTreeElement *    element [virtual]
 

Delete a child of the composite's element.

Parameters:
element  the element to delete
Returns:
true if the element has been deleted successfully / false otherwise.
Note:
By default, the behaviour is the one of leaves, so they can't delete a child as they doesn't have any.

Reimplemented in PasswordGroupElement.

int PasswordTreeElement::getDeepness void    const
 

Informs of the level of the element in the composite's structure.

Returns:
the level of the element in the composite's structure
Note:
Root's deepness of the composite is 0;

string PasswordTreeElement::getName void    const
 

Informs of the name of the composite's element.

Returns:
the name of the composite's element

int PasswordTreeElement::getNbChild void    [virtual]
 

Returns the number of child that the element have.

Returns:
the number of childs
Note:
By default, the behaviour is the one of leaves, so they never have any child.

Reimplemented in PasswordGroupElement.

bool PasswordTreeElement::isSavable void    const
 

Informs if the composite's element can be saved.

Typically, branches must always answer false here and leaves must answer true only if there are real password entries and not special command leaves.

Returns:
true if it can be saved / false otherwise.

void PasswordTreeElement::setDeepness int    deepness
 

Defines of the level in the composite's structure.

Parameters:
deepness  the level of the element in the composite's structure
Returns:
none

void PasswordTreeElement::setName string    name
 

Defines the name of the composite's element.

Parameters:
name  Name of the composite's element
Returns:
none

void PasswordTreeElement::setSavable bool    savable [virtual]
 

Defines if the composite's element can be saved.

Parameters:
savable  true if it can be saved / false otherwise.
Returns:
none

Reimplemented in PasswordManagerElement.


The documentation for this class was generated from the following files:
Generated on Sun Mar 9 15:36:52 2003 for PassGuardFramework by doxygen1.2.15