Free Electron
LuaI.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __lua_LuaI_h__
8 #define __lua_LuaI_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /// lua execution interface
16 class FE_DL_EXPORT LuaI:
17  virtual public Component,
18  public CastableAs<LuaI>
19 {
20  public:
21 virtual bool preloadString(const String &text) = 0;
22 virtual Result loadFile(const String &filename) = 0;
23 virtual Result loadString(const String &text) = 0;
24 
25 virtual void set(const String &key, Record r_value) = 0;
26 virtual void set(const String &key, sp<RecordArray> ra_value) = 0;
27 virtual void set(const String &key, const String &value) = 0;
28 virtual void set(const String &key, const Real &value) = 0;
29 virtual void set(const String &key, Vector2 &value) = 0;
30 virtual void set(const String &key, Vector3 &value) = 0;
31 virtual void set(const String &key, Vector4f &value) = 0;
32 virtual void set(const String &key, sp<Layout> l_value) = 0;
33 virtual void set(const String &key, sp<Component> spValue) = 0;
34 virtual void set(const String &key, sp<Scope> spValue) = 0;
35 virtual void set(const String &key, sp<StateCatalog> spValue) = 0;
36 
37 virtual Record getRecord(const String &key) = 0;
38 virtual String getString(const String &key) = 0;
39 virtual Real getReal(const String &key) = 0;
40 virtual Vector2 getVector2(const String &key) = 0;
41 virtual Vector3 getVector3(const String &key) = 0;
42 virtual Vector4 getVector4(const String &key) = 0;
43 virtual Vector4f getVector4f(const String &key) = 0;
44 
45 virtual bool execute(void) = 0;
46 virtual bool execute(const String &a_fnName) = 0;
47 virtual void flush(void) = 0;
48 virtual void alias(String a_aliasName,String a_trueName) = 0;
49 
50 };
51 
52 } /* namespace ext */
53 } /* namespace fe */
54 
55 #endif /* __lua_LuaI_h__ */
56 
kernel
Definition: namespace.dox:3
Automatically reference-counted string container.
Definition: String.h:128
lua execution interface
Definition: LuaI.h:16
Result
Generalized return value indicating success or failure, and why.
Definition: Result.h:24
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Base for all interfacable components.
Definition: Component.h:20
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192