Objects Initial
This commit is contained in:
parent
00bc875846
commit
939e365a4f
76 changed files with 7895 additions and 17 deletions
36
Objects/public/core/scriptsection.h
Normal file
36
Objects/public/core/scriptsection.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#pragma once
|
||||
|
||||
#include "primitives/methodobject.h"
|
||||
|
||||
namespace obj {
|
||||
|
||||
// global singleton API for method object to manage the script
|
||||
struct ScriptSection {
|
||||
|
||||
tp::List<Script*> mScripts;
|
||||
|
||||
Script* createScript();
|
||||
void changeScript(Script** current_script, Script** new_script);
|
||||
void abandonScript(Script* script);
|
||||
|
||||
tp::alni get_script_file_adress(Script* in);
|
||||
Script* get_scritp_from_file_adress(tp::alni file_adress);
|
||||
|
||||
~ScriptSection();
|
||||
|
||||
static void initialize();
|
||||
static void uninitialize();
|
||||
static ScriptSection* globalHandle();
|
||||
|
||||
private:
|
||||
|
||||
static obj::save_load_callbacks slcb_script_section;
|
||||
|
||||
void delete_script(Script* script);
|
||||
void reference_script(Script* script);
|
||||
|
||||
static void save_script_table_to_file(ScriptSection* self, Archiver& file);
|
||||
static void load_script_table_from_file(ScriptSection* self, Archiver& file);
|
||||
static tp::alni save_script_table_to_file_size(ScriptSection* self, Archiver& file);
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue