aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Server/Console/ServerCli.h
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.Server/Console/ServerCli.h')
-rw-r--r--Minecraft.Server/Console/ServerCli.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/Minecraft.Server/Console/ServerCli.h b/Minecraft.Server/Console/ServerCli.h
new file mode 100644
index 00000000..f544450b
--- /dev/null
+++ b/Minecraft.Server/Console/ServerCli.h
@@ -0,0 +1,50 @@
+#pragma once
+
+#include <memory>
+
+namespace ServerRuntime
+{
+ class ServerCliEngine;
+ class ServerCliInput;
+
+ /**
+ * **Server CLI facade**
+ *
+ * Owns the command engine and input component, and exposes a small lifecycle API.
+ * CLI 全体の開始・停止・更新をまとめる窓口クラス
+ */
+ class ServerCli
+ {
+ public:
+ ServerCli();
+ ~ServerCli();
+
+ /**
+ * **Start console input processing**
+ *
+ * Connects input to the engine and starts background reading.
+ * 入力処理を開始してエンジンに接続
+ */
+ void Start();
+
+ /**
+ * **Stop console input processing**
+ *
+ * Stops background input safely and detaches from the engine.
+ * 入力処理を安全に停止
+ */
+ void Stop();
+
+ /**
+ * **Process queued command lines**
+ *
+ * Drains commands collected by input and executes them in the main loop.
+ * 入力キューのコマンドを実行
+ */
+ void Poll();
+
+ private:
+ std::unique_ptr<ServerCliEngine> m_engine;
+ std::unique_ptr<ServerCliInput> m_input;
+ };
+}