TAPs 0.7.7.3
TAPsSimClock.hpp
Go to the documentation of this file.
00001 /******************************************************************************
00002 TAPsSimClock.hpp
00003 ******************************************************************************/
00007 /******************************************************************************
00008 SUKITTI PUNAK   (07/10/2005)
00009 UPDATE          (09/16/2010)
00010 ******************************************************************************/
00011 #ifndef TAPs_SIM_CLOCK_HPP
00012 #define TAPs_SIM_CLOCK_HPP
00013 
00014 #include "../Core/TAPsLib.hpp"
00015 
00016 BEGIN_NAMESPACE_TAPs__Simulation
00017 //=============================================================================
00018 template <typename T>
00019 class SimClock
00020 {
00021 //-----------------------------------------------------------------------------
00022 // Member Functions
00023 public:
00024 
00026     SimClock ();
00027     
00029     SimClock ( T _start, T _end, T _current, T _step );
00030 
00032     void AdvanceTime ();
00033 
00035     void AdvanceTime ( T dt ); 
00036 
00038     void Restart () { Current = 0; }
00039 
00041     bool IsStop ()  { return Current >= End; }
00042 
00043 //-----------------------------------------------------------------------------
00044 // Data Members
00045 public:
00046     T Start;        
00047     T End;          
00048     T Current;      
00049     T Step;         
00050 };
00051 //-----------------------------------------------------------------------------
00052 //=============================================================================
00053 END_NAMESPACE_TAPs__Simulation
00054 //-----------------------------------------------------------------------------
00055 // Include definition if TAPs_USE_EXPORT is not defined
00056 //#if !defined( TAPs_USE_EXPORT )
00057     #include "TAPsSimClock.cpp"
00058 //#endif
00059 //-----------------------------------------------------------------------------
00060 #endif
00061 //34567890123456789012345678901234567890123456789012345678901234567890123456789
00062 //--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines