libluafaudes.hGo to the documentation of this file.00001 /** @file libluafaudes.h Includes all libluafaudes headers, incl lua */ 00002 00003 /* FAU Discrete Event Systems Library (libfaudes) 00004 00005 Copyright (C) 2008 Thomas Moor 00006 Exclusive copyright is granted to Klaus Schmidt 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Lesser General Public 00010 License as published by the Free Software Foundation; either 00011 version 2.1 of the License, or (at your option) any later version. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public 00019 License along with this library; if not, write to the Free Software 00020 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 00021 00022 00023 #ifndef FAUDES_LIBLUAFAUDES_H 00024 #define FAUDES_LIBLUAFAUDES_H 00025 00026 00027 // lua essentials 00028 #define lua_c 00029 00030 // lua essentials 00031 extern "C" { 00032 #include "lua/lua.h" 00033 #include "lua/lauxlib.h" 00034 #include "lua/lualib.h" 00035 } 00036 00037 00038 // std streams for console logging 00039 #include <iostream> 00040 #include <fstream> 00041 #include <sstream> 00042 #include <string> 00043 00044 // c libs since we dont use lua.h 00045 #include <csignal> 00046 #include <cstdio> 00047 #include <cstdlib> 00048 #include <cstring> 00049 00050 // luafaudes: include faudes plus lua addons 00051 #include "corefaudes.h" 00052 #include "lbp_function.h" 00053 00054 // include declarations for SWIG generated module loaders 00055 #include "lbp_load.h" 00056 00057 // overall loader to initialize kernel 00058 extern void luafaudes_initialize(lua_State* pL); 00059 00060 // luafaudes: logging externals, defined in commonfaudes.i 00061 extern std::ofstream* luafaudes_logstream; 00062 extern std::string luafaudes_lastline; 00063 extern void luafaudes_logwrite(const char* str); 00064 extern void luafaudes_logwrite(const std::string& str); 00065 00066 // luafaudes: mute faudes console out, see commonfaudes.i 00067 extern void luafaudes_mute(bool on); 00068 00069 // luafaudes: register faudes console variant for print, see commonfaudes.i 00070 extern void luafaudes_print_register(lua_State* L); 00071 00072 // luafaudes interface to completer, see commonfaudes.i 00073 extern char **luafaudes_complete(lua_State* pL, const char *text, int start, int end); 00074 00075 // luafaudes: register faudes LoopCallback() as line hook, see commonfaudes.i 00076 extern void luafaudes_hook_register(lua_State* L); 00077 00078 // luafaudes: dot test external, see commonfaudes.i 00079 extern bool luafaudes_dotready(void); 00080 00081 // luafaudes: help system, see commonfaudes.i 00082 extern void luafaudes_dict_insert_topic(const std::string& topic, const std::string& text); 00083 extern void luafaudes_dict_insert_entry(const std::string& topic, const std::string& key, const std::string& entry); 00084 00085 // luafaudes: load extension, see commonfaudes.i 00086 extern int luafaudes_loadext(lua_State* pL, const char* filename); 00087 extern int luafaudes_loaddefext(lua_State* pL, const char* arg0); 00088 00089 00090 // luafaudes debugging facilities 00091 #ifdef FAUDES_DEBUG_LUABINDINGS 00092 #define FD_DLB(message) FAUDES_WRITE_CONSOLE("FAUDES_LUA_ERROR: " << message); 00093 #else 00094 #define FD_DLB(message) 00095 #endif 00096 00097 00098 00099 #endif libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen |