CIOF v1.0.0-build
Char Input Output Format - A simple Input and Output utility library
Loading...
Searching...
No Matches
ciof.hpp File Reference
#include "CIOFpredefines.hpp"
#include <string>
#include "ciof.ipp"

Go to the source code of this file.

Classes

struct  ciof::CIOFOutputConfig
 Set output configuration for ciof::impl::__out() function and its wrappers. More...

Namespaces

namespace  ciof
namespace  ciof::impl
 Implementation functions.

Macros

#define __CIOF_OK

Typedefs

typedef struct ciof::CIOFOutputConfig ciof::CIOFOutputConfig
 Set output configuration for ciof::impl::__out() function and its wrappers.

Enumerations

enum class  ciof::OutputStyle { ciof::Bold , ciof::Italic , ciof::Underline , ciof::Strikethrough }
 Set output style: Bold Italic Underline Strikethrough. More...
enum class  ciof::OutputType { ciof::Out , ciof::Err , ciof::Log }
 Set output type for ciof::impl::__out() function and its helper functions Out : To Standard Output Err : To Standard Error Log : To Standard Log (Error, unbuffered) More...

Functions

template<typename T>
void ciof::impl::__out (const OutputType &_outType, T _t)
 Output the with its corresponding type either to:
template<typename T, typename ... Args>
void ciof::impl::__out (const OutputType &_outType, T _t, Args ... _args)
 Output the with its corresponding type either to:
std::string ciof::colorSet (int _color)
 Set the colors from the default color palette from the terminal.
void ciof::cursorPos (int _row, int _col)
 Get the set cursor position using _row and _col Essentially calls the getCursorPos() function and then sets the row and col according to the getCursorPos() function.
template<typename T>
void ciof::echo (T _t)
 Echo to the standard output for _t
template<typename T, typename ... Args>
void ciof::echo (T _t, Args ... _args)
 Echo to the standard output for _t
template<typename T>
void ciof::echoError (T _t)
 Echo to the standard error for _t
template<typename T, typename ... Args>
void ciof::echoError (T _t, Args ... _args)
 Echo to the standard log for _t
template<typename T>
void ciof::echoLog (T _t)
 Echo to the standard log for _t
template<typename T, typename ... Args>
void ciof::echoLog (T _t, Args ... _args)
 Echo to the standard log for _t
template<typename T, typename ... Args>
std::string ciof::format (T _t, Args ... _args)
 Get everything as a string format.
std::string ciof::getCursorPos (int _row, int _col)
 Get the set cursor position using _row and _col.
void ciof::initANSI ()
 Initialize ANSI text option in Windows 10 or later NOTE: ONLY WORKS IN WINDOWS 10 OR LATER.
template<typename T>
void ciof::input (const std::string &_prompt, T *_var)
 Get full input from the user with a prompt.
template<typename T>
void ciof::input (T *_var)
 Get full input from the user.
template<typename T, typename ... Args>
std::string ciof::impl::parse (T _fmt, Args ... _args)
 Parse the params for printing and echoing.
void ciof::print ()
 Print a new line.
template<typename T>
void ciof::print (T _t)
 Print to the standard output for _t
template<typename T, typename ... Args>
void ciof::print (T _t, Args ... _args)
 Print to the standard output for _t
template<typename T>
void ciof::printError (T _t)
 Print to the standard error for _t
template<typename T, typename ... Args>
void ciof::printError (T _t, Args ... _args)
 Print to the standard error for _t
template<typename T>
void ciof::printLog (T _t)
 Print to the standard log for _t
template<typename T, typename ... Args>
void ciof::printLog (T _t, Args ... _args)
 Print to the standard log for _t
std::string ciof::rgbSet (unsigned int r, unsigned int g, unsigned int b)
 Set the RGB color in the terminal.
std::string ciof::styleReset ()
 Reset all the styles and colors in the terminal.
std::string ciof::styleSet (const OutputStyle &_style)
 Set the styles according to the OutputStyle type.
template<typename T>
std::string ciof::impl::toString (const T &_val)
 Convert to string safely.

Variables

CIOFOutputConfig ciof::outputConf
 Set default output configuration.

Macro Definition Documentation

◆ __CIOF_OK

#define __CIOF_OK

Definition at line 7 of file ciof.hpp.