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

PasswordSetCommandVisitor.h

Go to the documentation of this file.
00001 /*!
00002  * \file PasswordSetCommandVisitor.h
00003  * \brief Defines the visitor that add to every leaf of the password 
00004  *   composite a command
00005  *
00006  * \author Frederic RUAUDEL <grumz@users.sf.net>
00007  *
00008  * $Revision: 1.1.1.1 $
00009  * $Date: 2003/02/27 12:19:52 $
00010  *
00011  * \b GPassGuard
00012  * Copyleft (c) 2003 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_SET_COMMAND_VISITOR_H
00030 #define PASSWORD_SET_COMMAND_VISITOR_H
00031 
00032 #include <Passguard.h>
00033 #include <PassguardCommandAbstractFactory.h>
00034 #include <PasswordManagerGtkMenuElement.h>
00035 
00036 using namespace std;
00037 
00038 /*!
00039  * \brief Visitor of the password composite used to run through all 
00040  *              the tree and add to every password leaves a command
00041  **/
00042 class PasswordSetCommandVisitor : public PasswordTreeElementAbstractVisitor
00043 {
00044         public:
00045                 PasswordSetCommandVisitor (PassguardCommandAbstractFactory* factory, int nb_password_information);
00046                 virtual ~PasswordSetCommandVisitor ();
00047 
00048                 virtual int visitPasswordRootElement (PasswordRootElement* element);
00049                 virtual int visitPasswordGroupElement (PasswordGroupElement* element);
00050                 virtual int visitPasswordManagerElement (PasswordManagerElement* element);
00051 
00052                 bool isVisitSuccessfull (void);
00053                 
00054         protected:
00055                 bool _is_successfull;
00056                 string _last_function_in_error;
00057                 PassguardCommandAbstractFactory* _factory;
00058                 PasswordInfos* _current_password_infos;
00059                 int _password_nb_field;
00060 };
00061 
00062 #endif /* PASSWORD_SET_COMMAND_VISITOR_H */

Generated on Sun Mar 9 15:36:56 2003 for GPassGuard by doxygen1.2.15