// tileact.hpp -- tile actions // // Written by Frederic Bouvier, started May 2002. // // Copyright (C) 2002 Frederic Bouvier - fredb@users.sourceforge.net // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as // published by the Free Software Foundation; either version 2 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // // $Id: tileact.hpp,v 1.3 2002/06/01 20:56:20 fredb Exp $ #ifndef _tileact_hpp_ #define _tileact_hpp_ #include #include "action.hpp" class FGSD_AddRemoveTileAction : public FGSD_Action { public: typedef std::vector NameList; FGSD_AddRemoveTileAction( bool __add ); FGSD_AddRemoveTileAction( bool __add, const char *__name ); bool undo(); bool redo( bool __step = false ); std::string name() const; std::string description() const; bool combine( FGSD_Action *__action ); FGSD_ActionID type() const; void *convertTo( FGSD_ActionID __id ); FGSD_Action *clone() const; bool save( const char *__project, SGPropertyNode *__node ); bool load( const char *__project, SGPropertyNode *__node ); size_t weight( SGPropertyNode *__node ); static FGSD_ActionID _id; private: bool _add; NameList _nameList; }; #endif