SEGS  0.4.2
Super Entity Game Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ScriptingEngine.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2018 SEGS Team (see Authors.txt)
5  * This software is licensed! (See License.txt for details)
6  */
7 
8 #ifndef SCRIPTINGENGINE_H
9 #define SCRIPTINGENGINE_H
10 #include <memory>
11 #include <string>
12 
13 class QString;
14 struct MapClientSession;
15 
17 {
18 public:
21  void registerTypes();
22  int loadAndRunFile(const QString &path);
23  std::string callFuncWithClientContext(MapClientSession *client,const char *name,int arg1);
24  std::string callFunc(const char *name,int arg1);
25  int runScript(const QString &script_contents,const char *script_name="unnamed script");
26  int runScript(MapClientSession *client,const QString &script_contents,const char *script_name="unnamed script");
27 private:
28 #ifdef SCRIPTING_ENABLED
30  std::unique_ptr<ScriptingEnginePrivate> m_private;
31 #endif
32 };
33 
34 #endif // SCRIPTINGENGINE_H
Definition: MapClientSession.h:32
int loadAndRunFile(const QString &path)
Definition: ScriptingEngine.cpp:95
int runScript(const QString &script_contents, const char *script_name="unnamed script")
Definition: ScriptingEngine.cpp:159
void registerTypes()
Definition: ScriptingEngine.cpp:64
~ScriptingEngine()
Definition: ScriptingEngine.cpp:60
std::string callFuncWithClientContext(MapClientSession *client, const char *name, int arg1)
Definition: ScriptingEngine.cpp:114
Definition: ScriptingEngine.cpp:45
Definition: ScriptingEngine.h:16
ScriptingEngine()
Definition: ScriptingEngine.cpp:56
std::string callFunc(const char *name, int arg1)
Definition: ScriptingEngine.cpp:120