// action.cpp -- the base class for 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: action.cpp,v 1.5 2002/07/14 23:05:45 fredb Exp $ #include "action.hpp" long FGSD_ActionID::_currentId = 0; FGSD_MainWindow *FGSD_Action::_mainWindow = 0; void (*FGSD_Action::_step)( size_t, void * ) = 0; bool FGSD_Action::combine( FGSD_Action *__action ) { return false; } size_t FGSD_Action::weight( SGPropertyNode *__node ) { return 1; } double FGSD_Action::timeoutForCombine() const { return 500000.0; } void FGSD_Action::step( size_t n ) const { _step( n, _mainWindow ); } bool FGSD_Action::getPosition( bool undo, double &lon, double &lat ) const { return false; } bool FGSD_Action::savable() const { return true; } FGSD_ActionID::FGSD_ActionID() { _currentId += 1; _id = _currentId; } bool FGSD_ActionID::operator==( const FGSD_ActionID &right ) const { return _id == right._id; }