![]() |
PhoenixMock
1.8.7
Tools to split/merge/print mock used in Phoenix
|
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <string>
Go to the source code of this file.
Enumerations | |
enum | PTerminalStyle { NONE = 0, BRIGHT = 1, UNDERLINED = 4, BLINK = 5, NEGATIVE = 7, POSITIVE = 27, BLACK = 30, RED = 31, GREEN = 32, YELLOW = 33, BLUE = 34, PURPLE = 35, CYAN = 36, WHITE = 37, BBLACK = 40, BRED = 41, BGREEN = 42, BYELLOW = 43, BBLUE = 44, BPURPLE = 45, BCYAN = 46, BWHITE = 47 } |
enum qui permet de ne pas avoir à se rappeler les codes couleurs du terminal More... | |
Functions | |
void | clearTerminal () |
fonction qui permet d'éffacer le terminal More... | |
std::string | colorString (const std::string &str, PTerminalStyle color) |
fonction qui permet de colorier du texte dans une string More... | |
short unsigned int | getNbColTerminal () |
fonction qui renvoie le nombre de colonnes du terminal More... | |
short unsigned int | getNbRowTerminal () |
fonction qui renvoie le nombre de lignes du terminal More... | |
void | printAll (const std::string &strLeft, char ch, const std::string &strRight) |
fonction qui écrit un texte dans la console en l'alignant à droite (ne prend pas en compte la couleur du texte) More... | |
void | printAllCerr (const std::string &strLeft, char ch, const std::string &strRight) |
fonction qui écrit un texte dans la console d'erreur en l'alignant à droite (ne prend pas en compte la couleur du texte) More... | |
void | printAllCol (const std::string &strLeft, char ch, const std::string &strRight) |
fonction qui écrit un texte dans la console en l'alignant à droite (prend en compte la couleur du texte) More... | |
void | printAllColCerr (const std::string &strLeft, char ch, const std::string &strRight) |
fonction qui écrit un texte dans la console d'erreur en l'alignant à droite (prend en compte la couleur du texte) More... | |
void | printColor (const std::string &str, PTerminalStyle color) |
fonction qui affiche un texte coloré dans le terminal More... | |
void | printColorCerr (const std::string &str, PTerminalStyle color) |
fonction qui affiche un texte coloré dans le terminal More... | |
void | printDelire (const std::string &str) |
fonction qui utilise toutes les couleur du terminal pour afficher un message More... | |
std::string | termBBlack () |
affiche le fond du terminal en noir More... | |
std::string | termBBlue () |
affiche le fond du terminal en bleu More... | |
std::string | termBCyan () |
affiche le fond du terminal en cyan More... | |
std::string | termBGreen () |
affiche le fond du terminal en vert More... | |
std::string | termBlack () |
affiche le terminal noir More... | |
std::string | termBlink () |
affiche le terminal clignotant More... | |
std::string | termBlue () |
affiche le terminal blue More... | |
std::string | termBPurple () |
affiche le fond du terminal en violet More... | |
std::string | termBRed () |
affiche le fond du terminal en rouge More... | |
std::string | termBright () |
affiche le terminal brillant More... | |
std::string | termBWhite () |
affiche le fond du terminal en blanc More... | |
std::string | termBYellow () |
affiche le fond du terminal en jaune More... | |
std::string | termCyan () |
affiche le terminal cyan More... | |
std::string | termDefault () |
affiche le terminal par défaut More... | |
std::string | termGreen () |
affiche le terminal vert More... | |
std::string | termNegative () |
affiche le terminal négatif More... | |
std::string | termPositive () |
affiche le terminal positif More... | |
std::string | termPurple () |
affiche le terminal violet More... | |
std::string | termRed () |
affiche le terminal rouge More... | |
std::string | termUnderlined () |
affiche le terminal souligné More... | |
std::string | termWhite () |
affiche le terminal blanc More... | |
std::string | termYellow () |
affiche le terminal jaune More... | |
void | textColor (const char *color) |
focntion qui permet de changer la couleur du texte dan le terminal More... | |
void | textColor (PTerminalStyle color) |
focntion qui permet de changer la couleur du texte dan le terminal More... | |
void | textColorCerr (const char *color) |
focntion qui permet de changer la couleur du texte dan le terminal (sortie d'erreur) More... | |
void | textColorCerr (PTerminalStyle color) |
focntion qui permet de changer la couleur du texte dan le terminal (sortie d'erreur) More... | |
enum PTerminalStyle |
enum qui permet de ne pas avoir à se rappeler les codes couleurs du terminal
Enumerator | |
---|---|
NONE | |
BRIGHT | |
UNDERLINED | |
BLINK | |
NEGATIVE | |
POSITIVE | |
BLACK | |
RED | |
GREEN | |
YELLOW | |
BLUE | |
PURPLE | |
CYAN | |
WHITE | |
BBLACK | |
BRED | |
BGREEN | |
BYELLOW | |
BBLUE | |
BPURPLE | |
BCYAN | |
BWHITE |
Definition at line 16 of file string_color.h.
void clearTerminal | ( | ) |
fonction qui permet d'éffacer le terminal
Definition at line 128 of file string_color.cpp.
Referenced by testStringColor().
std::string colorString | ( | const std::string & | str, |
PTerminalStyle | color | ||
) |
fonction qui permet de colorier du texte dans une string
str | : méssage à afficher dans le terminal |
color | : couleur des caractères dans le terminal |
Definition at line 181 of file string_color.cpp.
References createReleaseCurl::str.
Referenced by testStringColor().
short unsigned int getNbColTerminal | ( | ) |
fonction qui renvoie le nombre de colonnes du terminal
Definition at line 206 of file string_color.cpp.
Referenced by ProgressTime::initialisationProgressTime(), printAll(), printAllCerr(), printAllCol(), printAllColCerr(), and testStringColor().
short unsigned int getNbRowTerminal | ( | ) |
fonction qui renvoie le nombre de lignes du terminal
Definition at line 215 of file string_color.cpp.
Referenced by testStringColor().
void printAll | ( | const std::string & | strLeft, |
char | ch, | ||
const std::string & | strRight | ||
) |
fonction qui écrit un texte dans la console en l'alignant à droite (ne prend pas en compte la couleur du texte)
strLeft | : texte à écrire aligné à gauche |
ch | : caractère à afficher entre les deux |
strRight | : texte à écrire aligné à droite |
Definition at line 247 of file string_color.cpp.
References getNbColTerminal().
Referenced by testStringColor().
void printAllCerr | ( | const std::string & | strLeft, |
char | ch, | ||
const std::string & | strRight | ||
) |
fonction qui écrit un texte dans la console d'erreur en l'alignant à droite (ne prend pas en compte la couleur du texte)
strLeft | : texte à écrire aligné à gauche |
ch | : caractère à afficher entre les deux |
strRight | : texte à écrire aligné à droite |
Definition at line 268 of file string_color.cpp.
References getNbColTerminal().
Referenced by testStringColor().
void printAllCol | ( | const std::string & | strLeft, |
char | ch, | ||
const std::string & | strRight | ||
) |
fonction qui écrit un texte dans la console en l'alignant à droite (prend en compte la couleur du texte)
strLeft | : texte à écrire aligné à gauche |
ch | : caractère à afficher entre les deux |
strRight | : texte à écrire aligné à droite |
Definition at line 226 of file string_color.cpp.
References countNbChar(), and getNbColTerminal().
Referenced by testStringColor().
void printAllColCerr | ( | const std::string & | strLeft, |
char | ch, | ||
const std::string & | strRight | ||
) |
fonction qui écrit un texte dans la console d'erreur en l'alignant à droite (prend en compte la couleur du texte)
strLeft | : texte à écrire aligné à gauche |
ch | : caractère à afficher entre les deux |
strRight | : texte à écrire aligné à droite |
Definition at line 289 of file string_color.cpp.
References countNbChar(), and getNbColTerminal().
Referenced by testStringColor().
void printColor | ( | const std::string & | str, |
PTerminalStyle | color | ||
) |
fonction qui affiche un texte coloré dans le terminal
str | : méssage à afficher dans le terminal |
color | : couleur des caractères dans le terminal |
Definition at line 191 of file string_color.cpp.
References createReleaseCurl::str.
Referenced by testStringColor().
void printColorCerr | ( | const std::string & | str, |
PTerminalStyle | color | ||
) |
fonction qui affiche un texte coloré dans le terminal
str | : méssage à afficher dans le terminal |
color | : couleur des caractères dans le terminal |
Definition at line 199 of file string_color.cpp.
References createReleaseCurl::str.
Referenced by testStringColor().
void printDelire | ( | const std::string & | str | ) |
fonction qui utilise toutes les couleur du terminal pour afficher un message
str | : méssage à afficher dans le terminal |
Definition at line 163 of file string_color.cpp.
References createReleaseCurl::str, and textColor().
Referenced by testStringColor().
std::string termBBlack | ( | ) |
affiche le fond du terminal en noir
Definition at line 90 of file string_color.cpp.
Referenced by testStringColor().
std::string termBBlue | ( | ) |
affiche le fond du terminal en bleu
Definition at line 110 of file string_color.cpp.
Referenced by testStringColor().
std::string termBCyan | ( | ) |
affiche le fond du terminal en cyan
Definition at line 120 of file string_color.cpp.
Referenced by testStringColor().
std::string termBGreen | ( | ) |
affiche le fond du terminal en vert
Definition at line 100 of file string_color.cpp.
Referenced by testStringColor().
std::string termBlack | ( | ) |
affiche le terminal noir
Definition at line 50 of file string_color.cpp.
Referenced by testStringColor().
std::string termBlink | ( | ) |
affiche le terminal clignotant
Definition at line 35 of file string_color.cpp.
Referenced by testStringColor().
std::string termBlue | ( | ) |
affiche le terminal blue
Definition at line 70 of file string_color.cpp.
Referenced by testStringColor().
std::string termBPurple | ( | ) |
affiche le fond du terminal en violet
Definition at line 115 of file string_color.cpp.
Referenced by testStringColor().
std::string termBRed | ( | ) |
affiche le fond du terminal en rouge
Definition at line 95 of file string_color.cpp.
Referenced by testStringColor().
std::string termBright | ( | ) |
affiche le terminal brillant
Definition at line 25 of file string_color.cpp.
Referenced by testStringColor().
std::string termBWhite | ( | ) |
affiche le fond du terminal en blanc
Definition at line 125 of file string_color.cpp.
Referenced by testStringColor().
std::string termBYellow | ( | ) |
affiche le fond du terminal en jaune
Definition at line 105 of file string_color.cpp.
Referenced by testStringColor().
std::string termCyan | ( | ) |
affiche le terminal cyan
Definition at line 80 of file string_color.cpp.
Referenced by testStringColor().
std::string termDefault | ( | ) |
affiche le terminal par défaut
Definition at line 20 of file string_color.cpp.
Referenced by Option::checkArgument(), and testStringColor().
std::string termGreen | ( | ) |
affiche le terminal vert
Definition at line 60 of file string_color.cpp.
Referenced by testStringColor().
std::string termNegative | ( | ) |
affiche le terminal négatif
Definition at line 40 of file string_color.cpp.
Referenced by testStringColor().
std::string termPositive | ( | ) |
affiche le terminal positif
Definition at line 45 of file string_color.cpp.
Referenced by testStringColor().
std::string termPurple | ( | ) |
affiche le terminal violet
Definition at line 75 of file string_color.cpp.
Referenced by testStringColor().
std::string termRed | ( | ) |
affiche le terminal rouge
Definition at line 55 of file string_color.cpp.
Referenced by Option::checkArgument(), and testStringColor().
std::string termUnderlined | ( | ) |
affiche le terminal souligné
Definition at line 30 of file string_color.cpp.
Referenced by testStringColor().
std::string termWhite | ( | ) |
affiche le terminal blanc
Definition at line 85 of file string_color.cpp.
Referenced by testStringColor().
std::string termYellow | ( | ) |
affiche le terminal jaune
Definition at line 65 of file string_color.cpp.
Referenced by testStringColor().
void textColor | ( | const char * | color | ) |
focntion qui permet de changer la couleur du texte dan le terminal
color | : couleur des caractères dans le terminal |
Definition at line 135 of file string_color.cpp.
Referenced by printDelire(), and testStringColor().
void textColor | ( | PTerminalStyle | color | ) |
focntion qui permet de changer la couleur du texte dan le terminal
color | : couleur des caractères dans le terminal |
Definition at line 149 of file string_color.cpp.
void textColorCerr | ( | const char * | color | ) |
focntion qui permet de changer la couleur du texte dan le terminal (sortie d'erreur)
color | : couleur des caractères dans le terminal (sortie d'erreur) |
Definition at line 142 of file string_color.cpp.
Referenced by testStringColor().
void textColorCerr | ( | PTerminalStyle | color | ) |
focntion qui permet de changer la couleur du texte dan le terminal (sortie d'erreur)
color | : couleur des caractères dans le terminal (sortie d'erreur) |
Definition at line 156 of file string_color.cpp.