GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
gmSimulationDataCancelCheck.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4** All rights reserved.
5**
6** This file is part of the "GeMA" software. It's use should respect
7** the terms in the license agreement that can be found together
8** with this source code.
9** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11** A PARTICULAR PURPOSE.
12**
13************************************************************************/
14
24#ifndef _GEMA_SIMULATION_DATA_CANCEL_CHECK_H_
25#define _GEMA_SIMULATION_DATA_CANCEL_CHECK_H_
26
27#include "gmSimulationData.h"
28#include <luaEnv.h>
29
37#define GmSimulationDataCheckForCancelation(simData, msg) \
38do \
39{ \
40 if((simData)->cancelRequested()) \
41 { \
42 assert(GmThreadManager::inMainThread()); \
43 luaL_error((simData)->threadManager()->threadLuaEnv(0)->state(), "%s", luaPrintable(msg)); \
44 } \
45} while(0)
46
47
48#endif
49
Declaration of the GmSimulationData class.