19 #include <core/exception.h> 29 TOLUA_API
int tolua_fawkesblackboard_open (lua_State* tolua_S);
31 #include <blackboard/blackboard.h> 36 static void tolua_reg_types (lua_State* tolua_S)
38 tolua_usertype(tolua_S,
"fawkes::Interface");
39 tolua_usertype(tolua_S,
"fawkes::BlackBoard");
43 #ifndef TOLUA_DISABLE_tolua_fawkesblackboard_fawkes_BlackBoard_open_for_reading_generic00 44 static int tolua_fawkesblackboard_fawkes_BlackBoard_open_for_reading_generic00(lua_State* tolua_S)
47 tolua_Error tolua_err;
49 !tolua_isusertype(tolua_S,1,
"fawkes::BlackBoard",0,&tolua_err) ||
50 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
51 !tolua_isstring(tolua_S,3,0,&tolua_err) ||
52 !tolua_isnoobj(tolua_S,4,&tolua_err)
59 const char* interface_type = ((
const char*) tolua_tostring(tolua_S,2,0));
60 const char* identifier = ((
const char*) tolua_tostring(tolua_S,3,0));
62 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'open_for_reading'",NULL);
66 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Interface");
72 tolua_error(tolua_S,
"#ferror in function 'open_for_reading_generic'.",&tolua_err);
76 #endif //#ifndef TOLUA_DISABLE 79 #ifndef TOLUA_DISABLE_tolua_fawkesblackboard_fawkes_BlackBoard_open_for_writing_generic00 80 static int tolua_fawkesblackboard_fawkes_BlackBoard_open_for_writing_generic00(lua_State* tolua_S)
83 tolua_Error tolua_err;
85 !tolua_isusertype(tolua_S,1,
"fawkes::BlackBoard",0,&tolua_err) ||
86 !tolua_isstring(tolua_S,2,0,&tolua_err) ||
87 !tolua_isstring(tolua_S,3,0,&tolua_err) ||
88 !tolua_isnoobj(tolua_S,4,&tolua_err)
95 const char* interface_type = ((
const char*) tolua_tostring(tolua_S,2,0));
96 const char* identifier = ((
const char*) tolua_tostring(tolua_S,3,0));
98 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'open_for_writing'",NULL);
102 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::Interface");
106 #ifndef TOLUA_RELEASE 108 tolua_error(tolua_S,
"#ferror in function 'open_for_writing_generic'.",&tolua_err);
112 #endif //#ifndef TOLUA_DISABLE 115 #ifndef TOLUA_DISABLE_tolua_fawkesblackboard_fawkes_BlackBoard_close_generic00 116 static int tolua_fawkesblackboard_fawkes_BlackBoard_close_generic00(lua_State* tolua_S)
118 #ifndef TOLUA_RELEASE 119 tolua_Error tolua_err;
121 !tolua_isusertype(tolua_S,1,
"fawkes::BlackBoard",0,&tolua_err) ||
122 !tolua_isusertype(tolua_S,2,
"fawkes::Interface",0,&tolua_err) ||
123 !tolua_isnoobj(tolua_S,3,&tolua_err)
131 #ifndef TOLUA_RELEASE 132 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'close'",NULL);
135 self->close(interface);
139 #ifndef TOLUA_RELEASE 141 tolua_error(tolua_S,
"#ferror in function 'close_generic'.",&tolua_err);
145 #endif //#ifndef TOLUA_DISABLE 148 #ifndef TOLUA_DISABLE_tolua_fawkesblackboard_fawkes_BlackBoard_is_alive00 149 static int tolua_fawkesblackboard_fawkes_BlackBoard_is_alive00(lua_State* tolua_S)
151 #ifndef TOLUA_RELEASE 152 tolua_Error tolua_err;
154 !tolua_isusertype(tolua_S,1,
"const fawkes::BlackBoard",0,&tolua_err) ||
155 !tolua_isnoobj(tolua_S,2,&tolua_err)
162 #ifndef TOLUA_RELEASE 163 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'is_alive'",NULL);
166 bool tolua_ret = (bool) self->is_alive();
167 tolua_pushboolean(tolua_S,(
bool)tolua_ret);
171 #ifndef TOLUA_RELEASE 173 tolua_error(tolua_S,
"#ferror in function 'is_alive'.",&tolua_err);
177 #endif //#ifndef TOLUA_DISABLE 180 #ifndef TOLUA_DISABLE_tolua_fawkesblackboard_fawkes_BlackBoard_try_aliveness_restore00 181 static int tolua_fawkesblackboard_fawkes_BlackBoard_try_aliveness_restore00(lua_State* tolua_S)
183 #ifndef TOLUA_RELEASE 184 tolua_Error tolua_err;
186 !tolua_isusertype(tolua_S,1,
"fawkes::BlackBoard",0,&tolua_err) ||
187 !tolua_isnoobj(tolua_S,2,&tolua_err)
194 #ifndef TOLUA_RELEASE 195 if (!
self) tolua_error(tolua_S,
"invalid 'self' in function 'try_aliveness_restore'",NULL);
198 bool tolua_ret = (bool) self->try_aliveness_restore();
199 tolua_pushboolean(tolua_S,(
bool)tolua_ret);
203 #ifndef TOLUA_RELEASE 205 tolua_error(tolua_S,
"#ferror in function 'try_aliveness_restore'.",&tolua_err);
209 #endif //#ifndef TOLUA_DISABLE 212 TOLUA_API
int tolua_fawkesblackboard_open (lua_State* tolua_S)
215 tolua_reg_types(tolua_S);
216 tolua_module(tolua_S,NULL,0);
217 tolua_beginmodule(tolua_S,NULL);
218 tolua_module(tolua_S,
"fawkes",0);
219 tolua_beginmodule(tolua_S,
"fawkes");
220 tolua_cclass(tolua_S,
"BlackBoard",
"fawkes::BlackBoard",
"",NULL);
221 tolua_beginmodule(tolua_S,
"BlackBoard");
222 tolua_function(tolua_S,
"open_for_reading_generic",tolua_fawkesblackboard_fawkes_BlackBoard_open_for_reading_generic00);
223 tolua_function(tolua_S,
"open_for_writing_generic",tolua_fawkesblackboard_fawkes_BlackBoard_open_for_writing_generic00);
224 tolua_function(tolua_S,
"close_generic",tolua_fawkesblackboard_fawkes_BlackBoard_close_generic00);
225 tolua_function(tolua_S,
"is_alive",tolua_fawkesblackboard_fawkes_BlackBoard_is_alive00);
226 tolua_function(tolua_S,
"try_aliveness_restore",tolua_fawkesblackboard_fawkes_BlackBoard_try_aliveness_restore00);
227 tolua_endmodule(tolua_S);
230 int top = lua_gettop(tolua_S);
231 static unsigned char B[] = {
232 10,102,117,110, 99,116,105,111,110, 32,102, 97,119,107,101,
233 115, 46, 66,108, 97, 99,107, 66,111, 97,114,100, 58,111,112,
234 101,110, 95,102,111,114, 95,114,101, 97,100,105,110,103, 40,
235 105,110,116,101,114,102, 97, 99,101, 95,116,121,112,101, 44,
236 32,105,100,101,110,116,105,102,105,101,114, 41, 10,114,101,
237 113,117,105,114,101, 40, 34,105,110,116,101,114,102, 97, 99,
238 101,115, 46, 34, 46, 46,105,110,116,101,114,102, 97, 99,101,
239 95,116,121,112,101, 41, 10,108,111, 99, 97,108, 32,105,110,
240 116,101,114,102, 97, 99,101, 32, 61, 32,115,101,108,102, 58,
241 111,112,101,110, 95,102,111,114, 95,114,101, 97,100,105,110,
242 103, 95,103,101,110,101,114,105, 99, 40,105,110,116,101,114,
243 102, 97, 99,101, 95,116,121,112,101, 44, 32,105,100,101,110,
244 116,105,102,105,101,114, 41, 10,114,101,116,117,114,110, 32,
245 116,111,108,117, 97, 46, 99, 97,115,116, 40,105,110,116,101,
246 114,102, 97, 99,101, 44, 32, 34,102, 97,119,107,101,115, 58,
247 58, 34, 32, 46, 46, 32,105,110,116,101,114,102, 97, 99,101,
248 58,116,121,112,101, 40, 41, 41, 10,101,110,100, 10,102,117,
249 110, 99,116,105,111,110, 32,102, 97,119,107,101,115, 46, 66,
250 108, 97, 99,107, 66,111, 97,114,100, 58,111,112,101,110, 95,
251 102,111,114, 95,119,114,105,116,105,110,103, 40,105,110,116,
252 101,114,102, 97, 99,101, 95,116,121,112,101, 44, 32,105,100,
253 101,110,116,105,102,105,101,114, 41, 10,114,101,113,117,105,
254 114,101, 40, 34,105,110,116,101,114,102, 97, 99,101,115, 46,
255 34, 46, 46,105,110,116,101,114,102, 97, 99,101, 95,116,121,
256 112,101, 41, 10,108,111, 99, 97,108, 32,105,110,116,101,114,
257 102, 97, 99,101, 32, 61, 32,115,101,108,102, 58,111,112,101,
258 110, 95,102,111,114, 95,119,114,105,116,105,110,103, 95,103,
259 101,110,101,114,105, 99, 40,105,110,116,101,114,102, 97, 99,
260 101, 95,116,121,112,101, 44, 32,105,100,101,110,116,105,102,
261 105,101,114, 41, 10,114,101,116,117,114,110, 32,116,111,108,
262 117, 97, 46, 99, 97,115,116, 40,105,110,116,101,114,102, 97,
263 99,101, 44, 32, 34,102, 97,119,107,101,115, 58, 58, 34, 32,
264 46, 46, 32,105,110,116,101,114,102, 97, 99,101, 58,116,121,
265 112,101, 40, 41, 41, 10,101,110,100, 10,102,117,110, 99,116,
266 105,111,110, 32,102, 97,119,107,101,115, 46, 66,108, 97, 99,
267 107, 66,111, 97,114,100, 58, 99,108,111,115,101, 40,105,110,
268 116,101,114,102, 97, 99,101, 41, 10,108,111, 99, 97,108, 32,
269 103,101,110, 95,105,110,116,101,114,102, 97, 99,101, 32, 61,
270 32,116,111,108,117, 97, 46, 99, 97,115,116, 40,105,110,116,
271 101,114,102, 97, 99,101, 44, 32, 34,102, 97,119,107,101,115,
272 58, 58, 73,110,116,101,114,102, 97, 99,101, 34, 41, 10,115,
273 101,108,102, 58, 99,108,111,115,101, 95,103,101,110,101,114,
274 105, 99, 40,103,101,110, 95,105,110,116,101,114,102, 97, 99,
275 101, 41, 10,101,110,100, 32,32
277 tolua_dobuffer(tolua_S,(
char*)B,
sizeof(B),
"tolua: embedded Lua code 1");
278 lua_settop(tolua_S, top);
281 tolua_endmodule(tolua_S);
282 tolua_endmodule(tolua_S);
288 #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501 289 TOLUA_API
int luaopen_fawkesblackboard (lua_State* tolua_S) {
290 return tolua_fawkesblackboard_open(tolua_S);
Base class for all Fawkes BlackBoard interfaces.
The BlackBoard abstract class.