Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/system/ComponentManager.h
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | struct ComponentType | ||||
AllocFunc alloc; | AllocFunc alloc; | ||||
DeallocFunc dealloc; | DeallocFunc dealloc; | ||||
std::string name; | std::string name; | ||||
std::string schema; // RelaxNG fragment | std::string schema; // RelaxNG fragment | ||||
std::unique_ptr<JS::PersistentRootedValue> ctor; // only valid if type == CT_Script | std::unique_ptr<JS::PersistentRootedValue> ctor; // only valid if type == CT_Script | ||||
}; | }; | ||||
public: | public: | ||||
CComponentManager(CSimContext&, shared_ptr<ScriptRuntime> rt, bool skipScriptFunctions = false); | CComponentManager(CSimContext&, shared_ptr<ScriptContext> rt, bool skipScriptFunctions = false); | ||||
~CComponentManager(); | ~CComponentManager(); | ||||
void LoadComponentTypes(); | void LoadComponentTypes(); | ||||
/** | /** | ||||
* Load a script and execute it in a new function scope. | * Load a script and execute it in a new function scope. | ||||
* @param filename VFS path to load | * @param filename VFS path to load | ||||
* @param hotload set to true if this script has been loaded before, and redefinitions of | * @param hotload set to true if this script has been loaded before, and redefinitions of | ||||
▲ Show 20 Lines • Show All 257 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator