19#include <core/exception.h>
29TOLUA_API
int tolua_fawkesnavgraph_open (lua_State* tolua_S);
31#include <navgraph/navgraph.h>
32#include <navgraph/yaml_navgraph.h>
38#include <navgraph/navgraph_node.h>
46static int tolua_collect_vector_fawkes__NavGraphNode_ (lua_State* tolua_S)
48 vector<fawkes::NavGraphNode>* self = (vector<fawkes::NavGraphNode>*) tolua_tousertype(tolua_S,1,0);
53static int tolua_collect_fawkes__NavGraphNode (lua_State* tolua_S)
60static int tolua_collect_vector_string_ (lua_State* tolua_S)
62 vector<string>* self = (vector<string>*) tolua_tousertype(tolua_S,1,0);
67static int tolua_collect_fawkes__NavGraph (lua_State* tolua_S)
77static void tolua_reg_types (lua_State* tolua_S)
79 tolua_usertype(tolua_S,
"vector<fawkes::NavGraphNode>");
80 tolua_usertype(tolua_S,
"fawkes::NavGraphNode");
81 tolua_usertype(tolua_S,
"vector<string>");
82 tolua_usertype(tolua_S,
"fawkes::NavGraph");
86#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_new00
87static int tolua_fawkesnavgraph_fawkes_NavGraph_new00(lua_State* tolua_S)
90 tolua_Error tolua_err;
92 !tolua_isusertable(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
93 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
94 !tolua_isnoobj(tolua_S,3,&tolua_err)
100 string graph_name = ((string) tolua_tocppstring(tolua_S,2,0));
101 bool exc_caught =
false;
105 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::NavGraph");
111 catch (std::exception &e) {
113 lua_pushstring(tolua_S, e.what());
115 if (exc_caught) lua_error(tolua_S);
121 tolua_error(tolua_S,
"#ferror in function 'new'.",&tolua_err);
128#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_new00_local
129static int tolua_fawkesnavgraph_fawkes_NavGraph_new00_local(lua_State* tolua_S)
132 tolua_Error tolua_err;
134 !tolua_isusertable(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
135 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
136 !tolua_isnoobj(tolua_S,3,&tolua_err)
142 string graph_name = ((string) tolua_tocppstring(tolua_S,2,0));
143 bool exc_caught =
false;
147 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::NavGraph");
148 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
154 catch (std::exception &e) {
156 lua_pushstring(tolua_S, e.what());
158 if (exc_caught) lua_error(tolua_S);
164 tolua_error(tolua_S,
"#ferror in function 'new'.",&tolua_err);
171#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_delete00
172static int tolua_fawkesnavgraph_fawkes_NavGraph_delete00(lua_State* tolua_S)
175 tolua_Error tolua_err;
177 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
178 !tolua_isnoobj(tolua_S,2,&tolua_err)
186 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'delete'", NULL);
188 bool exc_caught =
false;
195 catch (std::exception &e) {
197 lua_pushstring(tolua_S, e.what());
199 if (exc_caught) lua_error(tolua_S);
205 tolua_error(tolua_S,
"#ferror in function 'delete'.",&tolua_err);
212#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_name00
213static int tolua_fawkesnavgraph_fawkes_NavGraph_name00(lua_State* tolua_S)
216 tolua_Error tolua_err;
218 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
219 !tolua_isnoobj(tolua_S,2,&tolua_err)
227 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'name'", NULL);
229 bool exc_caught =
false;
232 string tolua_ret = (string) self->
name();
233 tolua_pushcppstring(tolua_S,(
const char*)tolua_ret);
239 catch (std::exception &e) {
241 lua_pushstring(tolua_S, e.what());
243 if (exc_caught) lua_error(tolua_S);
249 tolua_error(tolua_S,
"#ferror in function 'name'.",&tolua_err);
256#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_nodes00
257static int tolua_fawkesnavgraph_fawkes_NavGraph_nodes00(lua_State* tolua_S)
260 tolua_Error tolua_err;
262 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
263 !tolua_isnoobj(tolua_S,2,&tolua_err)
271 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'nodes'", NULL);
273 bool exc_caught =
false;
276 vector<fawkes::NavGraphNode> tolua_ret = (vector<fawkes::NavGraphNode>) self->
nodes();
279 void* tolua_obj = Mtolua_new((vector<fawkes::NavGraphNode>)(tolua_ret));
280 tolua_pushusertype(tolua_S,tolua_obj,
"vector<fawkes::NavGraphNode>");
281 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
283 void* tolua_obj = tolua_copy(tolua_S,(
void*)&tolua_ret,
sizeof(vector<fawkes::NavGraphNode>));
284 tolua_pushusertype(tolua_S,tolua_obj,
"vector<fawkes::NavGraphNode>");
285 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
293 catch (std::exception &e) {
295 lua_pushstring(tolua_S, e.what());
297 if (exc_caught) lua_error(tolua_S);
303 tolua_error(tolua_S,
"#ferror in function 'nodes'.",&tolua_err);
310#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_node00
311static int tolua_fawkesnavgraph_fawkes_NavGraph_node00(lua_State* tolua_S)
314 tolua_Error tolua_err;
316 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
317 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
318 !tolua_isnoobj(tolua_S,3,&tolua_err)
325 string name_or_alias = ((string) tolua_tocppstring(tolua_S,2,0));
327 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'node'", NULL);
329 bool exc_caught =
false;
336 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::NavGraphNode");
337 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
340 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::NavGraphNode");
341 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
349 catch (std::exception &e) {
351 lua_pushstring(tolua_S, e.what());
353 if (exc_caught) lua_error(tolua_S);
359 tolua_error(tolua_S,
"#ferror in function 'node'.",&tolua_err);
366#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_closest_node00
367static int tolua_fawkesnavgraph_fawkes_NavGraph_closest_node00(lua_State* tolua_S)
370 tolua_Error tolua_err;
372 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
373 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
374 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
375 !tolua_iscppstring(tolua_S,4,0,&tolua_err) ||
376 !tolua_isnoobj(tolua_S,5,&tolua_err)
383 float pos_x = ((float) tolua_tonumber(tolua_S,2,0));
384 float pos_y = ((float) tolua_tonumber(tolua_S,3,0));
385 string property = ((string) tolua_tocppstring(tolua_S,4,0));
387 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'closest_node'", NULL);
389 bool exc_caught =
false;
396 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::NavGraphNode");
397 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
400 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::NavGraphNode");
401 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
409 catch (std::exception &e) {
411 lua_pushstring(tolua_S, e.what());
413 if (exc_caught) lua_error(tolua_S);
419 tolua_error(tolua_S,
"#ferror in function 'closest_node'.",&tolua_err);
426#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_closest_node_to00
427static int tolua_fawkesnavgraph_fawkes_NavGraph_closest_node_to00(lua_State* tolua_S)
430 tolua_Error tolua_err;
432 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
433 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
434 !tolua_iscppstring(tolua_S,3,0,&tolua_err) ||
435 !tolua_isnoobj(tolua_S,4,&tolua_err)
442 std::string node_name = ((std::string) tolua_tocppstring(tolua_S,2,0));
443 string property = ((string) tolua_tocppstring(tolua_S,3,0));
445 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'closest_node_to'", NULL);
447 bool exc_caught =
false;
454 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::NavGraphNode");
455 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
458 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::NavGraphNode");
459 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
467 catch (std::exception &e) {
469 lua_pushstring(tolua_S, e.what());
471 if (exc_caught) lua_error(tolua_S);
477 tolua_error(tolua_S,
"#ferror in function 'closest_node_to'.",&tolua_err);
484#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_closest_node_with_unconnected00
485static int tolua_fawkesnavgraph_fawkes_NavGraph_closest_node_with_unconnected00(lua_State* tolua_S)
488 tolua_Error tolua_err;
490 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
491 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
492 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
493 !tolua_iscppstring(tolua_S,4,0,&tolua_err) ||
494 !tolua_isnoobj(tolua_S,5,&tolua_err)
501 float pos_x = ((float) tolua_tonumber(tolua_S,2,0));
502 float pos_y = ((float) tolua_tonumber(tolua_S,3,0));
503 string property = ((string) tolua_tocppstring(tolua_S,4,0));
505 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'closest_node_with_unconnected'", NULL);
507 bool exc_caught =
false;
514 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::NavGraphNode");
515 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
518 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::NavGraphNode");
519 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
527 catch (std::exception &e) {
529 lua_pushstring(tolua_S, e.what());
531 if (exc_caught) lua_error(tolua_S);
537 tolua_error(tolua_S,
"#ferror in function 'closest_node_with_unconnected'.",&tolua_err);
544#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_closest_node_to_with_unconnected00
545static int tolua_fawkesnavgraph_fawkes_NavGraph_closest_node_to_with_unconnected00(lua_State* tolua_S)
548 tolua_Error tolua_err;
550 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
551 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
552 !tolua_iscppstring(tolua_S,3,0,&tolua_err) ||
553 !tolua_isnoobj(tolua_S,4,&tolua_err)
560 std::string node_name = ((std::string) tolua_tocppstring(tolua_S,2,0));
561 string property = ((string) tolua_tocppstring(tolua_S,3,0));
563 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'closest_node_to_with_unconnected'", NULL);
565 bool exc_caught =
false;
572 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::NavGraphNode");
573 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
576 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::NavGraphNode");
577 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
585 catch (std::exception &e) {
587 lua_pushstring(tolua_S, e.what());
589 if (exc_caught) lua_error(tolua_S);
595 tolua_error(tolua_S,
"#ferror in function 'closest_node_to_with_unconnected'.",&tolua_err);
602#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_search_nodes00
603static int tolua_fawkesnavgraph_fawkes_NavGraph_search_nodes00(lua_State* tolua_S)
606 tolua_Error tolua_err;
608 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
609 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
610 !tolua_isnoobj(tolua_S,3,&tolua_err)
617 string property = ((string) tolua_tocppstring(tolua_S,2,0));
619 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'search_nodes'", NULL);
621 bool exc_caught =
false;
624 vector<fawkes::NavGraphNode> tolua_ret = (vector<fawkes::NavGraphNode>) self->
search_nodes(property);
627 void* tolua_obj = Mtolua_new((vector<fawkes::NavGraphNode>)(tolua_ret));
628 tolua_pushusertype(tolua_S,tolua_obj,
"vector<fawkes::NavGraphNode>");
629 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
631 void* tolua_obj = tolua_copy(tolua_S,(
void*)&tolua_ret,
sizeof(vector<fawkes::NavGraphNode>));
632 tolua_pushusertype(tolua_S,tolua_obj,
"vector<fawkes::NavGraphNode>");
633 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
641 catch (std::exception &e) {
643 lua_pushstring(tolua_S, e.what());
645 if (exc_caught) lua_error(tolua_S);
651 tolua_error(tolua_S,
"#ferror in function 'search_nodes'.",&tolua_err);
658#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_default_property00
659static int tolua_fawkesnavgraph_fawkes_NavGraph_default_property00(lua_State* tolua_S)
662 tolua_Error tolua_err;
664 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
665 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
666 !tolua_isnoobj(tolua_S,3,&tolua_err)
673 string prop = ((string) tolua_tocppstring(tolua_S,2,0));
675 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'default_property'", NULL);
677 bool exc_caught =
false;
681 tolua_pushcppstring(tolua_S,(
const char*)tolua_ret);
682 tolua_pushcppstring(tolua_S,(
const char*)prop);
688 catch (std::exception &e) {
690 lua_pushstring(tolua_S, e.what());
692 if (exc_caught) lua_error(tolua_S);
698 tolua_error(tolua_S,
"#ferror in function 'default_property'.",&tolua_err);
705#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_default_property_as_float00
706static int tolua_fawkesnavgraph_fawkes_NavGraph_default_property_as_float00(lua_State* tolua_S)
709 tolua_Error tolua_err;
711 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
712 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
713 !tolua_isnoobj(tolua_S,3,&tolua_err)
720 string prop = ((string) tolua_tocppstring(tolua_S,2,0));
722 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'default_property_as_float'", NULL);
724 bool exc_caught =
false;
728 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
729 tolua_pushcppstring(tolua_S,(
const char*)prop);
735 catch (std::exception &e) {
737 lua_pushstring(tolua_S, e.what());
739 if (exc_caught) lua_error(tolua_S);
745 tolua_error(tolua_S,
"#ferror in function 'default_property_as_float'.",&tolua_err);
752#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_default_property_as_int00
753static int tolua_fawkesnavgraph_fawkes_NavGraph_default_property_as_int00(lua_State* tolua_S)
756 tolua_Error tolua_err;
758 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
759 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
760 !tolua_isnoobj(tolua_S,3,&tolua_err)
767 string prop = ((string) tolua_tocppstring(tolua_S,2,0));
769 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'default_property_as_int'", NULL);
771 bool exc_caught =
false;
775 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
776 tolua_pushcppstring(tolua_S,(
const char*)prop);
782 catch (std::exception &e) {
784 lua_pushstring(tolua_S, e.what());
786 if (exc_caught) lua_error(tolua_S);
792 tolua_error(tolua_S,
"#ferror in function 'default_property_as_int'.",&tolua_err);
799#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraph_default_property_as_bool00
800static int tolua_fawkesnavgraph_fawkes_NavGraph_default_property_as_bool00(lua_State* tolua_S)
803 tolua_Error tolua_err;
805 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraph",0,&tolua_err) ||
806 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
807 !tolua_isnoobj(tolua_S,3,&tolua_err)
814 string prop = ((string) tolua_tocppstring(tolua_S,2,0));
816 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'default_property_as_bool'", NULL);
818 bool exc_caught =
false;
822 tolua_pushboolean(tolua_S,(
bool)tolua_ret);
823 tolua_pushcppstring(tolua_S,(
const char*)prop);
829 catch (std::exception &e) {
831 lua_pushstring(tolua_S, e.what());
833 if (exc_caught) lua_error(tolua_S);
839 tolua_error(tolua_S,
"#ferror in function 'default_property_as_bool'.",&tolua_err);
846#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_load_yaml_navgraph00
847static int tolua_fawkesnavgraph_fawkes_load_yaml_navgraph00(lua_State* tolua_S)
850 tolua_Error tolua_err;
852 !tolua_iscppstring(tolua_S,1,0,&tolua_err) ||
853 !tolua_isnoobj(tolua_S,2,&tolua_err)
859 std::string filename = ((std::string) tolua_tocppstring(tolua_S,1,0));
860 bool exc_caught =
false;
864 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::NavGraph");
870 catch (std::exception &e) {
872 lua_pushstring(tolua_S, e.what());
874 if (exc_caught) lua_error(tolua_S);
880 tolua_error(tolua_S,
"#ferror in function 'load_yaml_navgraph'.",&tolua_err);
887#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_string__clear00
888static int tolua_fawkesnavgraph_vector_string__clear00(lua_State* tolua_S)
891 tolua_Error tolua_err;
893 !tolua_isusertype(tolua_S,1,
"vector<string>",0,&tolua_err) ||
894 !tolua_isnoobj(tolua_S,2,&tolua_err)
900 vector<string>* self = (vector<string>*) tolua_tousertype(tolua_S,1,0);
902 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'clear'", NULL);
904 bool exc_caught =
false;
913 catch (std::exception &e) {
915 lua_pushstring(tolua_S, e.what());
917 if (exc_caught) lua_error(tolua_S);
923 tolua_error(tolua_S,
"#ferror in function 'clear'.",&tolua_err);
930#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_string__size00
931static int tolua_fawkesnavgraph_vector_string__size00(lua_State* tolua_S)
934 tolua_Error tolua_err;
936 !tolua_isusertype(tolua_S,1,
"const vector<string>",0,&tolua_err) ||
937 !tolua_isnoobj(tolua_S,2,&tolua_err)
943 const vector<string>* self = (
const vector<string>*) tolua_tousertype(tolua_S,1,0);
945 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'size'", NULL);
947 bool exc_caught =
false;
950 int tolua_ret = (int) self->size();
951 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
957 catch (std::exception &e) {
959 lua_pushstring(tolua_S, e.what());
961 if (exc_caught) lua_error(tolua_S);
967 tolua_error(tolua_S,
"#ferror in function 'size'.",&tolua_err);
974#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_string___geti00
975static int tolua_fawkesnavgraph_vector_string___geti00(lua_State* tolua_S)
978 tolua_Error tolua_err;
980 !tolua_isusertype(tolua_S,1,
"const vector<string>",0,&tolua_err) ||
981 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
982 !tolua_isnoobj(tolua_S,3,&tolua_err)
988 const vector<string>* self = (
const vector<string>*) tolua_tousertype(tolua_S,1,0);
989 int index = ((int) tolua_tonumber(tolua_S,2,0));
991 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'operator[]'", NULL);
993 bool exc_caught =
false;
996 const string tolua_ret = (
const string) self->operator[](index);
997 tolua_pushcppstring(tolua_S,(
const char*)tolua_ret);
1003 catch (std::exception &e) {
1005 lua_pushstring(tolua_S, e.what());
1007 if (exc_caught) lua_error(tolua_S);
1011#ifndef TOLUA_RELEASE
1013 tolua_error(tolua_S,
"#ferror in function '.geti'.",&tolua_err);
1020#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_string___seti00
1021static int tolua_fawkesnavgraph_vector_string___seti00(lua_State* tolua_S)
1023#ifndef TOLUA_RELEASE
1024 tolua_Error tolua_err;
1026 !tolua_isusertype(tolua_S,1,
"vector<string>",0,&tolua_err) ||
1027 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1028 !tolua_iscppstring(tolua_S,3,0,&tolua_err) ||
1029 !tolua_isnoobj(tolua_S,4,&tolua_err)
1035 vector<string>* self = (vector<string>*) tolua_tousertype(tolua_S,1,0);
1036 int index = ((int) tolua_tonumber(tolua_S,2,0));
1037 string tolua_value = ((string) tolua_tocppstring(tolua_S,3,0));
1038#ifndef TOLUA_RELEASE
1039 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'operator&[]'", NULL);
1041 bool exc_caught =
false;
1043 self->operator[](index) = tolua_value;
1048 catch (std::exception &e) {
1050 lua_pushstring(tolua_S, e.what());
1052 if (exc_caught) lua_error(tolua_S);
1056#ifndef TOLUA_RELEASE
1058 tolua_error(tolua_S,
"#ferror in function '.seti'.",&tolua_err);
1065#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_string___geti01
1066static int tolua_fawkesnavgraph_vector_string___geti01(lua_State* tolua_S)
1068 tolua_Error tolua_err;
1070 !tolua_isusertype(tolua_S,1,
"vector<string>",0,&tolua_err) ||
1071 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1072 !tolua_isnoobj(tolua_S,3,&tolua_err)
1077 vector<string>* self = (vector<string>*) tolua_tousertype(tolua_S,1,0);
1078 int index = ((int) tolua_tonumber(tolua_S,2,0));
1079#ifndef TOLUA_RELEASE
1080 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'operator[]'", NULL);
1082 bool exc_caught =
false;
1085 string tolua_ret = (string) self->operator[](index);
1086 tolua_pushcppstring(tolua_S,(
const char*)tolua_ret);
1092 catch (std::exception &e) {
1094 lua_pushstring(tolua_S, e.what());
1096 if (exc_caught) lua_error(tolua_S);
1101 return tolua_fawkesnavgraph_vector_string___geti00(tolua_S);
1106#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_string__push_back00
1107static int tolua_fawkesnavgraph_vector_string__push_back00(lua_State* tolua_S)
1109#ifndef TOLUA_RELEASE
1110 tolua_Error tolua_err;
1112 !tolua_isusertype(tolua_S,1,
"vector<string>",0,&tolua_err) ||
1113 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
1114 !tolua_isnoobj(tolua_S,3,&tolua_err)
1120 vector<string>* self = (vector<string>*) tolua_tousertype(tolua_S,1,0);
1121 string val = ((string) tolua_tocppstring(tolua_S,2,0));
1122#ifndef TOLUA_RELEASE
1123 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'push_back'", NULL);
1125 bool exc_caught =
false;
1128 self->push_back(val);
1134 catch (std::exception &e) {
1136 lua_pushstring(tolua_S, e.what());
1138 if (exc_caught) lua_error(tolua_S);
1142#ifndef TOLUA_RELEASE
1144 tolua_error(tolua_S,
"#ferror in function 'push_back'.",&tolua_err);
1151#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_string__new00
1152static int tolua_fawkesnavgraph_vector_string__new00(lua_State* tolua_S)
1154#ifndef TOLUA_RELEASE
1155 tolua_Error tolua_err;
1157 !tolua_isusertable(tolua_S,1,
"vector<string>",0,&tolua_err) ||
1158 !tolua_isnoobj(tolua_S,2,&tolua_err)
1164 bool exc_caught =
false;
1167 vector<string>* tolua_ret = (vector<string>*) Mtolua_new((vector<string>)());
1168 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"vector<string>");
1174 catch (std::exception &e) {
1176 lua_pushstring(tolua_S, e.what());
1178 if (exc_caught) lua_error(tolua_S);
1182#ifndef TOLUA_RELEASE
1184 tolua_error(tolua_S,
"#ferror in function 'new'.",&tolua_err);
1191#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_string__new00_local
1192static int tolua_fawkesnavgraph_vector_string__new00_local(lua_State* tolua_S)
1194#ifndef TOLUA_RELEASE
1195 tolua_Error tolua_err;
1197 !tolua_isusertable(tolua_S,1,
"vector<string>",0,&tolua_err) ||
1198 !tolua_isnoobj(tolua_S,2,&tolua_err)
1204 bool exc_caught =
false;
1207 vector<string>* tolua_ret = (vector<string>*) Mtolua_new((vector<string>)());
1208 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"vector<string>");
1209 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1215 catch (std::exception &e) {
1217 lua_pushstring(tolua_S, e.what());
1219 if (exc_caught) lua_error(tolua_S);
1223#ifndef TOLUA_RELEASE
1225 tolua_error(tolua_S,
"#ferror in function 'new'.",&tolua_err);
1232#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_string__delete00
1233static int tolua_fawkesnavgraph_vector_string__delete00(lua_State* tolua_S)
1235#ifndef TOLUA_RELEASE
1236 tolua_Error tolua_err;
1238 !tolua_isusertype(tolua_S,1,
"vector<string>",0,&tolua_err) ||
1239 !tolua_isnoobj(tolua_S,2,&tolua_err)
1245 vector<string>* self = (vector<string>*) tolua_tousertype(tolua_S,1,0);
1246#ifndef TOLUA_RELEASE
1247 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'delete'", NULL);
1249 bool exc_caught =
false;
1251 Mtolua_delete(self);
1256 catch (std::exception &e) {
1258 lua_pushstring(tolua_S, e.what());
1260 if (exc_caught) lua_error(tolua_S);
1264#ifndef TOLUA_RELEASE
1266 tolua_error(tolua_S,
"#ferror in function 'delete'.",&tolua_err);
1273#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__clear00
1274static int tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__clear00(lua_State* tolua_S)
1276#ifndef TOLUA_RELEASE
1277 tolua_Error tolua_err;
1279 !tolua_isusertype(tolua_S,1,
"vector<fawkes::NavGraphNode>",0,&tolua_err) ||
1280 !tolua_isnoobj(tolua_S,2,&tolua_err)
1286 vector<fawkes::NavGraphNode>* self = (vector<fawkes::NavGraphNode>*) tolua_tousertype(tolua_S,1,0);
1287#ifndef TOLUA_RELEASE
1288 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'clear'", NULL);
1290 bool exc_caught =
false;
1299 catch (std::exception &e) {
1301 lua_pushstring(tolua_S, e.what());
1303 if (exc_caught) lua_error(tolua_S);
1307#ifndef TOLUA_RELEASE
1309 tolua_error(tolua_S,
"#ferror in function 'clear'.",&tolua_err);
1316#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__size00
1317static int tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__size00(lua_State* tolua_S)
1319#ifndef TOLUA_RELEASE
1320 tolua_Error tolua_err;
1322 !tolua_isusertype(tolua_S,1,
"const vector<fawkes::NavGraphNode>",0,&tolua_err) ||
1323 !tolua_isnoobj(tolua_S,2,&tolua_err)
1329 const vector<fawkes::NavGraphNode>* self = (
const vector<fawkes::NavGraphNode>*) tolua_tousertype(tolua_S,1,0);
1330#ifndef TOLUA_RELEASE
1331 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'size'", NULL);
1333 bool exc_caught =
false;
1336 int tolua_ret = (int) self->size();
1337 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1343 catch (std::exception &e) {
1345 lua_pushstring(tolua_S, e.what());
1347 if (exc_caught) lua_error(tolua_S);
1351#ifndef TOLUA_RELEASE
1353 tolua_error(tolua_S,
"#ferror in function 'size'.",&tolua_err);
1360#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_fawkes__NavGraphNode___geti00
1361static int tolua_fawkesnavgraph_vector_fawkes__NavGraphNode___geti00(lua_State* tolua_S)
1363#ifndef TOLUA_RELEASE
1364 tolua_Error tolua_err;
1366 !tolua_isusertype(tolua_S,1,
"const vector<fawkes::NavGraphNode>",0,&tolua_err) ||
1367 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1368 !tolua_isnoobj(tolua_S,3,&tolua_err)
1374 const vector<fawkes::NavGraphNode>* self = (
const vector<fawkes::NavGraphNode>*) tolua_tousertype(tolua_S,1,0);
1375 int index = ((int) tolua_tonumber(tolua_S,2,0));
1376#ifndef TOLUA_RELEASE
1377 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'operator[]'", NULL);
1379 bool exc_caught =
false;
1386 tolua_pushusertype(tolua_S,tolua_obj,
"const fawkes::NavGraphNode");
1387 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1390 tolua_pushusertype(tolua_S,tolua_obj,
"const fawkes::NavGraphNode");
1391 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1399 catch (std::exception &e) {
1401 lua_pushstring(tolua_S, e.what());
1403 if (exc_caught) lua_error(tolua_S);
1407#ifndef TOLUA_RELEASE
1409 tolua_error(tolua_S,
"#ferror in function '.geti'.",&tolua_err);
1416#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_fawkes__NavGraphNode___seti00
1417static int tolua_fawkesnavgraph_vector_fawkes__NavGraphNode___seti00(lua_State* tolua_S)
1419#ifndef TOLUA_RELEASE
1420 tolua_Error tolua_err;
1422 !tolua_isusertype(tolua_S,1,
"vector<fawkes::NavGraphNode>",0,&tolua_err) ||
1423 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1424 (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,
"fawkes::NavGraphNode",0,&tolua_err)) ||
1425 !tolua_isnoobj(tolua_S,4,&tolua_err)
1431 vector<fawkes::NavGraphNode>* self = (vector<fawkes::NavGraphNode>*) tolua_tousertype(tolua_S,1,0);
1432 int index = ((int) tolua_tonumber(tolua_S,2,0));
1434#ifndef TOLUA_RELEASE
1435 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'operator&[]'", NULL);
1437 bool exc_caught =
false;
1439 self->operator[](index) = tolua_value;
1444 catch (std::exception &e) {
1446 lua_pushstring(tolua_S, e.what());
1448 if (exc_caught) lua_error(tolua_S);
1452#ifndef TOLUA_RELEASE
1454 tolua_error(tolua_S,
"#ferror in function '.seti'.",&tolua_err);
1461#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_fawkes__NavGraphNode___geti01
1462static int tolua_fawkesnavgraph_vector_fawkes__NavGraphNode___geti01(lua_State* tolua_S)
1464 tolua_Error tolua_err;
1466 !tolua_isusertype(tolua_S,1,
"vector<fawkes::NavGraphNode>",0,&tolua_err) ||
1467 !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
1468 !tolua_isnoobj(tolua_S,3,&tolua_err)
1473 vector<fawkes::NavGraphNode>* self = (vector<fawkes::NavGraphNode>*) tolua_tousertype(tolua_S,1,0);
1474 int index = ((int) tolua_tonumber(tolua_S,2,0));
1475#ifndef TOLUA_RELEASE
1476 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'operator[]'", NULL);
1478 bool exc_caught =
false;
1485 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::NavGraphNode");
1486 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1489 tolua_pushusertype(tolua_S,tolua_obj,
"fawkes::NavGraphNode");
1490 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1498 catch (std::exception &e) {
1500 lua_pushstring(tolua_S, e.what());
1502 if (exc_caught) lua_error(tolua_S);
1507 return tolua_fawkesnavgraph_vector_fawkes__NavGraphNode___geti00(tolua_S);
1512#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__push_back00
1513static int tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__push_back00(lua_State* tolua_S)
1515#ifndef TOLUA_RELEASE
1516 tolua_Error tolua_err;
1518 !tolua_isusertype(tolua_S,1,
"vector<fawkes::NavGraphNode>",0,&tolua_err) ||
1519 (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,
"fawkes::NavGraphNode",0,&tolua_err)) ||
1520 !tolua_isnoobj(tolua_S,3,&tolua_err)
1526 vector<fawkes::NavGraphNode>* self = (vector<fawkes::NavGraphNode>*) tolua_tousertype(tolua_S,1,0);
1528#ifndef TOLUA_RELEASE
1529 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'push_back'", NULL);
1531 bool exc_caught =
false;
1534 self->push_back(val);
1540 catch (std::exception &e) {
1542 lua_pushstring(tolua_S, e.what());
1544 if (exc_caught) lua_error(tolua_S);
1548#ifndef TOLUA_RELEASE
1550 tolua_error(tolua_S,
"#ferror in function 'push_back'.",&tolua_err);
1557#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__new00
1558static int tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__new00(lua_State* tolua_S)
1560#ifndef TOLUA_RELEASE
1561 tolua_Error tolua_err;
1563 !tolua_isusertable(tolua_S,1,
"vector<fawkes::NavGraphNode>",0,&tolua_err) ||
1564 !tolua_isnoobj(tolua_S,2,&tolua_err)
1570 bool exc_caught =
false;
1573 vector<fawkes::NavGraphNode>* tolua_ret = (vector<fawkes::NavGraphNode>*) Mtolua_new((vector<fawkes::NavGraphNode>)());
1574 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"vector<fawkes::NavGraphNode>");
1580 catch (std::exception &e) {
1582 lua_pushstring(tolua_S, e.what());
1584 if (exc_caught) lua_error(tolua_S);
1588#ifndef TOLUA_RELEASE
1590 tolua_error(tolua_S,
"#ferror in function 'new'.",&tolua_err);
1597#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__new00_local
1598static int tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__new00_local(lua_State* tolua_S)
1600#ifndef TOLUA_RELEASE
1601 tolua_Error tolua_err;
1603 !tolua_isusertable(tolua_S,1,
"vector<fawkes::NavGraphNode>",0,&tolua_err) ||
1604 !tolua_isnoobj(tolua_S,2,&tolua_err)
1610 bool exc_caught =
false;
1613 vector<fawkes::NavGraphNode>* tolua_ret = (vector<fawkes::NavGraphNode>*) Mtolua_new((vector<fawkes::NavGraphNode>)());
1614 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"vector<fawkes::NavGraphNode>");
1615 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1621 catch (std::exception &e) {
1623 lua_pushstring(tolua_S, e.what());
1625 if (exc_caught) lua_error(tolua_S);
1629#ifndef TOLUA_RELEASE
1631 tolua_error(tolua_S,
"#ferror in function 'new'.",&tolua_err);
1638#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__delete00
1639static int tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__delete00(lua_State* tolua_S)
1641#ifndef TOLUA_RELEASE
1642 tolua_Error tolua_err;
1644 !tolua_isusertype(tolua_S,1,
"vector<fawkes::NavGraphNode>",0,&tolua_err) ||
1645 !tolua_isnoobj(tolua_S,2,&tolua_err)
1651 vector<fawkes::NavGraphNode>* self = (vector<fawkes::NavGraphNode>*) tolua_tousertype(tolua_S,1,0);
1652#ifndef TOLUA_RELEASE
1653 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'delete'", NULL);
1655 bool exc_caught =
false;
1657 Mtolua_delete(self);
1662 catch (std::exception &e) {
1664 lua_pushstring(tolua_S, e.what());
1666 if (exc_caught) lua_error(tolua_S);
1670#ifndef TOLUA_RELEASE
1672 tolua_error(tolua_S,
"#ferror in function 'delete'.",&tolua_err);
1679#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraphNode_new00
1680static int tolua_fawkesnavgraph_fawkes_NavGraphNode_new00(lua_State* tolua_S)
1682#ifndef TOLUA_RELEASE
1683 tolua_Error tolua_err;
1685 !tolua_isusertable(tolua_S,1,
"fawkes::NavGraphNode",0,&tolua_err) ||
1686 !tolua_isnoobj(tolua_S,2,&tolua_err)
1692 bool exc_caught =
false;
1696 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::NavGraphNode");
1702 catch (std::exception &e) {
1704 lua_pushstring(tolua_S, e.what());
1706 if (exc_caught) lua_error(tolua_S);
1710#ifndef TOLUA_RELEASE
1712 tolua_error(tolua_S,
"#ferror in function 'new'.",&tolua_err);
1719#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraphNode_new00_local
1720static int tolua_fawkesnavgraph_fawkes_NavGraphNode_new00_local(lua_State* tolua_S)
1722#ifndef TOLUA_RELEASE
1723 tolua_Error tolua_err;
1725 !tolua_isusertable(tolua_S,1,
"fawkes::NavGraphNode",0,&tolua_err) ||
1726 !tolua_isnoobj(tolua_S,2,&tolua_err)
1732 bool exc_caught =
false;
1736 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::NavGraphNode");
1737 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1743 catch (std::exception &e) {
1745 lua_pushstring(tolua_S, e.what());
1747 if (exc_caught) lua_error(tolua_S);
1751#ifndef TOLUA_RELEASE
1753 tolua_error(tolua_S,
"#ferror in function 'new'.",&tolua_err);
1760#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraphNode_new01
1761static int tolua_fawkesnavgraph_fawkes_NavGraphNode_new01(lua_State* tolua_S)
1763 tolua_Error tolua_err;
1765 !tolua_isusertable(tolua_S,1,
"fawkes::NavGraphNode",0,&tolua_err) ||
1766 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
1767 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1768 !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
1769 !tolua_isnoobj(tolua_S,5,&tolua_err)
1774 string name = ((string) tolua_tocppstring(tolua_S,2,0));
1775 double x = ((double) tolua_tonumber(tolua_S,3,0));
1776 double y = ((double) tolua_tonumber(tolua_S,4,0));
1777 bool exc_caught =
false;
1781 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::NavGraphNode");
1787 catch (std::exception &e) {
1789 lua_pushstring(tolua_S, e.what());
1791 if (exc_caught) lua_error(tolua_S);
1796 return tolua_fawkesnavgraph_fawkes_NavGraphNode_new00(tolua_S);
1801#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraphNode_new01_local
1802static int tolua_fawkesnavgraph_fawkes_NavGraphNode_new01_local(lua_State* tolua_S)
1804 tolua_Error tolua_err;
1806 !tolua_isusertable(tolua_S,1,
"fawkes::NavGraphNode",0,&tolua_err) ||
1807 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
1808 !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
1809 !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
1810 !tolua_isnoobj(tolua_S,5,&tolua_err)
1815 string name = ((string) tolua_tocppstring(tolua_S,2,0));
1816 double x = ((double) tolua_tonumber(tolua_S,3,0));
1817 double y = ((double) tolua_tonumber(tolua_S,4,0));
1818 bool exc_caught =
false;
1822 tolua_pushusertype(tolua_S,(
void*)tolua_ret,
"fawkes::NavGraphNode");
1823 tolua_register_gc(tolua_S,lua_gettop(tolua_S));
1829 catch (std::exception &e) {
1831 lua_pushstring(tolua_S, e.what());
1833 if (exc_caught) lua_error(tolua_S);
1838 return tolua_fawkesnavgraph_fawkes_NavGraphNode_new00_local(tolua_S);
1843#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraphNode_name00
1844static int tolua_fawkesnavgraph_fawkes_NavGraphNode_name00(lua_State* tolua_S)
1846#ifndef TOLUA_RELEASE
1847 tolua_Error tolua_err;
1849 !tolua_isusertype(tolua_S,1,
"const fawkes::NavGraphNode",0,&tolua_err) ||
1850 !tolua_isnoobj(tolua_S,2,&tolua_err)
1857#ifndef TOLUA_RELEASE
1858 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'name'", NULL);
1860 bool exc_caught =
false;
1863 string tolua_ret = (string) self->
name();
1864 tolua_pushcppstring(tolua_S,(
const char*)tolua_ret);
1870 catch (std::exception &e) {
1872 lua_pushstring(tolua_S, e.what());
1874 if (exc_caught) lua_error(tolua_S);
1878#ifndef TOLUA_RELEASE
1880 tolua_error(tolua_S,
"#ferror in function 'name'.",&tolua_err);
1887#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraphNode_x00
1888static int tolua_fawkesnavgraph_fawkes_NavGraphNode_x00(lua_State* tolua_S)
1890#ifndef TOLUA_RELEASE
1891 tolua_Error tolua_err;
1893 !tolua_isusertype(tolua_S,1,
"const fawkes::NavGraphNode",0,&tolua_err) ||
1894 !tolua_isnoobj(tolua_S,2,&tolua_err)
1901#ifndef TOLUA_RELEASE
1902 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'x'", NULL);
1904 bool exc_caught =
false;
1907 float tolua_ret = (float) self->
x();
1908 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1914 catch (std::exception &e) {
1916 lua_pushstring(tolua_S, e.what());
1918 if (exc_caught) lua_error(tolua_S);
1922#ifndef TOLUA_RELEASE
1924 tolua_error(tolua_S,
"#ferror in function 'x'.",&tolua_err);
1931#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraphNode_y00
1932static int tolua_fawkesnavgraph_fawkes_NavGraphNode_y00(lua_State* tolua_S)
1934#ifndef TOLUA_RELEASE
1935 tolua_Error tolua_err;
1937 !tolua_isusertype(tolua_S,1,
"const fawkes::NavGraphNode",0,&tolua_err) ||
1938 !tolua_isnoobj(tolua_S,2,&tolua_err)
1945#ifndef TOLUA_RELEASE
1946 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'y'", NULL);
1948 bool exc_caught =
false;
1951 float tolua_ret = (float) self->
y();
1952 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
1958 catch (std::exception &e) {
1960 lua_pushstring(tolua_S, e.what());
1962 if (exc_caught) lua_error(tolua_S);
1966#ifndef TOLUA_RELEASE
1968 tolua_error(tolua_S,
"#ferror in function 'y'.",&tolua_err);
1975#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraphNode_is_valid00
1976static int tolua_fawkesnavgraph_fawkes_NavGraphNode_is_valid00(lua_State* tolua_S)
1978#ifndef TOLUA_RELEASE
1979 tolua_Error tolua_err;
1981 !tolua_isusertype(tolua_S,1,
"const fawkes::NavGraphNode",0,&tolua_err) ||
1982 !tolua_isnoobj(tolua_S,2,&tolua_err)
1989#ifndef TOLUA_RELEASE
1990 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'is_valid'", NULL);
1992 bool exc_caught =
false;
1995 bool tolua_ret = (bool) self->
is_valid();
1996 tolua_pushboolean(tolua_S,(
bool)tolua_ret);
2002 catch (std::exception &e) {
2004 lua_pushstring(tolua_S, e.what());
2006 if (exc_caught) lua_error(tolua_S);
2010#ifndef TOLUA_RELEASE
2012 tolua_error(tolua_S,
"#ferror in function 'is_valid'.",&tolua_err);
2019#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraphNode_reachable_nodes00
2020static int tolua_fawkesnavgraph_fawkes_NavGraphNode_reachable_nodes00(lua_State* tolua_S)
2022#ifndef TOLUA_RELEASE
2023 tolua_Error tolua_err;
2025 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraphNode",0,&tolua_err) ||
2026 !tolua_isnoobj(tolua_S,2,&tolua_err)
2033#ifndef TOLUA_RELEASE
2034 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'reachable_nodes'", NULL);
2036 bool exc_caught =
false;
2039 vector<string>& tolua_ret = (vector<string>&) self->
reachable_nodes();
2040 tolua_pushusertype(tolua_S,(
void*)&tolua_ret,
"vector<string>");
2046 catch (std::exception &e) {
2048 lua_pushstring(tolua_S, e.what());
2050 if (exc_caught) lua_error(tolua_S);
2054#ifndef TOLUA_RELEASE
2056 tolua_error(tolua_S,
"#ferror in function 'reachable_nodes'.",&tolua_err);
2063#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraphNode_has_property00
2064static int tolua_fawkesnavgraph_fawkes_NavGraphNode_has_property00(lua_State* tolua_S)
2066#ifndef TOLUA_RELEASE
2067 tolua_Error tolua_err;
2069 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraphNode",0,&tolua_err) ||
2070 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
2071 !tolua_isnoobj(tolua_S,3,&tolua_err)
2078 string property = ((string) tolua_tocppstring(tolua_S,2,0));
2079#ifndef TOLUA_RELEASE
2080 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'has_property'", NULL);
2082 bool exc_caught =
false;
2086 tolua_pushboolean(tolua_S,(
bool)tolua_ret);
2092 catch (std::exception &e) {
2094 lua_pushstring(tolua_S, e.what());
2096 if (exc_caught) lua_error(tolua_S);
2100#ifndef TOLUA_RELEASE
2102 tolua_error(tolua_S,
"#ferror in function 'has_property'.",&tolua_err);
2109#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraphNode_property_as_float00
2110static int tolua_fawkesnavgraph_fawkes_NavGraphNode_property_as_float00(lua_State* tolua_S)
2112#ifndef TOLUA_RELEASE
2113 tolua_Error tolua_err;
2115 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraphNode",0,&tolua_err) ||
2116 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
2117 !tolua_isnoobj(tolua_S,3,&tolua_err)
2124 string prop = ((string) tolua_tocppstring(tolua_S,2,0));
2125#ifndef TOLUA_RELEASE
2126 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'property_as_float'", NULL);
2128 bool exc_caught =
false;
2132 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2138 catch (std::exception &e) {
2140 lua_pushstring(tolua_S, e.what());
2142 if (exc_caught) lua_error(tolua_S);
2146#ifndef TOLUA_RELEASE
2148 tolua_error(tolua_S,
"#ferror in function 'property_as_float'.",&tolua_err);
2155#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraphNode_property_as_int00
2156static int tolua_fawkesnavgraph_fawkes_NavGraphNode_property_as_int00(lua_State* tolua_S)
2158#ifndef TOLUA_RELEASE
2159 tolua_Error tolua_err;
2161 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraphNode",0,&tolua_err) ||
2162 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
2163 !tolua_isnoobj(tolua_S,3,&tolua_err)
2170 string prop = ((string) tolua_tocppstring(tolua_S,2,0));
2171#ifndef TOLUA_RELEASE
2172 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'property_as_int'", NULL);
2174 bool exc_caught =
false;
2178 tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
2184 catch (std::exception &e) {
2186 lua_pushstring(tolua_S, e.what());
2188 if (exc_caught) lua_error(tolua_S);
2192#ifndef TOLUA_RELEASE
2194 tolua_error(tolua_S,
"#ferror in function 'property_as_int'.",&tolua_err);
2201#ifndef TOLUA_DISABLE_tolua_fawkesnavgraph_fawkes_NavGraphNode_property_as_bool00
2202static int tolua_fawkesnavgraph_fawkes_NavGraphNode_property_as_bool00(lua_State* tolua_S)
2204#ifndef TOLUA_RELEASE
2205 tolua_Error tolua_err;
2207 !tolua_isusertype(tolua_S,1,
"fawkes::NavGraphNode",0,&tolua_err) ||
2208 !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
2209 !tolua_isnoobj(tolua_S,3,&tolua_err)
2216 string prop = ((string) tolua_tocppstring(tolua_S,2,0));
2217#ifndef TOLUA_RELEASE
2218 if (!self) tolua_error(tolua_S,
"invalid 'self' in function 'property_as_bool'", NULL);
2220 bool exc_caught =
false;
2224 tolua_pushboolean(tolua_S,(
bool)tolua_ret);
2230 catch (std::exception &e) {
2232 lua_pushstring(tolua_S, e.what());
2234 if (exc_caught) lua_error(tolua_S);
2238#ifndef TOLUA_RELEASE
2240 tolua_error(tolua_S,
"#ferror in function 'property_as_bool'.",&tolua_err);
2247TOLUA_API
int tolua_fawkesnavgraph_open (lua_State* tolua_S)
2249 tolua_open(tolua_S);
2250 tolua_reg_types(tolua_S);
2251 tolua_module(tolua_S,NULL,0);
2252 tolua_beginmodule(tolua_S,NULL);
2253 tolua_module(tolua_S,
"fawkes",0);
2254 tolua_beginmodule(tolua_S,
"fawkes");
2256 tolua_cclass(tolua_S,
"NavGraph",
"fawkes::NavGraph",
"",tolua_collect_fawkes__NavGraph);
2258 tolua_cclass(tolua_S,
"NavGraph",
"fawkes::NavGraph",
"",NULL);
2260 tolua_beginmodule(tolua_S,
"NavGraph");
2261 tolua_function(tolua_S,
"new",tolua_fawkesnavgraph_fawkes_NavGraph_new00);
2262 tolua_function(tolua_S,
"new_local",tolua_fawkesnavgraph_fawkes_NavGraph_new00_local);
2263 tolua_function(tolua_S,
".call",tolua_fawkesnavgraph_fawkes_NavGraph_new00_local);
2264 tolua_function(tolua_S,
"delete",tolua_fawkesnavgraph_fawkes_NavGraph_delete00);
2265 tolua_function(tolua_S,
"name",tolua_fawkesnavgraph_fawkes_NavGraph_name00);
2266 tolua_function(tolua_S,
"nodes",tolua_fawkesnavgraph_fawkes_NavGraph_nodes00);
2267 tolua_function(tolua_S,
"node",tolua_fawkesnavgraph_fawkes_NavGraph_node00);
2268 tolua_function(tolua_S,
"closest_node",tolua_fawkesnavgraph_fawkes_NavGraph_closest_node00);
2269 tolua_function(tolua_S,
"closest_node_to",tolua_fawkesnavgraph_fawkes_NavGraph_closest_node_to00);
2270 tolua_function(tolua_S,
"closest_node_with_unconnected",tolua_fawkesnavgraph_fawkes_NavGraph_closest_node_with_unconnected00);
2271 tolua_function(tolua_S,
"closest_node_to_with_unconnected",tolua_fawkesnavgraph_fawkes_NavGraph_closest_node_to_with_unconnected00);
2272 tolua_function(tolua_S,
"search_nodes",tolua_fawkesnavgraph_fawkes_NavGraph_search_nodes00);
2273 tolua_function(tolua_S,
"default_property",tolua_fawkesnavgraph_fawkes_NavGraph_default_property00);
2274 tolua_function(tolua_S,
"default_property_as_float",tolua_fawkesnavgraph_fawkes_NavGraph_default_property_as_float00);
2275 tolua_function(tolua_S,
"default_property_as_int",tolua_fawkesnavgraph_fawkes_NavGraph_default_property_as_int00);
2276 tolua_function(tolua_S,
"default_property_as_bool",tolua_fawkesnavgraph_fawkes_NavGraph_default_property_as_bool00);
2277 tolua_endmodule(tolua_S);
2278 tolua_function(tolua_S,
"load_yaml_navgraph",tolua_fawkesnavgraph_fawkes_load_yaml_navgraph00);
2279 tolua_endmodule(tolua_S);
2281 tolua_cclass(tolua_S,
"vector_string_",
"vector<string>",
"",tolua_collect_vector_string_);
2283 tolua_cclass(tolua_S,
"vector_string_",
"vector<string>",
"",NULL);
2285 tolua_beginmodule(tolua_S,
"vector_string_");
2286 tolua_function(tolua_S,
"clear",tolua_fawkesnavgraph_vector_string__clear00);
2287 tolua_function(tolua_S,
"size",tolua_fawkesnavgraph_vector_string__size00);
2288 tolua_function(tolua_S,
".geti",tolua_fawkesnavgraph_vector_string___geti00);
2289 tolua_function(tolua_S,
".seti",tolua_fawkesnavgraph_vector_string___seti00);
2290 tolua_function(tolua_S,
".geti",tolua_fawkesnavgraph_vector_string___geti01);
2291 tolua_function(tolua_S,
"push_back",tolua_fawkesnavgraph_vector_string__push_back00);
2292 tolua_function(tolua_S,
"new",tolua_fawkesnavgraph_vector_string__new00);
2293 tolua_function(tolua_S,
"new_local",tolua_fawkesnavgraph_vector_string__new00_local);
2294 tolua_function(tolua_S,
".call",tolua_fawkesnavgraph_vector_string__new00_local);
2295 tolua_function(tolua_S,
"delete",tolua_fawkesnavgraph_vector_string__delete00);
2296 tolua_endmodule(tolua_S);
2298 tolua_cclass(tolua_S,
"vector_fawkes__NavGraphNode_",
"vector<fawkes::NavGraphNode>",
"",tolua_collect_vector_fawkes__NavGraphNode_);
2300 tolua_cclass(tolua_S,
"vector_fawkes__NavGraphNode_",
"vector<fawkes::NavGraphNode>",
"",NULL);
2302 tolua_beginmodule(tolua_S,
"vector_fawkes__NavGraphNode_");
2303 tolua_function(tolua_S,
"clear",tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__clear00);
2304 tolua_function(tolua_S,
"size",tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__size00);
2305 tolua_function(tolua_S,
".geti",tolua_fawkesnavgraph_vector_fawkes__NavGraphNode___geti00);
2306 tolua_function(tolua_S,
".seti",tolua_fawkesnavgraph_vector_fawkes__NavGraphNode___seti00);
2307 tolua_function(tolua_S,
".geti",tolua_fawkesnavgraph_vector_fawkes__NavGraphNode___geti01);
2308 tolua_function(tolua_S,
"push_back",tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__push_back00);
2309 tolua_function(tolua_S,
"new",tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__new00);
2310 tolua_function(tolua_S,
"new_local",tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__new00_local);
2311 tolua_function(tolua_S,
".call",tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__new00_local);
2312 tolua_function(tolua_S,
"delete",tolua_fawkesnavgraph_vector_fawkes__NavGraphNode__delete00);
2313 tolua_endmodule(tolua_S);
2314 tolua_module(tolua_S,
"fawkes",0);
2315 tolua_beginmodule(tolua_S,
"fawkes");
2317 tolua_cclass(tolua_S,
"NavGraphNode",
"fawkes::NavGraphNode",
"",tolua_collect_fawkes__NavGraphNode);
2319 tolua_cclass(tolua_S,
"NavGraphNode",
"fawkes::NavGraphNode",
"",NULL);
2321 tolua_beginmodule(tolua_S,
"NavGraphNode");
2322 tolua_function(tolua_S,
"new",tolua_fawkesnavgraph_fawkes_NavGraphNode_new00);
2323 tolua_function(tolua_S,
"new_local",tolua_fawkesnavgraph_fawkes_NavGraphNode_new00_local);
2324 tolua_function(tolua_S,
".call",tolua_fawkesnavgraph_fawkes_NavGraphNode_new00_local);
2325 tolua_function(tolua_S,
"new",tolua_fawkesnavgraph_fawkes_NavGraphNode_new01);
2326 tolua_function(tolua_S,
"new_local",tolua_fawkesnavgraph_fawkes_NavGraphNode_new01_local);
2327 tolua_function(tolua_S,
".call",tolua_fawkesnavgraph_fawkes_NavGraphNode_new01_local);
2328 tolua_function(tolua_S,
"name",tolua_fawkesnavgraph_fawkes_NavGraphNode_name00);
2329 tolua_function(tolua_S,
"x",tolua_fawkesnavgraph_fawkes_NavGraphNode_x00);
2330 tolua_function(tolua_S,
"y",tolua_fawkesnavgraph_fawkes_NavGraphNode_y00);
2331 tolua_function(tolua_S,
"is_valid",tolua_fawkesnavgraph_fawkes_NavGraphNode_is_valid00);
2332 tolua_function(tolua_S,
"reachable_nodes",tolua_fawkesnavgraph_fawkes_NavGraphNode_reachable_nodes00);
2333 tolua_function(tolua_S,
"has_property",tolua_fawkesnavgraph_fawkes_NavGraphNode_has_property00);
2334 tolua_function(tolua_S,
"property_as_float",tolua_fawkesnavgraph_fawkes_NavGraphNode_property_as_float00);
2335 tolua_function(tolua_S,
"property_as_int",tolua_fawkesnavgraph_fawkes_NavGraphNode_property_as_int00);
2336 tolua_function(tolua_S,
"property_as_bool",tolua_fawkesnavgraph_fawkes_NavGraphNode_property_as_bool00);
2337 tolua_endmodule(tolua_S);
2338 tolua_endmodule(tolua_S);
2339 tolua_endmodule(tolua_S);
2345#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
2346 TOLUA_API
int luaopen_fawkesnavgraph (lua_State* tolua_S) {
2347 return tolua_fawkesnavgraph_open(tolua_S);
Base class for exceptions in Fawkes.
virtual const char * what_no_backtrace() const noexcept
Get primary string (does not implicitly print the back trace).
float x() const
Get X coordinate in global frame.
bool property_as_bool(const std::string &prop) const
Get property converted to bol.
bool is_valid() const
Check if node is valid, i.e.
int property_as_int(const std::string &prop) const
Get property converted to int.
const std::string & name() const
Get name of node.
float property_as_float(const std::string &prop) const
Get property converted to float.
bool has_property(const std::string &property) const
Check if node has specified property.
float y() const
Get Y coordinate in global frame.
const std::vector< std::string > & reachable_nodes() const
Get reachable nodes.
NavGraphNode closest_node_to_with_unconnected(const std::string &node_name, const std::string &property="") const
Get node closest to another node with a certain property.
NavGraphNode closest_node_with_unconnected(float pos_x, float pos_y, const std::string &property="") const
Get node closest to a specified point with a certain property.
bool default_property_as_bool(const std::string &prop) const
Get property converted to bol.
std::string default_property(const std::string &prop) const
Get specified default property as string.
NavGraphNode closest_node(float pos_x, float pos_y, const std::string &property="") const
Get node closest to a specified point with a certain property.
std::vector< NavGraphNode > search_nodes(const std::string &property) const
Search nodes for given property.
int default_property_as_int(const std::string &prop) const
Get property converted to int.
const std::vector< NavGraphNode > & nodes() const
Get nodes of the graph.
float default_property_as_float(const std::string &prop) const
Get property converted to float.
NavGraphNode node(const std::string &name) const
Get a specified node.
std::string name() const
Get graph name.
NavGraphNode closest_node_to(const std::string &node_name, const std::string &property="") const
Get node closest to another node with a certain property.
Fawkes library namespace.
NavGraph * load_yaml_navgraph(std::string filename, bool allow_multi_graph)
Load topological map graph stored in RCSoft format.