adding ansi color codes
This commit is contained in:
52
includes/ansi.hpp
Normal file
52
includes/ansi.hpp
Normal file
@@ -0,0 +1,52 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ansi.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/20 19:05:23 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/20 19:09:18 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef __ANSI__
|
||||
#define __ANSI__
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace AnsiColor
|
||||
{
|
||||
enum Codes
|
||||
{
|
||||
red = 31,
|
||||
green = 32,
|
||||
blue = 34,
|
||||
def = 0,
|
||||
black = 30,
|
||||
yellow = 33,
|
||||
magenta = 35,
|
||||
cyan = 36,
|
||||
white = 37,
|
||||
bg_red = 41,
|
||||
bg_green = 42,
|
||||
bg_blue = 44,
|
||||
bg_def = 0,
|
||||
bg_black = 40,
|
||||
bg_yellow = 43,
|
||||
bg_magenta = 45,
|
||||
bg_cyan = 46,
|
||||
bg_white = 47,
|
||||
reset = 0,
|
||||
bold = 1,
|
||||
underline = 4,
|
||||
inverse = 7,
|
||||
bold_off = 21,
|
||||
underline_off = 24,
|
||||
inverse_off = 27
|
||||
};
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const AnsiColor::Codes code);
|
||||
|
||||
#endif
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* array.h :+: :+: :+: */
|
||||
/* array.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/20 09:31:30 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/20 09:40:29 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/01/20 19:12:36 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ref_counter.h :+: :+: :+: */
|
||||
/* ref_counter.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/20 12:54:09 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/20 12:55:02 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/01/20 19:12:33 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* shared_ptr.h :+: :+: :+: */
|
||||
/* shared_ptr.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/20 10:09:02 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/20 13:08:04 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/01/20 19:12:42 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef __UNSTD_SHARED_PTR__
|
||||
#define __UNSTD_SHARED_PTR__
|
||||
|
||||
#include <unstd/bits/ref_counter.h>
|
||||
#include <unstd/bits/ref_counter.hpp>
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
|
||||
29
includes/unstd/string.hpp
Normal file
29
includes/unstd/string.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* string.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/20 19:13:26 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/20 19:14:55 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef __UNSTD_STRING__
|
||||
#define __UNSTD_STRING__
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace unstd
|
||||
{
|
||||
template <typename T>
|
||||
std::string toString(T n)
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ss << n;
|
||||
return ss.str();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* unique_ptr.h :+: :+: :+: */
|
||||
/* unique_ptr.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/20 09:40:56 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/20 10:06:54 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/01/20 19:12:51 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* weak_ptr.h :+: :+: :+: */
|
||||
/* weak_ptr.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/20 11:17:07 by maldavid #+# #+# */
|
||||
/* Updated: 2024/01/20 13:16:14 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/01/20 19:13:13 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef __UNSTD_WEAK_PTR__
|
||||
#define __UNSTD_WEAK_PTR__
|
||||
|
||||
#include <unstd/bits/ref_counter.h>
|
||||
#include <unstd/shared_ptr.h>
|
||||
#include <unstd/bits/ref_counter.hpp>
|
||||
#include <unstd/shared_ptr.hpp>
|
||||
|
||||
namespace unstd
|
||||
{
|
||||
@@ -46,6 +46,6 @@ namespace unstd
|
||||
};
|
||||
}
|
||||
|
||||
#include <unstd/weak_ptr.h>
|
||||
#include <unstd/weak_ptr.ipp>
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user