5#if __CIOF_CPLUSPLUS >= CIOF_DEFAULT_CPP_STD
90 template <
typename T,
typename ... Args>
91 std::string
parse(T _fmt, Args ... _args);
101 template <
typename T>
113 template <
typename T,
typename ... Args>
129 template <
typename T>
137 template <
typename T,
typename ... Args>
144 template <
typename T>
152 template <
typename T,
typename ... Args>
159 template <
typename T>
167 template <
typename T,
typename ... Args>
175 template <
typename T>
183 template <
typename T,
typename ... Args>
184 void echo(T _t, Args ... _args);
190 template <
typename T>
198 template <
typename T,
typename ... Args>
205 template <
typename T>
213 template <
typename T,
typename ... Args>
222 template <
typename T>
223 void input(
const std::string &_prompt, T *_var);
230 template <
typename T>
245 template <
typename T,
typename ... Args>
246 std::string
format(T _t, Args ... _args);
275 std::string
rgbSet(
unsigned int r,
unsigned int g,
unsigned int b);
284 std::string
rgbBgSet(
unsigned int r,
unsigned int g,
unsigned int b);
324# error "Cannot compile with the current C++ standard"
325# pragma message("Use C++ " CIOF_TOSTRING(CIOF_DEFAULT_CPP_STD) " or higer instead of " CIOF_TOSTRING(__cplusplus))
Implementation functions.
std::string parse(T _fmt, Args ... _args)
Parse the params for printing and echoing.
void __out(const OutputType &_outType, T _t)
Output the with its corresponding type either to:
std::string toString(const T &_val)
Convert to string safely.
void initANSI()
Initialize ANSI text option in Windows 10 or later NOTE: ONLY WORKS IN WINDOWS 10 OR LATER.
struct ciof::CIOFOutputConfig CIOFOutputConfig
Set output configuration for ciof::impl::__out() function and its wrappers.
std::string rgbBgSet(unsigned int r, unsigned int g, unsigned int b)
Set the RGB color for background in the terminal.
void showCursor(const bool &show)
Show or hide the cursor from the terminal NOTE: In Windows; enable ANSI by doing ciof::initANSI().
void cursorPos(int _row, int _col)
Get the set cursor position using _row and _col Essentially calls the getCursorPos() function and the...
std::string getCursorPos(int _row, int _col)
Get the set cursor position using _row and _col.
OutputType
Set output type for ciof::impl::__out() function and its helper functions Out : To Standard Output Er...
std::string styleReset()
Reset all the styles and colors in the terminal.
std::string rgbSet(unsigned int r, unsigned int g, unsigned int b)
Set the RGB color in the terminal.
std::string format(T _t, Args ... _args)
Get everything as a string format.
void printLog(T _t)
Print to the standard log for _t.
OutputStyle
Set output style: Bold Italic Underline Strikethrough.
void input()
Empty input() function; Do not save any input to a variable, just leave it as a blank input.
CIOFOutputConfig outputConf
Set default output configuration.
void printError(T _t)
Print to the standard error for _t.
void print()
Print a new line.
std::string styleSet(const OutputStyle &_style)
Set the styles according to the OutputStyle type.
void clear()
Clear the contents of the terminal NOTE: In Windows; enable ANSI by doing ciof::initANSI().
void echo(T _t)
Echo to the standard output for _t.
std::string colorSet(int _color)
Set the colors from the default color palette from the terminal.
void echoError(T _t)
Echo to the standard error for _t.
void echoLog(T _t)
Echo to the standard log for _t.
Set output configuration for ciof::impl::__out() function and its wrappers.
std::string spacingDelimeter