File: luabridge.h

package info (click to toggle)
fityk 1.3.1-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,784 kB
  • sloc: cpp: 34,396; ansic: 4,673; python: 971; makefile: 366; sh: 117; java: 31; ruby: 27; perl: 25; xml: 16
file content (38 lines) | stat: -rw-r--r-- 765 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// This file is part of fityk program. Copyright 2001-2013 Marcin Wojdyr
// Licence: GNU General Public License ver. 2+

#ifndef FITYK_LUABRIDGE_H_
#define FITYK_LUABRIDGE_H_

#include "common.h"

struct lua_State;

namespace fityk {

class Full;
class BasicContext;

class FITYK_API LuaBridge
{
public:
    LuaBridge(Full *F);
    ~LuaBridge();
    void close_lua();
    void exec_lua_string(const std::string& str);
    void exec_lua_script(const std::string& str);
    void exec_lua_output(const std::string& str);
    bool is_lua_line_incomplete(const char* str);
    //lua_State* state() { return L_ };

private:
    lua_State *L_;
    BasicContext* ctx_;

    void handle_lua_error();
    DISALLOW_COPY_AND_ASSIGN(LuaBridge);
};

} // namespace fityk

#endif