00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef __LIBEMC_HPP
00033 #define __LIBEMC_HPP
00034
00035 #include <functional>
00036
00037 #include "ecell/libecs/libecs.hpp"
00038
00039 namespace libemc
00040 {
00041
00042
00043
00044
00045
00046
00047
00048
00049 DECLARE_CLASS( EventChecker );
00050 DECLARE_CLASS( EventHandler );
00051
00052 DECLARE_CLASS( Simulator );
00053 DECLARE_CLASS( SimulatorImplementation );
00054
00055
00056
00057 DECLARE_SHAREDPTR( EventChecker );
00058 DECLARE_SHAREDPTR( EventHandler );
00059
00060 class EventHandler
00061 :
00062 public std::unary_function<void,void>
00063 {
00064 public:
00065 EventHandler() {}
00066 virtual ~EventHandler() {}
00067
00068 virtual void operator()( void ) const = 0;
00069 };
00070
00071 class EventChecker
00072 :
00073 public std::unary_function<bool,void>
00074 {
00075 public:
00076 EventChecker() {}
00077 virtual ~EventChecker() {}
00078
00079 virtual bool operator()( void ) const = 0;
00080 };
00081
00082 class DefaultEventChecker
00083 :
00084 public EventChecker
00085 {
00086 public:
00087 DefaultEventChecker() {}
00088
00089
00090 virtual bool operator()( void ) const
00091 {
00092 return false;
00093 }
00094 };
00095
00096
00097
00098
00099
00100
00101 }
00102
00103 #endif