Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/system/ComponentTest.h
/* Copyright (C) 2022 Wildfire Games. | /* Copyright (C) 2023 Wildfire Games. | ||||
* This file is part of 0!A.D. | * This file is part of 0!A.D. | ||||
* | * | ||||
* 0!A.D. is free software: you can redistribute it and/or modify | * 0!A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0!A.D. is distributed in the hope that it will be useful, | * 0!A.D. is distributed in the hope that it will be useful, | ||||
Show All 40 Lines | class ComponentTestHelper | ||||
CSimContext m_Context; | CSimContext m_Context; | ||||
CComponentManager m_ComponentManager; | CComponentManager m_ComponentManager; | ||||
CParamNode m_Param; | CParamNode m_Param; | ||||
IComponent* m_Cmp; | IComponent* m_Cmp; | ||||
EComponentTypeId m_Cid; | EComponentTypeId m_Cid; | ||||
bool m_isSystemEntityInit = false; | bool m_isSystemEntityInit = false; | ||||
public: | public: | ||||
ComponentTestHelper(std::shared_ptr<ScriptContext> scriptContext) : | ComponentTestHelper(ScriptContext& scriptContext) : | ||||
m_Context(), m_ComponentManager(m_Context, scriptContext), m_Cmp(NULL) | m_Context(), m_ComponentManager(m_Context, scriptContext), m_Cmp(NULL) | ||||
{ | { | ||||
m_ComponentManager.LoadComponentTypes(); | m_ComponentManager.LoadComponentTypes(); | ||||
} | } | ||||
const ScriptInterface& GetScriptInterface() | const ScriptInterface& GetScriptInterface() | ||||
{ | { | ||||
return m_ComponentManager.GetScriptInterface(); | return m_ComponentManager.GetScriptInterface(); | ||||
▲ Show 20 Lines • Show All 184 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator