sourcehook/test/testbail.h
author Pavol Marko <pavolmarko@gmail.com>
Sun Oct 14 11:59:13 2007 +0000 (2007-10-14)
changeset 418 109309ff6350
parent 294 0d87bc8606f8
permissions -rw-r--r--
Removed "trust the prototype" model which could lead to problems. Instead, every CVfnPtr now has a list of hook managers.
-> Removed CHookManagerContainer
Also removed listcat (unnecessary since "V2" interface)
     1 //////////////////////////////////////////////////////////////////////////
     2 // Shared data for testbail
     3 
     4 #include <string>
     5 #include "testevents.h"
     6 
     7 namespace N_TestBail
     8 {
     9 	extern StateList g_States;
    10 	extern SourceHook::ISourceHook *g_SHPtr;
    11 	
    12 	MAKE_STATE_1(State_EatYams_Called, int);
    13 	MAKE_STATE_1(State_EatYams_Handler1_Called, int);
    14 	MAKE_STATE_1(State_EatYams_Handler2_Called, int);
    15 	MAKE_STATE_1(State_EatYams_Handler3_Called, int);
    16 	MAKE_STATE_1(State_EatYams_Return, int);
    17 
    18 	class IGaben
    19 	{
    20 	public:
    21 		virtual int EatYams(int a)
    22 		{
    23 			ADD_STATE(State_EatYams_Called(a));
    24 			return 5;
    25 		}
    26 	};
    27 
    28 	extern IGaben *g_Gabgab;
    29 
    30 	bool TestBail2(std::string &error);
    31 }
    32 
    33 using namespace N_TestBail;
    34 
    35 namespace
    36 {
    37 	SourceHook::Plugin g_PLID;
    38 	SH_DECL_HOOK1(IGaben, EatYams, SH_NOATTRIB, 0, int, int);
    39 }