00001 /* 00002 FALCON - Falcon advanced simple text evaluator. 00003 FILE: VMEvent.h 00004 00005 Special exception to communicate relevant events. 00006 ------------------------------------------------------------------- 00007 Author: Giancarlo Niccolai 00008 Begin: Wed, 08 Jul 2009 14:18:55 +0200 00009 00010 ------------------------------------------------------------------- 00011 (C) Copyright 2004: the FALCON developers (see list in AUTHORS file) 00012 00013 See LICENSE file for licensing details. 00014 */ 00015 00016 00017 #ifndef FALCON_VMEVENT_H 00018 #define FALCON_VMEVENT_H 00019 00020 #include <falcon/setup.h> 00021 #include <falcon/basealloc.h> 00022 00023 namespace Falcon 00024 { 00025 00039 class VMEvent: public BaseAlloc 00040 { 00041 00042 public: 00043 typedef enum { 00044 evQuit, 00045 evReturn, 00046 evOpLimit, 00047 evMemLimit, 00048 evDepthLimit 00049 } tEvent; 00050 00051 VMEvent( tEvent t ): 00052 m_type( t ) 00053 {} 00054 00055 VMEvent( const VMEvent& other ): 00056 m_type( other.m_type ) 00057 {} 00058 00059 ~VMEvent() {} 00060 00061 tEvent type() const { return m_type; } 00062 00063 private: 00064 tEvent m_type; 00065 }; 00066 00067 00068 class VMEventQuit: public VMEvent 00069 { 00070 public: 00071 VMEventQuit(): VMEvent( evQuit ) 00072 {} 00073 }; 00074 00075 class VMEventReturn: public VMEvent 00076 { 00077 public: 00078 VMEventReturn(): VMEvent( evReturn ) 00079 {} 00080 }; 00081 00082 } 00083 00084 #endif 00085 00086 /* end of vmevent.h */