1 /* 2 * core/WorldDriver.h 3 * avida-core 4 * 5 * Created by David on 12/10/05. 6 * Copyright 2005-2011 Michigan State University. All rights reserved. 7 * http://avida.devosoft.org/ 8 * 9 * 10 * This file is part of Avida. 11 * 12 * Avida is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License 13 * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 14 * 15 * Avida is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU Lesser General Public License along with Avida. 19 * If not, see <http://www.gnu.org/licenses/>. 20 * 21 * Authors: David M. Bryson <david@programerror.com> 22 * 23 */ 24 25 #ifndef AvidaCoreWorldDriver_h 26 #define AvidaCoreWorldDriver_h 27 28 #include "apto/platform.h" 29 #include "avida/core/GlobalObject.h" 30 31 class cString; 32 33 34 namespace Avida { 35 36 // WorldDriver - protocol defining the interface for objects that drive world execution 37 // -------------------------------------------------------------------------------------------------------------- 38 39 class WorldDriver : public virtual GlobalObject 40 { 41 public: ~WorldDriver()42 LIB_EXPORT virtual ~WorldDriver() { ; } 43 44 // Driver Actions 45 LIB_EXPORT virtual void SignalBreakpoint() = 0; 46 LIB_EXPORT virtual void SetDone() = 0; 47 LIB_EXPORT virtual void SetPause() = 0; 48 49 50 // Legacy Methods 51 // -------------------------------------------------------------------------------------------------------------- 52 53 LIB_LOCAL virtual void RaiseException(const cString& in_string) = 0; 54 LIB_LOCAL virtual void RaiseFatalException(int exit_code, const cString& in_string) = 0; 55 56 LIB_LOCAL virtual void NotifyComment(const cString& in_string) = 0; 57 LIB_LOCAL virtual void NotifyWarning(const cString& in_string) = 0; 58 IsInteractive()59 LIB_LOCAL virtual bool IsInteractive() { return false; } 60 61 62 // Fast-forward through epochs when no replication is happening -- @JEB 63 // These are only implemented in the DefaultWorldDriver ClearFastForward()64 LIB_LOCAL virtual void ClearFastForward() { } GetFastForward()65 LIB_LOCAL virtual bool GetFastForward() { return false; } 66 }; 67 }; 68 69 #endif 70