|
|
Go to the documentation of this file.
25#ifndef FAUDES_MUTE_LUA
56typedef void *(*swig_converter_func)( void *, int *);
94 if(iter-> type == from) {
95 if(iter == ty-> cast) break;
119 if(!lua_isuserdata(L,index)) return NULL;
121 if(!lua_getmetatable(L,index)) return NULL;
123 lua_pushstring(L, ".type");
125 if(!lua_isstring(L,-1)) { lua_pop(L,2); return NULL;};
126 const char* ftype = lua_tostring(L,-1);
127 if(!ftype) {lua_pop(L,2); return NULL;};
151 while(src<res.length()) {
152 if(isalnum(res.at(src))) {res[dst++]=res[src++]; continue;}
154 for(;src<res.length();src++)
155 if(isalnum(res.at(src))) break;
186 FD_DLB( "LuaFunctionDefinition::LuaFunctionDefinition("<< this<< "): name " << name);
187 FD_DLB( "LuaFunctionDefinition::LuaFunctionDefinition("<< this<< "): proto " << mpFunction);
188 FD_DLB( "LuaFunctionDefinition::LuaFunctionDefinition("<< this<< "): has def " << mpFunction->Definition());
196 FD_DLB( "LuaFunctionDefinition::LuaFunctionDefinition(copy)");
202 FD_DLB( "LuaFunctionDefinition::DoCopy()");
211 FD_DLB( "LuaFunctionDefinition::DoCopy("<< this<< "): name " << mName);
228 FD_DLB( "LuaFunctionDefinition::Clear(): " << Name());
269 FD_DLB( "LuaFunctionDefinition::SyntaxCheck(): no variants defined, evaluate");
275 std::string err = "";
279 FD_DLB( "LuaFunctionDefinition::SyntaxCheck(): variant " <<
294 err = "cannot allocate parameters for variant " + lfnct-> Variant()->Name();
309 std::string err = "";
328 FD_DLB( "LuaFunctionDefinition::Install(): " << Name());
332 FD_DLB( "LuaFunctionDefinition::Install(): no signatures for fnct " << Name());
337 std::string lfname = Name();
339 size_t pos= CType().find( "faudes::");
340 if(pos!=std::string::npos)
341 lfname= CType().substr(std::string( "faudes::").length());
345 std::vector< std::string > lffnct;
346 std::vector< int > lfparcnt;
347 std::vector< std::vector<std::string> > lfparams;
348 std::vector< std::vector<Parameter::ParamAttr> > lfattrib;
349 std::vector< std::vector<bool> > lfretval;
350 std::vector< std::vector<bool> > lfparval;
360 for( int j=0; j<sigi. Size(); j++) {
362 std::string ftype=sigi. At(j). Type();
390 lfparams.at(i).push_back(ftype);
391 lfattrib.at(i).push_back(fattr);
392 lfretval.at(i).push_back(fcret);
393 lfparval.at(i).push_back(fcpar);
396 if(( int) lfparams.at(i).size()!=sigi. Size()) {
397 FD_WARN( "LuaFunctionDefinition::Install(): cannot interpret signature \"" << sigi. Name() << "\"");
403 lfparcnt.at(i)=parcnt;
405 FD_DLB( "LuaFunctionDefinition::Install(): #" << lffnct.size() << " valid signatures");
409 std::vector< std::string > lftest1;
410 std::vector< std::string > lftest2;
411 std::vector< std::string > lfcall;
412 std::vector< std::string > lfsig;
413 for( unsigned int i=0; i<lffnct.size(); i++) {
417 for( unsigned int j=0; j<lfparams.at(i).size(); j++) {
418 if(!lfparval.at(i).at(j)) continue;
421 std::string ltype= "userdata";
422 if(lfparams.at(i).at(j) == "Integer") ltype= "number";
423 if(lfparams.at(i).at(j) == "Boolean") ltype= "bool";
424 if(lfparams.at(i).at(j) == "String") ltype= "string";
425 test1=test1 + "(type(arg[" + ToStringInteger(pj) + "])=='" + ltype + "')";
427 lftest1.push_back(test1);
429 std::string test2= "";
431 for( unsigned int j=0; j<lfparams.at(i).size(); j++) {
432 if(!lfparval.at(i).at(j)) continue;
434 if(lfparams.at(i).at(j) == "Integer") continue;
435 if(lfparams.at(i).at(j) == "Boolean") continue;
436 if(lfparams.at(i).at(j) == "String") continue;
437 if(test2.size()>0) test2=test2+ " and ";
438 test2=test2 + "faudes.TypeTest(\"" + lfparams.at(i).at(j) + "\", arg[" + ToStringInteger(pj) + "])";
440 lftest2.push_back(test2);
442 std::string call= lffnct.at(i) + "(";
444 for( unsigned int j=0; j<lfparams.at(i).size(); j++) {
445 if(!lfparval.at(i).at(j)) continue;
447 if(pj>1) call = call + ", ";
451 lfcall.push_back(call);
453 std::string nsig = " " + lfname + "(";
454 bool leftcomma = false;
455 bool rightcomma = false;
456 for( unsigned int j=0; j<lfparams.at(i).size(); j++) {
458 if(lfretval.at(i).at(j)) {
459 if(leftcomma) nsig = "," + nsig;
460 nsig=lfparams.at(i).at(j) + nsig;
464 if(lfparval.at(i).at(j)) {
465 if(rightcomma) nsig += ", ";
467 nsig += sigi. At(j). Str();
472 lfsig.push_back(nsig);
477 for( unsigned int i=0; i< lfsig.size(); i++) {
478 std::string topic= PlugIn();
480 if(topic.length()>0) topic.at(0)=toupper(topic.at(0));
481 if(key1.length()>0) key1.at(0)=toupper(key1.at(0));
488 std::stringstream lfwrap;
489 lfwrap << "-- LuaFunctionDefinition.Install() " << Name() << std::endl;
494 lfwrap << "-- LuaFunctionDefinition.Install(): dispatch / typecheck" << std::endl;
495 lfwrap << "function faudes." << lfname << "(...)" << std::endl;
496 lfwrap << " local arg = {...}" << std::endl;
497 lfwrap << " local argn = #arg" << std::endl;
498 for( unsigned int i=0; i< lftest1.size(); i++) {
499 lfwrap << " if (" << lftest1.at(i) << ") then " << std::endl;
500 lfwrap << " if (" << lftest2.at(i) << ") then " << std::endl;
501 lfwrap << " return faudes." << lfcall.at(i) << std::endl;
502 lfwrap << " end" << std::endl;
503 lfwrap << " end" << std::endl;
505 lfwrap << " faudes.Error([[" << lfname << ": parameter mismatch: expected signature(s): " << std::endl;
506 for( unsigned int i=0; i< lfsig.size(); i++) {
507 lfwrap << lfsig.at(i) << std::endl;
509 lfwrap << "]])" << std::endl;
510 lfwrap << "end" << std::endl;
514 FD_DLB( "LuaFunctionDefinition:Install(): code:" << std::endl << lfwrap.str());
515 FD_DLB( "LuaFunctionDefinition:Install(): code: done");
518 int errexec=luaL_dostring(pLL,lfwrap.str().c_str());
520 std::string lerr= std::string(lua_tostring(pLL, -1));
521 int c1 = lerr.find_first_of( ':');
523 int c2 = lerr.find_first_of( ':',c1+1);
525 std::string line = lerr.substr(c1+1,c2-c1-1);
527 lerr= "error in Lua script: line " + line + ": " + lerr.substr(c2+2);
529 throw Exception( "LuaFunctionDefinition::Install(): " + Name(), lerr, 49);
535 FD_DLB( "LuaFunctionDefinition::DoRead()");
539 std::string label=rLabel;
540 if(label== "") label= "LuaFunctionDefinition";
550 FD_DLB( "LuaFunctionDefinition::Register(): file " << rFilename);
553 while(tr. Peek(token)) {
554 if(!token. IsBegin( "LuaFunctionDefinition")) {
560 FD_DLB( "LuaFunctionDefinition::Register(): found " << plfd-> Name());
562 FD_DLB( "LuaFunctionDefinition::Register(): skipping doublet " << plfd-> Name());
574 FD_DLB( "LuaFunctionDefinition::DoReadCore()");
600 std::string label=rLabel;
601 if(label== "") label= "LuaFunctionDefinition";
608 FD_DLB( "LuaFunctionDefinition::DoWriteCore(): file " << rTw. FileName());
681 FD_DLB( "LuaFunction::DoTypeCheck("<< n << "): unknown type");
685 FD_DLB( "LuaFunction::DoTypeCheck("<< n << "): could not cast param value");
706 FD_DLB( "LuaFunction::DoExecute()");
725 FD_DLB( "LuaFunction::DoExecute(): done");
730 FD_DLB( "LuaFunction::SyntaxCheck()");
732 std::stringstream errstr;
733 errstr << "no valid variant";
734 throw Exception( "LuaFunction::Syntaxcheck()", errstr.str(), 47);
745 FD_DLB( "LuaFunction::SyntaxCheck(): done");
750 FD_DLB( "LuaFunction::SyntaxCheck()");
759 FD_DLB( "LuaFunction::SyntaxCheck(): done");
764 FD_DLB( "LuaFunction::DoExecuteA()");
769 int errload=luaL_loadbuffer( pLL, script, script_len, "luafaudes");
771 std::string lerr= std::string(lua_tostring( pLL, -1));
772 int c1 = lerr.find_first_of( ':');
774 int c2 = lerr.find_first_of( ':',c1+1);
776 std::string line = lerr.substr(c1+1,c2-c1-1);
778 lerr= "error in Lua script: line " + line + ": " + lerr.substr(c2+2);
781 throw Exception( "LuaFunction::DoExecuteA()", lerr, 49);
785 int errrun=lua_pcall( pLL, 0, 0, 0);
787 std::stringstream errstr;
788 errstr << "failed to run script: ";
789 errstr << std::string(lua_tostring( pLL, -1));
791 throw Exception( "LuaFunction::DoExecuteA()", errstr.str(), 49);
798 FD_DLB( "LuaFunction::DoExecuteB()");
801 lua_getglobal( pLL, "faudes");
803 if(!lua_istable( pLL,-1)) {
805 throw Exception( "LuaFunction::DoExecuteB()", "failed to load faudes table", 49);
810 lua_pushstring( pLL,fname.c_str());
812 if(!lua_isfunction( pLL,-1)) {
814 lua_getglobal( pLL,fname.c_str());
815 if(!lua_isfunction( pLL,-1)) {
816 std::stringstream errstr;
817 errstr << "missing function \"" << fname << "\"";
819 throw Exception( "LuaFunction::DoExecuteB()", errstr.str(), 49);
824 lua_pushstring( pLL, "Type");
826 if(!lua_isfunction( pLL,-1))
827 if(!lua_istable( pLL,-1)) {
829 throw Exception( "LuaFunction::DoExecuteB():", "failed to construct plain Type (1)", 49);
832 if(lua_pcall( pLL, 0, 1, 0) != 0) {
834 throw Exception( "LuaFunction::DoExecuteB():", "failed to construct plain Type (2)", 49);
840 throw Exception( "LuaFunction::DoExecuteB():", "failed to construct plain Type (3)", 49);
842 FD_DLB( "LuaFunction::DoExecuteB(): plain type is " << susr-> type-> name);
853 FD_DLB( "LuaFunction::DoExecuteC()");
867 if((ftype== "Integer") || (ftype== "Boolean") || (ftype== "String")) {
897 FD_DLB( "LuaFunction::DoExecuteC(): skip nonparameter value pos " << i);
901 if(ftype== "Integer") {
903 FD_DLB( "LuaFunction::DoExecuteC(): created ftype " << ftype);
907 if(ftype== "Boolean") {
909 FD_DLB( "LuaFunction::DoExecuteC(): created ftype " << ftype);
913 if(ftype== "String") {
915 FD_DLB( "LuaFunction::DoExecuteC(): created ftype " << ftype);
919 lua_pushstring( pLL,ftype.c_str());
921 if(!lua_isfunction( pLL,-1))
922 if(!lua_istable( pLL,-1)) {
923 std::stringstream errstr;
924 errstr << "failed to load constructor for \"" << ftype << "\"";
926 throw Exception( "LuaFunction::DoExecuteC()", errstr.str(), 49);
929 if(lua_pcall( pLL, 0, 1, 0) != 0) {
930 std::stringstream errstr;
931 errstr << "failed to construct for \"" << ftype << "\" (1)";
933 throw Exception( "LuaFunction::DoExecuteC()", errstr.str(), 49);
938 std::stringstream errstr;
939 errstr << "failed to construct for\"" << ftype << "\" (2)";
941 throw Exception( "LuaFunction::DoExecuteB()", errstr.str(), 49);
944 FD_DLB( "LuaFunction::DoExecuteC(): created stype " << susr-> type-> name << " for ftype " << ftype);
946 FD_DLB( "LuaFunction::DoExecuteC(): swig usrdata ptr " << susr-> ptr);
947 FD_DLB( "LuaFunction::DoExecuteC(): swig usrdata own flag " << susr-> own);
958 if(susr-> own) free(susr-> ptr);
963 FD_DLB( "LuaFunction::DoExecuteC(): done");
968 FD_DLB( "LuaFunction::DoExecuteD()");
974 int t2=lua_gettop( pLL);
975 for( int i= t1; i<=t2; i++) {
976 lua_pushvalue( pLL,i);
977#ifdef FAUDES_DEBUG_LUABINDINGS
982 FD_DLB( "LuaFunction::DoExecuteD(): inspect stype " << susr-> type-> name);
983 FD_DLB( "LuaFunction::DoExecuteD(): swig usrdata ptr " << susr-> ptr);
984 FD_DLB( "LuaFunction::DoExecuteD(): swig usrdata own flag " << susr-> own);
986 FD_DLB( "LuaFunction::DoExecuteD(): faudes::Type converted ptr " << fptr);
992 FD_DLB( "LuaFunction::DoExecuteD(): detect error");
993 std::string lerr= std::string(lua_tostring( pLL, -1));
995 if(lerr.find( "break on application request")!=std::string::npos) {
996 lerr= "break on application request";
999 else if(lerr.find( "luafaudes script:")!=std::string::npos) {
1000 std::size_t c1=lerr.find( "luafaudes script:");
1001 lerr=lerr.substr(c1);
1004 else if(lerr.size()>=2) {
1005 std::size_t c1 = lerr.find_first_of( ':');
1006 if(c1==std::string::npos) c1=0;
1007 if(c1+1>=lerr.size()) c1=0;
1008 std::size_t c2 = lerr.find_first_of( ':',c1+1);
1009 if(c2==std::string::npos) c2=c1+1;
1011 std::string line = lerr.substr(c1+1,c2-c1-1);
1012 lerr= "error in Lua script: line " + line + ": " + lerr.substr(c2+2);
1017 throw Exception( "LuaFunction::DoExecuteD()", lerr, 49);
1019 FD_DLB( "LuaFunction::DoExecuteD():done ");
1025 FD_DLB( "LuaFunction::DoExecuteE()");
1028 for( int i= Variant()->Size()-1; i>=0; i--) {
1034 if(ftype== "Integer" && lua_isnumber( pLL,-1)) {
1035 FD_DLB( "LuaFunction::DoExecuteE(): retrieve type " << ftype);
1041 if(ftype== "Boolean" && lua_isboolean( pLL,-1)) {
1043 FD_DLB( "LuaFunction::DoExecuteE(): retrieved type " << ftype);
1048 if(ftype== "String" && lua_isstring( pLL,-1)) {
1050 FD_DLB( "LuaFunction::DoExecuteE(): retrieved type " << ftype);
1055 std::stringstream errstr;
1056 errstr << "invalid return values in \"" << Variant()-> Name() << "\"";
1058 throw Exception( "LuaFunction::DoExecuteE()", errstr.str(), 49);
1106 for( int i= Variant()->Size()-1; i>=0; i--) {
1167 FD_DLB( "LuaState::Open()");
1168 mpLL=luaL_newstate();
1172 FD_DLB( "LuaState::Done()");
1178 FD_DLB( "LuaState::Close()");
1185 lua_gc(pLL, LUA_GCSTOP, 0);
1187 luaopen_faudes_allplugins(pLL);
1188 lua_gc(pLL, LUA_GCRESTART, 0);
1195 FD_DLB( "LuaState::Insatll(): file " << rFilename);
1198 while(tr. Peek(token)) {
1200 if(!token. IsBegin( "LuaFunctionDefinition")) {
1206 FD_DLB( "LuaState::Install(): found " << lfd. Name());
1218 FD_DLB( "LuaFunction::Push()");
1219 int savetop=lua_gettop(pLL);
1222 lua_getglobal(pLL, "faudes");
1223 int ftable=lua_gettop(pLL);
1224 if(!lua_istable(pLL,-1)) {
1225 lua_settop(pLL,savetop);
1226 throw Exception( "LuaState::Push()", "failed to load faudes table", 49);
1229 lua_pushstring(pLL, "Type");
1230 lua_gettable(pLL,ftable);
1231 if(!lua_isfunction(pLL,-1))
1232 if(!lua_istable(pLL,-1)) {
1233 lua_settop(pLL,savetop);
1234 throw Exception( "LuaState::Push()", "failed to construct plain Type (1)", 49);
1237 if(lua_pcall(pLL, 0, 1, 0) != 0) {
1238 lua_settop(pLL,savetop);
1239 throw Exception( "LuaState::Push()", "failed to construct plain Type (2)", 49);
1244 lua_settop(pLL,savetop);
1245 throw Exception( "LuaState::Push()", "failed to construct plain Type (3)", 49);
1255 if(ftype== "Integer") {
1256 lua_pushnumber(pLL,(( const Integer&)*fdata));
1257 FD_DLB( "LuaState::Push(): created ftype " << ftype);
1260 else if(ftype== "Boolean") {
1261 lua_pushboolean(pLL,(( const Boolean&)*fdata));
1262 FD_DLB( "LuaState::Push(): created ftype " << ftype);
1265 else if(ftype== "String") {
1266 lua_pushstring(pLL,(( const String&)*fdata).CValue().c_str());
1267 FD_DLB( "LuaState::Push(): created ftype " << ftype);
1272 lua_pushstring(pLL,ftype.c_str());
1273 lua_gettable(pLL,ftable);
1274 if(!lua_isfunction(pLL,-1))
1275 if(!lua_istable(pLL,-1)) {
1276 std::stringstream errstr;
1277 errstr << "failed to load constructor for \"" << ftype << "\"";
1278 lua_settop(pLL,savetop);
1279 throw Exception( "LuaState::Push()", errstr.str(), 49);
1282 if(lua_pcall(pLL, 0, 1, 0) != 0) {
1283 std::stringstream errstr;
1284 errstr << "failed to construct for \"" << ftype << "\" (1)";
1285 lua_settop(pLL,savetop);
1286 throw Exception( "LuaState::Push()", errstr.str(), 49);
1291 std::stringstream errstr;
1292 errstr << "failed to construct for\"" << ftype << "\" (2)";
1293 lua_settop(pLL,savetop);
1294 throw Exception( "LuaState::Push()", errstr.str(), 49);
1297 FD_DLB( "LuaState::Push(): created stype " << susr-> type-> name << " for ftype " << ftype);
1298 FD_DLB( "LuaState::Push(): faudes parameter at " << fdata);
1299 FD_DLB( "LuaState::Push(): swig usrdata ptr " << susr-> ptr);
1300 FD_DLB( "LuaState::Push(): swig usrdata own flag " << susr-> own);
1303 FD_DLB( "LuaState::Push(): faudes plain Type converted ptr " << fptr);
1305 std::stringstream errstr;
1306 errstr << "failed cast from " << ftype;
1307 lua_settop(pLL,savetop);
1308 throw Exception( "LuaState::Push()", errstr.str(), 49);
1310 (( Type*)fptr)->Copy(*fdata);
1313 lua_replace(pLL,-2);
1314 FD_DLB( "LuaFunction::DoExecuteB(): done");
1324 FD_DLB( "LuaFunction::Pop()");
1325 int savetop=lua_gettop(pLL);
1329 if(lua_isnumber(pLL,-1)) {
1330 res= new Integer(lua_tointeger(pLL,-1));
1335 if(lua_isstring(pLL,-1)) {
1336 res= new String(lua_tostring(pLL,-1));
1341 if(lua_isboolean(pLL,-1)) {
1342 res= new Boolean(lua_toboolean(pLL,-1));
1348 lua_getglobal(pLL, "faudes");
1349 int ftable=lua_gettop(pLL);
1350 if(!lua_istable(pLL,-1)) {
1351 lua_settop(pLL,savetop);
1352 throw Exception( "LuaState::Pop()", "failed to load faudes table", 49);
1356 lua_pushstring(pLL, "Type");
1357 lua_gettable(pLL,ftable);
1358 if(!lua_isfunction(pLL,-1))
1359 if(!lua_istable(pLL,-1)) {
1360 lua_settop(pLL,savetop);
1361 throw Exception( "LuaState::Pop()", "failed to construct plain Type (1)", 49);
1364 if(lua_pcall(pLL, 0, 1, 0) != 0) {
1365 lua_settop(pLL,savetop);
1366 throw Exception( "LuaState::Pop()", "failed to construct plain Type (2)", 49);
1371 lua_settop(pLL,savetop);
1372 throw Exception( "LuaState::Pop()", "failed to construct plain Type (3)", 49);
1382 std::stringstream errstr;
1383 errstr << "unknown data type";
1384 lua_settop(pLL,savetop);
1385 throw Exception( "LuaState::Pop()", errstr.str(), 49);
1389 FD_DLB( "LuaState::Pop(): swig usrdata ptr " << susr-> ptr);
1391 FD_DLB( "LuaState::Pop(): faudes::Type converted ptr " << fptr);
1393 std::stringstream errstr;
1394 errstr << "faild to cast stype \"" << susr-> type-> name << "\" to plain Type";
1395 lua_settop(pLL,savetop);
1396 throw Exception( "LuaState::Pop()", errstr.str(), 49);
1402 FD_DLB( "LuaFunction::Pop(): done");
1415 lua_getglobal(pLL,gname.c_str());
1421 lua_setglobal(pLL,gname.c_str());
1434 FD_DLB( "LuaFunction::Evaluate()");
1437 int top = lua_gettop(pLL);
1442 if(luaL_loadbuffer(pLL, expr.c_str(), expr.size(), "string")) {
1443 cerr=std::string(lua_tostring(pLL, -1));
1449 if(lua_pcall(pLL, 0, LUA_MULTRET, 0)){
1450 cerr=std::string(lua_tostring(pLL, -1));
1455 lua_settop(pLL,top);
1456 lua_gc(pLL, LUA_GCCOLLECT, 0);
1460 lua_settop(pLL,top);
1461 throw Exception( "LuaState::Evaluate()", cerr, 49);
1475 FD_DLB( "LuaFunction::Complete(" << word << ")");
#define FAUDES_TYPE_IMPLEMENTATION(ftype, ctype, cbase)
const std::string & Name(void) const
std::string KeywordAt(int pos) const
const std::string & PlugIn(void) const
virtual void DoWrite(TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
const std::string & TextDoc(void) const
const std::string & CType(void) const
virtual const char * What() const
const Signature & Variant(const std::string &rName) const
int VariantsSize(void) const
const Function * Prototype(void) const
virtual void DoRead(TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
virtual void DoReadCore(TokenReader &rTr)
bool DoEqual(const FunctionDefinition &rOther) const
virtual void DoWriteCore(TokenWriter &rTw) const
void DoCopy(const FunctionDefinition &rSrc)
static FunctionRegistry * G()
std::map< std::string, FunctionDefinition * >::const_iterator Iterator
void Insert(FunctionDefinition *pFunctionDef)
Iterator Begin(void) const
virtual void Definition(const FunctionDefinition *fdef)
const FunctionDefinition * pFuncDef
const Signature * Variant(void) const
const FunctionDefinition * Definition(void) const
void AllocateValues(void)
virtual void DoVariant(int n)
std::vector< Type * > mParameterValues
void ParamValue(int n, Type *param)
int VariantsSize(void) const
void Install(LuaState *pL=NULL) const
virtual void DoRead(TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
virtual void DoReadCore(TokenReader &rTr)
virtual void DoWrite(TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
virtual void DoCopy(const LuaFunctionDefinition &rSrc)
std::string SyntaxCheck(void)
static void Register(const std::string &rFilename)
LuaState * DefaultL(void) const
LuaFunction * pLuaFunction
std::string Evaluate(LuaState *pL=NULL)
void DefaultL(LuaState *pL)
LuaFunctionDefinition(const std::string &name="")
const std::string & LuaCode(void) const
virtual bool DoEqual(const LuaFunctionDefinition &rOther) const
virtual void DoWriteCore(TokenWriter &rTw) const
std::vector< bool > mLParameter
LuaFunction(const LuaFunctionDefinition *fdef)
virtual void DoExecuteE()
virtual void DoExecuteA()
virtual void DoExecuteC()
virtual LuaFunction * New() const
const LuaFunctionDefinition * pLuaFuncDef
std::vector< bool > mLReturn
virtual void DoExecuteB()
virtual void DoExecuteD()
virtual bool DoTypeCheck(int n)
const LuaFunctionDefinition * Definition(void) const
virtual void DoVariant(int n)
void Install(const std::string &rFilename)
void Evaluate(const std::string &expr)
static void Initialize(lua_State *pLL)
std::list< std::string > Complete(const std::string &word)
void Push(const Type *fdata)
static LuaState * G(void)
Type * Global(const std::string &gname, const Type *fdata=0)
std::string Str(void) const
const std::string & Type(void) const
const ParamAttr & Attribute(void) const
const std::string & Name(void) const
const Parameter & At(int n) const
void ReadVerbatim(const std::string &rLabel, std::string &rText)
void ReadEnd(const std::string &rLabel)
std::string ReadString(void)
void ReadBegin(const std::string &rLabel)
std::string FileName(void) const
void WriteString(const std::string &rString)
void WriteEnd(const std::string &rLabel)
void WriteVerbatim(Token &rBeginTag, const std::string &rText)
void WriteBegin(const std::string &rLabel)
const std::string & StringValue(void) const
const Type * Prototype(const std::string &rTypeName) const
static TypeRegistry * G()
virtual Type * NewCpy(void) const
void Read(const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
virtual const std::string & Name(void) const
virtual const Type * Cast(const Type *pOther) const
const std::string & FaudesTypeName(const Type &rObject)
static std::list< std::string > faudes_rl_complete(lua_State *L, const std::string &word)
void *(* swig_converter_func)(void *, int *)
void faudes_hook_register(lua_State *L)
struct swig_type_info *(* swig_dycast_func)(void **)
swig_lua_userdata * SwigUserData(lua_State *L, int index)
void * SwigCastPtr(void *ptr, swig_type_info *from, swig_type_info *ty)
void faudes_dict_insert_entry(const std::string &topic, const std::string &key, const std::string &entry)
std::string ToStringInteger(Int number)
void faudes_print_register(lua_State *L)
std::string MangleString(const std::string &str)
swig_converter_func converter
struct swig_cast_info * prev
struct swig_cast_info * next
struct swig_cast_info * cast
libFAUDES 2.34d
--- 2026.03.11
--- c++ api documentaion by doxygen
|