GaitGeneration by Graph Search
読み取り中…
検索中…
一致する文字列を見つけられません
名前空間 | マクロ定義 | 関数 | 変数
cmdio_util.h ファイル
#include <format>
#include <string>
#include <utility>
#include "boot_mode.h"
#include "output_detail.h"

[ソースコード]

名前空間

namespace  designlab
 
namespace  designlab::cmdio
 

マクロ定義

#define DESIGNLAB_USE_COLOR_OUTPUT
 

関数

void designlab::cmdio::SetOutputLimit (OutputDetail limit)
 出力するメッセージをどこまで許可するかを設定する関数.
この関数を呼び出してから出ないと,他の関数を使えない.
例えば kError に設定すると, kError 未満の出力( kInfo とか kDebug とかはされない.
逆に kDebug に設定すると,すべての出力がされる.
1度呼び出したら,プログラム終了まで設定は有効となる.
 
void designlab::cmdio::DoOutput (bool do_output)
 そもそも出力をするかを設定する関数.
false に設定しても システムメッセージは出力される.
 
void designlab::cmdio::Output (const std::string &str, OutputDetail detail)
 コマンドラインに文字を出力する関数.
SetOutputLimit 関数で設定した出力の許可範囲内であれば出力される.
 
void designlab::cmdio::DebugOutput (const std::string &str)
 コマンドラインに文字を出力する関数. Debug 用の出力.
 
void designlab::cmdio::InfoOutput (const std::string &str)
 コマンドラインに文字を出力する関数. Info 用の出力.
 
void designlab::cmdio::WarningOutput (const std::string &str)
 コマンドラインに文字を出力する関数. Warning 用の出力.
 
void designlab::cmdio::ErrorOutput (const std::string &str)
 コマンドラインに文字を出力する関数. Error 用の出力.
 
void designlab::cmdio::SystemOutput (const std::string &str)
 コマンドラインに文字を出力する関数. System 用の出力.
 
void designlab::cmdio::SpacedOutput (const std::string &str, OutputDetail detail)
 コマンドラインに文字を出力する関数.
前と後ろに改行を挿入する.
 
template<typename... Args>
void designlab::cmdio::OutputF (OutputDetail detail, const std::format_string< Args... > str, Args &&... args)
 コマンドラインに文字を出力する関数, format した文字列を出力する.
SetOutputLimit() で設定した出力の許可範囲内であれば出力される.
 
template<typename... Args>
void designlab::cmdio::DebugOutputF (const std::format_string< Args... > str, Args &&... args)
 コマンドラインに文字を出力する関数. Debug 用の出力. format した文字列を出力する.
 
template<typename... Args>
void designlab::cmdio::InfoOutputF (const std::format_string< Args... > str, Args &&... args)
 コマンドラインに文字を出力する関数. Info 用の出力. format した文字列を出力する.
 
template<typename... Args>
void designlab::cmdio::WarningOutputF (const std::format_string< Args... > str, Args &&... args)
 コマンドラインに文字を出力する関数. Warning 用の出力. format した文字列を出力する.
 
template<typename... Args>
void designlab::cmdio::ErrorOutputF (const std::format_string< Args... > str, Args &&... args)
 コマンドラインに文字を出力する関数. Error 用の出力. format した文字列を出力する.
 
template<typename... Args>
void designlab::cmdio::SystemOutputF (const std::format_string< Args... > str, Args &&... args)
 コマンドラインに文字を出力する関数. System 用の出力. format した文字列を出力する.
 
template<typename... Args>
void designlab::cmdio::SpacedOutputF (OutputDetail detail, const std::format_string< Args... > str, Args &&... args)
 コマンドラインに文字を出力する関数, format した文字列を出力する.
SetOutputLimit 関数で設定した出力の許可範囲内であれば出力される.
 
void designlab::cmdio::OutputCenter (const std::string &str, OutputDetail detail)
 中央に文字を出力する関数. 文字列が長すぎる場合は普通に左詰めで出力される.
 
void designlab::cmdio::OutputRight (const std::string &str, OutputDetail detail)
 右端に文字を出力する関数. 文字列が長すぎる場合は普通に左詰めで出力される.
 
void designlab::cmdio::OutputNewLine (int num, OutputDetail detail)
 コマンドラインで改行をする関数.
 
void designlab::cmdio::OutputHorizontalLine (const std::string &line_visual, OutputDetail detail)
 コマンドラインに水平線を出力する関数.
 
void designlab::cmdio::OutputTitle (const std::string &title_name, bool output_copy_right=false)
 コマンドラインにこのソフトのタイトルを出力する関数.
出力される文字列は,必ず OutputDetail::kSystem で出力される.
 
void designlab::cmdio::WaitAnyKey (const std::string &str="Waiting for input.")
 入力待ちをする関数.
出力される文字列は, 必ず OutputDetail::kSystem で出力される.
 
int designlab::cmdio::InputInt (int min, int max, int default_num, const std::string &str="Please enter an integer.")
 整数を入力させる関数.
出力される文字列は, 必ず OutputDetail::kSystem で出力される.
 
bool designlab::cmdio::InputYesNo (const std::string &str="Are you sure?")
 yesかnoを入力させる関数.返り値で yes なら true, no なら false を返す.
出力される文字列は,必ず OutputDetail::kSystem で出力される.
 
std::string designlab::cmdio::InputDirName (const std::string &str="Enter a directory name. (Japanese is not recommended).")
 ディレクトリ名を入力させる関数.
出力される文字列は,必ず OutputDetail::kSystem で出力される.
ディレクトリ名には次の文字は使えない.
\ / : * ? " < > |
ディレクトリ名は空白を含めることができない.
 

変数

constexpr int designlab::cmdio::kHorizontalLineLength = 100
 水平線の長さ.
 

マクロ定義詳解

◆ DESIGNLAB_USE_COLOR_OUTPUT

#define DESIGNLAB_USE_COLOR_OUTPUT

cmdio_util.h25 行目に定義があります。