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

PasswordTreeAddElementVisitor.h

Go to the documentation of this file.
00001 /*!
00002  * \file PasswordTreeAddElementVisitor.h
00003  * \brief Defines the visitor used to create the password composite from the 
00004  * password infos
00005  *
00006  * \author Frederic RUAUDEL <grumz@users.sf.net>
00007  *
00008  * $Revision: 1.4 $
00009  * $Date: 2003/02/20 17:19:07 $
00010  *
00011  * \b PassGuardFramework
00012  * Copyleft (c) 2002 Frederic RUAUDEL, all rights reversed
00013  *
00014  * This program is free software which I release under the GNU General Public
00015  * License. You may redistribute and/or modify this program under the terms
00016  * of that license as published by the Free Software Foundation; either
00017  * version 2 of the License, or (at your option) any later version.
00018  *
00019  * This program is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  * GNU General Public License for more details.  Version 2 is in the
00023  * COPYING file in the top level directory of this distribution.
00024  *
00025  * To get a copy of the GNU General Public License, write to the Free Software
00026  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027  **/
00028 
00029 #ifndef PASSWORD_TREE_ADD_ELEMENT_VISITOR_H
00030 #define PASSWORD_TREE_ADD_ELEMENT_VISITOR_H
00031 
00032 #include <stdio.h>
00033 
00034 #include <PasswordInfos.h>
00035 #include <PasswordTreeElement.h>
00036 #include <PasswordRootElement.h>
00037 #include <PasswordGroupElement.h>
00038 #include <PasswordManagerElement.h>
00039 #include <PasswordFinderVisitor.h>
00040 #include <PasswordTreeElementFactory.h>
00041 
00042 using namespace std;
00043 
00044 /*!
00045  * \brief The visitor used to create the password composite from the password infos
00046  **/
00047 class PasswordTreeAddElementVisitor : public PasswordFinderVisitor
00048 {
00049         public:
00050                 PasswordTreeAddElementVisitor (PasswordTreeElementFactory* factory);
00051                 virtual ~PasswordTreeAddElementVisitor ();
00052 
00053                 virtual int visitPasswordRootElement (PasswordRootElement* element);
00054                 virtual int visitPasswordGroupElement (PasswordGroupElement* element);
00055                 virtual int visitPasswordManagerElement (PasswordManagerElement* element);
00056 
00057                 virtual void setPasswordInfos (PasswordInfos password_infos);
00058 
00059                 bool isPasswordInfosAdded (void);
00060 
00061         private:
00062                 bool insert_branch (void);
00063 
00064         private:
00065                 PasswordTreeElementFactory* _factory;
00066                 PasswordGroupElement* _father_group;
00067                 int _father_group_nb_childs;
00068                 bool _is_password_infos_inserted;
00069                 string _last_function_in_error;
00070 };
00071 
00072 #endif /* PASSWORD_TREE_ADD_ELEMENT_VISITOR_H */

Generated on Sun Mar 9 15:36:50 2003 for PassGuardFramework by doxygen1.2.15