COMMAND: extracted new module out of core

master
Martin Gerhardy 2020-08-30 22:36:16 +02:00
parent af52e9ff2a
commit b92d9081b9
66 changed files with 88 additions and 70 deletions

View File

@ -24,6 +24,7 @@ jobs:
ctest -V -R tests-animation$
ctest -V -R tests-app$
ctest -V -R tests-attrib$
ctest -V -R tests-command$
ctest -V -R tests-computeshadertool$
ctest -V -R tests-cooldown$
ctest -V -R tests-core$
@ -100,6 +101,7 @@ jobs:
ctest -V -R tests-animation$
ctest -V -R tests-app$
ctest -V -R tests-attrib$
ctest -V -R tests-command$
ctest -V -R tests-computeshadertool$
ctest -V -R tests-cooldown$
ctest -V -R tests-core$
@ -160,6 +162,7 @@ jobs:
ctest -V -C Release -R tests-animation$
ctest -V -C Release -R tests-app$
ctest -V -C Release -R tests-attrib$
ctest -V -C Release -R tests-command$
ctest -V -C Release -R tests-computeshadertool$
ctest -V -C Release -R tests-cooldown$
ctest -V -C Release -R tests-core$

View File

@ -10,7 +10,7 @@
#include "video/TextureAtlasRenderer.h"
#include "voxelformat/MeshCache.h"
#include "voxelrender/CachedMeshRenderer.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/GLM.h"
#include "io/Filesystem.h"
#include "core/Color.h"

View File

@ -9,6 +9,7 @@ endif()
add_subdirectory(core)
add_subdirectory(io)
add_subdirectory(command)
add_subdirectory(metric)
add_subdirectory(app)
add_subdirectory(uuid)

View File

@ -6,8 +6,8 @@
#include "app/AppCommand.h"
#include "core/Var.h"
#include "core/concurrent/ThreadPool.h"
#include "core/command/Command.h"
#include "core/command/CommandHandler.h"
#include "command/Command.h"
#include "command/CommandHandler.h"
#include "io/Filesystem.h"
#include "core/Common.h"
#include "core/EventBus.h"

View File

@ -3,7 +3,7 @@
*/
#include "AppCommand.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "io/Filesystem.h"
#include "util/VarUtil.h"
#include "app/App.h"

View File

@ -11,7 +11,7 @@ if (WINDOWS)
set_property(GLOBAL PROPERTY ${LIB}_NOUNITY TRUE)
endif()
set(LIBS metric io sdl2 glm libuv backward)
set(LIBS metric command sdl2 glm libuv backward)
engine_add_module(TARGET ${LIB} SRCS ${SRCS} DEPENDENCIES ${LIBS})
set(TEST_MODULE_SRCS

View File

@ -5,7 +5,7 @@
#include "AbstractBenchmark.h"
#include "core/Log.h"
#include "core/Var.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "io/Filesystem.h"
#include "metric/Metric.h"
#include "core/EventBus.h"

View File

@ -5,7 +5,7 @@
#include "AbstractTest.h"
#include "core/Log.h"
#include "core/Var.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "metric/Metric.h"
#include "core/EventBus.h"
#include "core/TimeProvider.h"

View File

@ -3,7 +3,7 @@
*/
#include "app/tests/AbstractTest.h"
#include "core/command/CommandCompleter.h"
#include "command/CommandCompleter.h"
#include "io/Filesystem.h"
#include "core/tests/TestHelper.h"

View File

@ -3,7 +3,7 @@
*/
#include "SoundManager.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/Var.h"
#include "core/Assert.h"
#include "core/Log.h"

View File

@ -5,7 +5,7 @@
#include "ClientMessages_generated.h"
#include "ServerLoop.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/Var.h"
#include "core/Log.h"
#include "app/App.h"
@ -27,7 +27,7 @@
#include "backend/network/MoveHandler.h"
#include "persistence/PersistenceMgr.h"
#include "backend/world/World.h"
#include "core/command/CommandHandler.h"
#include "command/CommandHandler.h"
#include "voxel/MaterialColor.h"
#include "voxelformat/VolumeCache.h"
#include "eventmgr/EventMgr.h"

View File

@ -4,7 +4,7 @@
#include "World.h"
#include "network/ProtocolEnum.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "backend/spawn/SpawnMgr.h"
#include "backend/world/MapProvider.h"
#include "backend/world/Map.h"

View File

@ -0,0 +1,21 @@
set(SRCS
ActionButton.h ActionButton.cpp
CommandHandler.h CommandHandler.cpp
CommandCompleter.h CommandCompleter.cpp
Command.h Command.cpp
)
set(LIB command)
engine_add_module(TARGET ${LIB} SRCS ${SRCS} DEPENDENCIES io)
set(TEST_SRCS
tests/CommandTest.cpp
tests/CommandHandlerTest.cpp
)
gtest_suite_sources(tests ${TEST_SRCS})
gtest_suite_deps(tests ${LIB})
gtest_suite_begin(tests-${LIB} TEMPLATE ${ROOT_DIR}/src/modules/core/tests/main.cpp.in)
gtest_suite_sources(tests-${LIB} ${TEST_SRCS})
gtest_suite_deps(tests-${LIB} ${LIB})
gtest_suite_end(tests-${LIB})

View File

@ -10,7 +10,7 @@
#include "core/collection/StringMap.h"
#include "core/collection/DynamicArray.h"
#include "core/concurrent/ReadWriteLock.h"
#include "ActionButton.h"
#include "command/ActionButton.h"
#include <memory>
#include <functional>

View File

@ -4,7 +4,7 @@
#include "CommandHandler.h"
#include "core/collection/DynamicArray.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/Tokenizer.h"
#include "core/Log.h"
#include "core/Var.h"

View File

@ -3,7 +3,7 @@
*/
#include <gtest/gtest.h>
#include "core/command/CommandHandler.h"
#include "command/CommandHandler.h"
#include "core/Var.h"
namespace core {

View File

@ -3,7 +3,7 @@
*/
#include <gtest/gtest.h>
#include "core/command/Command.h"
#include "command/Command.h"
namespace core {

View File

@ -4,7 +4,7 @@
#include "LUAFunctions.h"
#include "core/Log.h"
#include "core/command/CommandHandler.h"
#include "command/CommandHandler.h"
#include "core/String.h"
#include "core/Var.h"
#include "app/App.h"

View File

@ -4,7 +4,7 @@
#include "Input.h"
#include "core/Log.h"
#include "core/command/CommandHandler.h"
#include "command/CommandHandler.h"
#include <string.h>
namespace console {

View File

@ -1,9 +1,4 @@
set(SRCS
command/ActionButton.h command/ActionButton.cpp
command/CommandHandler.h command/CommandHandler.cpp
command/CommandCompleter.h command/CommandCompleter.cpp
command/Command.h command/Command.cpp
collection/Array.h
collection/Buffer.h
collection/ConcurrentQueue.h
@ -87,8 +82,6 @@ set(TEST_SRCS
tests/BufferTest.cpp
tests/ByteStreamTest.cpp
tests/ColorTest.cpp
tests/CommandTest.cpp
tests/CommandHandlerTest.cpp
tests/ConcurrentQueueTest.cpp
tests/CoreTest.cpp
tests/DynamicArrayTest.cpp

View File

@ -6,7 +6,7 @@
#include "core/Var.h"
#include "core/Log.h"
#include "core/Common.h"
#include "core/command/Command.h"
#include "command/Command.h"
#ifdef USE_EMTRACE
#include <emscripten/trace.h>

View File

@ -3,7 +3,7 @@
*/
#include "PlayerAction.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/Trace.h"
#include "frontend/ClientEntity.h"

View File

@ -4,7 +4,7 @@
#pragma once
#include "core/command/ActionButton.h"
#include "command/ActionButton.h"
#include "core/IComponent.h"
#include "core/SharedPtr.h"
#include "Shared_generated.h"

View File

@ -3,7 +3,7 @@
*/
#include "PlayerMovement.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/Trace.h"
namespace frontend {

View File

@ -4,7 +4,7 @@
#pragma once
#include "core/command/ActionButton.h"
#include "command/ActionButton.h"
#include "core/IComponent.h"
#include "frontend/ClientEntity.h"
#include "video/Camera.h"

View File

@ -5,7 +5,7 @@
#pragma once
#include "core/IComponent.h"
#include "core/command/ActionButton.h"
#include "command/ActionButton.h"
#include "Axis.h"
#include "video/Ray.h"
#include "video/Camera.h"

View File

@ -3,7 +3,7 @@
*/
#include "Movement.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/GLM.h"
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/norm.hpp>

View File

@ -4,7 +4,7 @@
#pragma once
#include "core/command/ActionButton.h"
#include "command/ActionButton.h"
#include "core/IComponent.h"
#include <glm/fwd.hpp>
#include <glm/vec3.hpp>

View File

@ -5,7 +5,7 @@
#include "TestApp.h"
#include "ui/imgui/IMGUI.h"
#include "core/Color.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "video/ScopedPolygonMode.h"
#include "core/GameConfig.h"
#include "core/Var.h"

View File

@ -6,7 +6,7 @@
#include "io/Filesystem.h"
#include "core/TimeProvider.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/Color.h"
#include "core/UTF8.h"
#include "core/Common.h"

View File

@ -7,7 +7,7 @@
#include "video/Texture.h"
#include "core/ArrayLength.h"
#include "video/Renderer.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "LUAUIApp.h"
#include <SDL_stdinc.h>
#include "Nuklear.h"

View File

@ -7,7 +7,7 @@
#include "commonlua/LUAFunctions.h"
#include "io/Filesystem.h"
#include "core/Log.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/Trace.h"
namespace ui {

View File

@ -8,7 +8,7 @@
#include "FileDialogWindow.h"
#include "io/Filesystem.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/collection/DynamicArray.h"
#include "core/Color.h"
#include "core/UTF8.h"

View File

@ -4,7 +4,7 @@
#include "tb_widgets.h"
#include "core/Assert.h"
#include "core/command/CommandHandler.h"
#include "command/CommandHandler.h"
#include "tb_font_renderer.h"
#include "tb_renderer.h"
#include "tb_scroller.h"

View File

@ -5,8 +5,8 @@
#include "tb_widgets_common.h"
#include "core/Assert.h"
#include "core/Var.h"
#include "core/command/Command.h"
#include "core/command/CommandHandler.h"
#include "command/Command.h"
#include "command/CommandHandler.h"
#include "tb_font_renderer.h"
#include "tb_system.h"
#include "tb_widgets_listener.h"

View File

@ -9,12 +9,12 @@
#include "core/String.h"
#include "core/collection/DynamicArray.h"
#include "io/Filesystem.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/collection/Set.h"
#include "core/Common.h"
#include "core/Color.h"
#include "core/Tokenizer.h"
#include "core/command/CommandHandler.h"
#include "command/CommandHandler.h"
#include "VarUtil.h"
#include <SDL.h>

View File

@ -2,7 +2,7 @@
* @file
*/
#include "core/command/Command.h"
#include "command/Command.h"
#include "KeybindingHandler.h"
#include "CustomButtonNames.h"
#include "app/App.h"

View File

@ -3,7 +3,7 @@
*/
#include "MessageQueue.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include <algorithm>
namespace {

View File

@ -5,7 +5,7 @@
#include "app/tests/AbstractTest.h"
#include "util/Console.h"
#include "core/Var.h"
#include "core/command/Command.h"
#include "command/Command.h"
namespace util {

View File

@ -4,7 +4,7 @@
#include "app/tests/AbstractTest.h"
#include "util/KeybindingHandler.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include <SDL.h>
namespace util {

View File

@ -15,7 +15,7 @@
#include "core/ArrayLength.h"
#include "core/Log.h"
#include "core/Color.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "ShaderManager.h"
#include "util/KeybindingHandler.h"
#include "util/KeybindingParser.h"

View File

@ -7,7 +7,7 @@
#include "voxelformat/VoxFileFormat.h"
#include "io/Filesystem.h"
#include "app/App.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/Log.h"
namespace voxelformat {

View File

@ -8,7 +8,7 @@
#include "core/IComponent.h"
#include "core/String.h"
#include "core/collection/DynamicArray.h"
#include "core/command/CommandCompleter.h"
#include "command/CommandCompleter.h"
struct lua_State;

View File

@ -4,7 +4,7 @@
#include "PlayerCamera.h"
#include "voxel/PagedVolume.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/Trace.h"
namespace voxelworldrender {

View File

@ -6,7 +6,7 @@
#include "video/Camera.h"
#include "WorldRenderer.h"
#include "core/command/ActionButton.h"
#include "command/ActionButton.h"
#include "core/BindingContext.h"
namespace voxelworldrender {

View File

@ -6,7 +6,7 @@
#include "io/Filesystem.h"
#include "core/Var.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "cooldown/CooldownProvider.h"
#include "network/ServerNetwork.h"
#include "network/ServerMessageSender.h"

View File

@ -10,7 +10,7 @@
#include "animation/chr/Character.h"
#include "animation/animal/bird/Bird.h"
#include "stock/ContainerData.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/ArrayLength.h"
#include "core/collection/Array.h"
#include "testcore/TestAppMain.h"

View File

@ -3,7 +3,7 @@
*/
#include "TestTraze.h"
#include "core/SharedPtr.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "testcore/TestAppMain.h"
#include "voxel/MaterialColor.h"
#include "voxel/Region.h"

View File

@ -13,7 +13,7 @@
#include "metric/Metric.h"
#include "core/TimeProvider.h"
#include "core/EventBus.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "voxel/Voxel.h"
#include "compute/Compute.h"
#include "io/Filesystem.h"

View File

@ -4,7 +4,7 @@
#include "Thumbnailer.h"
#include "core/Color.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "io/Filesystem.h"
#include "metric/Metric.h"
#include "core/EventBus.h"

View File

@ -5,7 +5,7 @@
#include "VoxConvert.h"
#include "core/Color.h"
#include "core/Var.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "io/Filesystem.h"
#include "metric/Metric.h"
#include "core/EventBus.h"

View File

@ -10,8 +10,8 @@
#include "metric/Metric.h"
#include "core/TimeProvider.h"
#include "core/EventBus.h"
#include "core/command/Command.h"
#include "core/command/CommandCompleter.h"
#include "command/Command.h"
#include "command/CommandCompleter.h"
#include "video/Renderer.h"
#include "voxedit-ui/VoxEditWindow.h"
#include "io/Filesystem.h"

View File

@ -15,7 +15,7 @@
#include "video/WindowedApp.h"
#include "core/Var.h"
#include "core/StringUtil.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "editorscene/Viewport.h"
#include "settings/SceneSettingsWindow.h"
#include "layer/LayerWidget.h"

View File

@ -4,8 +4,8 @@
#include "LayerWidget.h"
#include "app/App.h"
#include "core/command/Command.h"
#include "core/command/CommandHandler.h"
#include "command/Command.h"
#include "command/CommandHandler.h"
#include "io/Filesystem.h"
#include "voxedit-util/SceneManager.h"
#include "LayerRenameWindow.h"

View File

@ -7,7 +7,7 @@
#include "voxel/Voxel.h"
#include "voxel/RawVolume.h"
#include "voxel/Region.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "core/Assert.h"
#include "core/StandardLib.h"
#include "core/Log.h"

View File

@ -30,8 +30,8 @@
#include "video/Ray.h"
#include "math/Random.h"
#include "math/Axis.h"
#include "core/command/Command.h"
#include "core/command/CommandCompleter.h"
#include "command/Command.h"
#include "command/CommandCompleter.h"
#include "core/ArrayLength.h"
#include "app/App.h"
#include "core/Log.h"

View File

@ -22,7 +22,7 @@
#include "render/Gizmo.h"
#include "core/Var.h"
#include "core/Singleton.h"
#include "core/command/ActionButton.h"
#include "command/ActionButton.h"
#include "math/Axis.h"
#include "MementoHandler.h"
#include "EditorLUAGenerator.h"

View File

@ -4,7 +4,7 @@
#include "LayerManager.h"
#include "core/StringUtil.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "voxelutil/VolumeMerger.h"
#include "core/Log.h"
#include "core/Trace.h"

View File

@ -6,7 +6,7 @@
#include "math/Axis.h"
#include "core/Color.h"
#include "core/StringUtil.h"
#include "core/command/Command.h"
#include "command/Command.h"
#include "voxel/MaterialColor.h"
#include "voxel/Region.h"
#include "video/ScopedPolygonMode.h"

View File

@ -4,7 +4,7 @@
#pragma once
#include "core/command/ActionButton.h"
#include "command/ActionButton.h"
#include "ModifierType.h"
namespace voxedit {