libluafaudes.h
Go to the documentation of this file.
1 /** @file libluafaudes.h Includes all libluafaudes headers, incl lua */
2 
3 /* FAU Discrete Event Systems Library (libfaudes)
4 
5  Copyright (C) 2008 Thomas Moor
6  Exclusive copyright is granted to Klaus Schmidt
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Lesser General Public
10  License as published by the Free Software Foundation; either
11  version 2.1 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
21 
22 
23 #ifndef FAUDES_LIBLUAFAUDES_H
24 #define FAUDES_LIBLUAFAUDES_H
25 
26 
27 // lua essentials
28 #define lua_c
29 
30 // lua essentials
31 extern "C" {
32 #include "lua/lua.h"
33 #include "lua/lauxlib.h"
34 #include "lua/lualib.h"
35 }
36 
37 
38 // std streams for console logging
39 #include <iostream>
40 #include <fstream>
41 #include <sstream>
42 #include <string>
43 
44 // c libs since we dont use lua.h
45 #include <csignal>
46 #include <cstdio>
47 #include <cstdlib>
48 #include <cstring>
49 
50 // luafaudes: include faudes plus lua addons
51 #include "corefaudes.h"
52 #include "lbp_function.h"
53 
54 // include declarations for SWIG generated module loaders
55 #include "lbp_load.h"
56 
57 // overall loader to initialize kernel
58 extern void luafaudes_initialize(lua_State* pL);
59 
60 // luafaudes: logging externals, defined in commonfaudes.i
61 extern std::ofstream* luafaudes_logstream;
62 extern std::string luafaudes_lastline;
63 extern void luafaudes_logwrite(const char* str);
64 extern void luafaudes_logwrite(const std::string& str);
65 
66 // luafaudes: mute faudes console out, see commonfaudes.i
67 extern void luafaudes_mute(bool on);
68 
69 // luafaudes: register faudes console variant for print, see commonfaudes.i
70 extern void luafaudes_print_register(lua_State* L);
71 
72 // luafaudes interface to completer, see commonfaudes.i
73 extern char **luafaudes_complete(lua_State* pL, const char *text, int start, int end);
74 
75 // luafaudes: register faudes LoopCallback() as line hook, see commonfaudes.i
76 extern void luafaudes_hook_register(lua_State* L);
77 
78 // luafaudes: dot test external, see commonfaudes.i
79 extern bool luafaudes_dotready(void);
80 
81 // luafaudes: help system, see commonfaudes.i
82 extern void luafaudes_dict_insert_topic(const std::string& topic, const std::string& text);
83 extern void luafaudes_dict_insert_entry(const std::string& topic, const std::string& key, const std::string& entry);
84 
85 // luafaudes: load extension, see commonfaudes.i
86 extern int luafaudes_loadext(lua_State* pL, const char* filename);
87 extern int luafaudes_loaddefext(lua_State* pL, const char* arg0);
88 
89 
90 // luafaudes debugging facilities
91 #ifdef FAUDES_DEBUG_LUABINDINGS
92 #define FD_DLB(message) FAUDES_WRITE_CONSOLE("FAUDES_LUA_ERROR: " << message);
93 #else
94 #define FD_DLB(message)
95 #endif
96 
97 
98 
99 #endif

libFAUDES 2.26g --- 2015.08.17 --- c++ api documentaion by doxygen