Files
GServer-v2/server/include/scripting/ScriptClass.h
T
John Norman deb5d3b7df Switch to BabyDI.
Added BabyDI and migrated Server into it.
Replaced pointers of server being passed around with calls to BabyDI.
2024-07-05 17:32:18 -07:00

47 lines
720 B
C++

#ifndef TSCRIPTCLASS_H
#define TSCRIPTCLASS_H
#include <string>
#include <CString.h>
#include "BabyDI.h"
#include "scripting/SourceCode.h"
class Server;
class ScriptClass
{
public:
ScriptClass(const std::string& className, const std::string& classSource);
~ScriptClass();
// Functions -> Inline Get-Functions
CString getClassPacket() const;
const std::string& getName() const
{
return m_className;
}
const CString& getByteCode() const
{
return m_bytecode;
}
const SourceCode& getSource() const
{
return m_source;
}
private:
BabyDI_INJECT(Server, m_server);
void parseScripts(const std::string& classSource);
std::string m_className;
SourceCode m_source;
CString m_bytecode;
};
#endif