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

PasswordFinderVisitor Class Reference

Visitor of the password composite used to find a password that match with the PasswordInfos given in arguments. More...

#include <PasswordFinderVisitor.h>

Inheritance diagram for PasswordFinderVisitor:

PasswordTreeElementAbstractVisitor PassguardErrorManager PasswordTreeAddElementVisitor PasswordTreeDelElementVisitor List of all members.

Public Methods

 PasswordFinderVisitor ()
 Constructor of the visitor for the password composite. More...

virtual ~PasswordFinderVisitor ()
 Destructor of the visitor for the password composite. More...

virtual int visitPasswordRootElement (PasswordRootElement *element)
 Go directly to the childs. More...

virtual int visitPasswordGroupElement (PasswordGroupElement *element)
 Checks if the branch's name is equal with the corresponding entry in the password infos structure. More...

virtual int visitPasswordManagerElement (PasswordManagerElement *element)
 Checks if the leaf's password informations correspond with the one researched. More...

list< string > getSublevelPossibilities (void)
 Returns the list of all the possibilities for the next level, if the password informations are incompletely filled. More...

int getSublevelNumber (void) const
 Informs of which level the sublevel possibilities corresponds. More...

PasswordInfos getPasswordInfos (void) const
 Informs of the password infos of the visitor. More...

virtual void setPasswordInfos (PasswordInfos password_infos)
 Defines the password infos of the visitor and reset the visit. More...

bool isPasswordInfosFound (void) const
 Informs if the password infos was found in the tree. More...


Protected Attributes

PasswordInfos _password_infos
list< string > _sublevel_possibilities
int _current_deepness
bool _found_password

Detailed Description

Visitor of the password composite used to find a password that match with the PasswordInfos given in arguments.


Constructor & Destructor Documentation

PasswordFinderVisitor::PasswordFinderVisitor  
 

Constructor of the visitor for the password composite.

Returns:
none

PasswordFinderVisitor::~PasswordFinderVisitor   [virtual]
 

Destructor of the visitor for the password composite.

Returns:
none


Member Function Documentation

PasswordInfos PasswordFinderVisitor::getPasswordInfos void    const
 

Informs of the password infos of the visitor.

Returns:
the password infos of the visitor / 0 if not found

int PasswordFinderVisitor::getSublevelNumber void    const
 

Informs of which level the sublevel possibilities corresponds.

Returns:
the level where search failed

list< string > PasswordFinderVisitor::getSublevelPossibilities void   
 

Returns the list of all the possibilities for the next level, if the password informations are incompletely filled.

Returns:
the list of possibilities

bool PasswordFinderVisitor::isPasswordInfosFound void    const
 

Informs if the password infos was found in the tree.

Returns:
true if found, false otherwise

void PasswordFinderVisitor::setPasswordInfos PasswordInfos    password_infos [virtual]
 

Defines the password infos of the visitor and reset the visit.

Parameters:
password_infos  the password infos of the visitor
Returns:
none

Reimplemented in PasswordTreeAddElementVisitor, and PasswordTreeDelElementVisitor.

int PasswordFinderVisitor::visitPasswordGroupElement PasswordGroupElement   element [virtual]
 

Checks if the branch's name is equal with the corresponding entry in the password infos structure.

Parameters:
element  the branch to manipulate
Return values:
-1  switch to next branch of the current level if names are different
1  if names are equals to continue through this branch
0  stop running through if password can't be found

Implements PasswordTreeElementAbstractVisitor.

Reimplemented in PasswordTreeAddElementVisitor, and PasswordTreeDelElementVisitor.

int PasswordFinderVisitor::visitPasswordManagerElement PasswordManagerElement   element [virtual]
 

Checks if the leaf's password informations correspond with the one researched.

If ok, fill the password infos structure with the password and description in order they can be retreived with the getPasswordInfos() function.

Parameters:
element  the leaf to manipulate
Return values:
-1  switch to next branch of the current level if password not found
0  stop running through if password found

Implements PasswordTreeElementAbstractVisitor.

Reimplemented in PasswordTreeAddElementVisitor, and PasswordTreeDelElementVisitor.

int PasswordFinderVisitor::visitPasswordRootElement PasswordRootElement   element [virtual]
 

Go directly to the childs.

Parameters:
element  root to manipulate
Returns:
always 1

Implements PasswordTreeElementAbstractVisitor.

Reimplemented in PasswordTreeAddElementVisitor, and PasswordTreeDelElementVisitor.


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