8#ifndef DESIGNLAB_APPLICATION_SETTING_RECORD_H_
9#define DESIGNLAB_APPLICATION_SETTING_RECORD_H_
73 const std::vector<std::string> kFileDescription = {
74 "If this file is garbled, "
75 "the problem is most likely due to character encoding.",
76 "This file is written in utf - 8, and can be read by installing VS Code and "
77 "configuring it to automatically detect the character encoding.",
78 "This file is written in the TOML format. "
79 "Just google it and you'll find easy "
80 "to understand information on the wiki, so try looking it up.",
81 "This file is a file for describing program settings.",
82 "This file can also be edited with a text editor such as Notepad.",
83 "If you want to change the simulation conditions, "
84 "try changing them from here."
85 "Lines starting with a sharp are comments. They do not affect the program."
92 "The order is major.minor.patch.",
93 "Mode",
"Setting the mode in which the program is to be run",
94 "Output",
"Program output settings.");
101 ask_about_modes,
"Mode",
102 "Ask the user about the run mode at startup. ( true / false )");
104 default_mode,
"Mode",
105 std::format(
"Sets the default run mode at startup. ( \"{}\" )",
108 do_step_execution_each_simulation,
"Mode",
109 "Ask if you want to continue with each simulation. ( true / false )");
111 do_step_execution_each_gait,
"Mode",
112 "Ask if you want to continue with each move. ( true / false )");
115 do_cmd_output,
"Output",
116 "Output characters to the command line. ( true / false )");
118 cmd_output_detail,
"Output",
119 std::format(
"How much output is allowed on the command line. ( \"{}\" )",
122 do_gui_display,
"Output",
"Display GUI. ( true / false )");
124 gui_display_quality,
"Output",
125 std::format(
"GUI Image Quality.( \"{}\" )",
128 window_size_x,
"Output",
129 std::format(
"Sets the width of the GUI. The range is from {} to {}. "
130 "The recommended value is 1600.",
134 window_size_y,
"Output",
135 std::format(
"Sets the height of the GUI. The range is from {} to {}. "
136 "The recommended value is 900.",
140 window_fps,
"Output",
141 std::format(
"Sets FPS. The range is from {} to {}. "
142 "The recommended value is 60.",
152 version_major, version_minor, version_patch,
153 ask_about_modes, default_mode, do_step_execution_each_simulation,
154 do_step_execution_each_gait,
155 do_cmd_output, cmd_output_detail, do_gui_display,
156 gui_display_quality, window_size_x, window_size_y, window_fps);
std::string EnumValuesToString(const std::string separator)
enum型を渡すと,その要素を列挙した文字列を返す関数.
@ kSimulation
シミュレーションモード.
OutputDetail
コマンドラインに文字を出力する際に,その詳細を指定するための列挙体.
DisplayQuality
描画の品質設定を示す列挙体.
static constexpr int kFpsMin
static constexpr int kWindowHeightMin
int window_size_x
グラフィカルウィンドウの横幅.
bool ask_about_modes
起動時にモード選択の確認をするかどうか.
bool do_gui_display
GUIを表示するかどうか.
bool do_step_execution_each_simulation
1シミュレーションごとにステップ実行をするかどうか.
static constexpr int kFpsMax
int window_fps
グラフィカルウィンドウのFPS.
int window_size_y
グラフィカルウィンドウの縦幅.
bool do_step_execution_each_gait
1動作ごとにステップ実行をするかどうか.
static constexpr int kWindowHeightMax
OutputDetail cmd_output_detail
コマンドラインに出力する際,どこまで許可するか.
static constexpr int kWindowWidthMax
int version_major
バージョン番号(メジャー)
static constexpr int kWindowWidthMin
BootMode default_mode
デフォルトの起動モード.
int version_patch
バージョン番号(パッチ)
bool do_cmd_output
コマンドラインに出力するかどうか.
DisplayQuality gui_display_quality
GUIを表示する際,どこまで許可するか.
int version_minor
バージョン番号(マイナー)
#define DESIGNLAB_TOML11_SERIALIZE(NAME,...)
tomlファイルのシリアライズ/デシリアライズを行うためのマクロ. TOML11_DEFINE_CONVERSION_NON_INTRUSIVEをラッパしたもの. もともとのほうでは enum型...
#define DESIGNLAB_TOML11_DESCRIPTION_CLASS(CLASS)
tomlファイルに説明を追加するためのクラスの宣言を行うためのマクロ.
#define DESIGNLAB_TOML11_VARIABLE_ADD_DESCRIPTION(VARIABLE, TABLE, DESCRIPTION)
tomlファイルに変数とファイルの説明を追加するためのマクロ.
#define DESIGNLAB_TOML11_TABLE_ADD_DESCRIPTION(...)
tomlファイルにテーブルの説明を追加するためのマクロ. DESIGNLAB_TOML11_DESCRIPTION_CLASS内に必ず記述する必要がある.
#define DESIGNLAB_TOML11_VARIABLE_NO_DESCRIPTION(VARIABLE, TABLE)
ファイルの説明を追加したくない場合には,このマクロで変数を追加する.
#define DESIGNLAB_TOML11_FILE_ADD_DESCRIPTION_MULTI_LINE(DESCRIPTION_VEC)
tomlファイルにファイルの説明を追加するためのマクロ. DESIGNLAB_TOML11_DESCRIPTION_CLASS内に必ず記述する必要がある.