DiscreteTimeStepper.hpp

Go to the documentation of this file.
00001 //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
00002 //
00003 //        This file is part of E-Cell Simulation Environment package
00004 //
00005 //                Copyright (C) 1996-2002 Keio University
00006 //
00007 //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
00008 //
00009 //
00010 // E-Cell is free software; you can redistribute it and/or
00011 // modify it under the terms of the GNU General Public
00012 // License as published by the Free Software Foundation; either
00013 // version 2 of the License, or (at your option) any later version.
00014 // 
00015 // E-Cell is distributed in the hope that it will be useful,
00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00018 // See the GNU General Public License for more details.
00019 // 
00020 // You should have received a copy of the GNU General Public
00021 // License along with E-Cell -- see the file COPYING.
00022 // If not, write to the Free Software Foundation, Inc.,
00023 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00024 // 
00025 //END_HEADER
00026 //
00027 // written by Koichi Takahashi <shafi@e-cell.org>,
00028 // E-Cell Project.
00029 //
00030 
00031 #ifndef __DISCRETETIMESTEPPER_HPP
00032 #define __DISCRETETIMESTEPPER_HPP
00033 
00034 #include "libecs.hpp"
00035 
00036 #include "Stepper.hpp"
00037 
00038 
00039 
00040 namespace libecs
00041 {
00042 
00043   /** @addtogroup stepper
00044    *@{
00045    */
00046 
00047   /** @file */
00048 
00049 
00050 
00051   /**
00052      DiscreteTimeStepper has a fixed step interval.
00053      
00054      This stepper ignores incoming interruptions, but dispatches 
00055      interruptions always when it steps.
00056 
00057      Process objects in this Stepper isn't allowed to use 
00058      Variable::addVelocity() method, but Variable::setValue() method only.
00059 
00060   */
00061 
00062   LIBECS_DM_CLASS( DiscreteTimeStepper, Stepper )
00063   {
00064 
00065   public:
00066 
00067     LIBECS_DM_OBJECT( DiscreteTimeStepper, Stepper )
00068       {
00069         INHERIT_PROPERTIES( Stepper );
00070       }
00071 
00072 
00073     DiscreteTimeStepper();
00074     virtual ~DiscreteTimeStepper() {}
00075 
00076 
00077     virtual void initialize();
00078 
00079     /**
00080        This method calls fire() method of all Processes.
00081     */
00082 
00083     virtual void step();
00084 
00085     /**
00086        Do nothing.   This Stepper ignores interruption.
00087     */
00088 
00089     virtual void interrupt( TimeParam )
00090     {
00091       ; // do nothing -- ignore interruption
00092     }
00093 
00094 
00095     /**
00096        TimeScale of this Stepper is always zero by default.
00097 
00098        This behavior may be changed in subclasses.
00099     */
00100 
00101     virtual GET_METHOD( Real, TimeScale )
00102     {
00103       return 0.0;
00104     }
00105 
00106   };
00107 
00108 
00109 
00110 } // namespace libecs
00111 
00112 #endif /* __DISCRETETIMESTEPPER_HPP */
00113 
00114 
00115 
00116 /*
00117   Do not modify
00118   $Author: shafi $
00119   $Revision: 2529 $
00120   $Date: 2005-11-19 10:36:40 +0100 (Sat, 19 Nov 2005) $
00121   $Locker$
00122 */

Generated on Fri Aug 31 18:32:07 2007 for E-CELL C++ libraries (libecs and libemc) 3.1.105 by  doxygen 1.5.3