Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

mod.H

Go to the documentation of this file.
00001 #ifndef MOD_H_IS_INCLUDED
00002 #define MOD_H_IS_INCLUDED
00003 
00004 /*****************************************************************
00005  *  MOD:
00006  *
00007  *      A sequence number to determine if data in a
00008  *      dependency graph is up-to-date.
00009  *
00010  *****************************************************************/
00011 #define CMOD const MOD
00012 class MOD {
00013    static int   _TICK;
00014    static int   _START;
00015    int          _id;
00016 
00017  public:
00018    MOD()                                { _id = _TICK; }
00019    MOD(CMOD &id)                        { _id = id._id; }
00020 
00021    static void tick()                   { _START = ++_TICK; }
00022    bool   current()             const   { return _id >= _START; }
00023    int    val()                 const   { return _id; }
00024    MOD&   operator ++()                 { _id = ++_TICK; return *this; }
00025    int    operator ==(CMOD &id) const   { return _id == id._id; }
00026 };
00027 
00028 #endif // MOD_H_IS_INCLUDED
00029 
00030 // end of file mod.H

Generated on Mon Sep 18 11:39:32 2006 for jot by  doxygen 1.4.4