From 2d6b2ddb831ccf1ad7ba915c59566df847412c72 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 23 Dec 2024 14:36:04 +0100 Subject: [PATCH] style: use my one (with logic) norm for header hope u enjoy it --- cpp00/ex01/includes/color.hpp | 66 +++++++++---------- cpp00/ex01/includes/phonebook.hpp | 84 ++++++++++++------------ cpp01/ex00/Zombie.hpp | 36 +++++------ cpp01/ex00/main.cpp | 3 +- cpp01/ex01/Zombie.hpp | 104 +++++++++++++++--------------- cpp01/ex03/HumanA.hpp | 32 ++++----- cpp01/ex03/HumanB.hpp | 36 +++++------ cpp01/ex03/Weapon.hpp | 46 ++++++------- cpp01/ex04/color.hpp | 66 +++++++++---------- cpp01/ex04/err_msg.hpp | 18 +++--- cpp01/ex04/sed.hpp | 46 ++++++------- cpp01/ex05/Harl.hpp | 48 +++++++------- cpp01/ex06/Harl.hpp | 46 ++++++------- 13 files changed, 316 insertions(+), 315 deletions(-) diff --git a/cpp00/ex01/includes/color.hpp b/cpp00/ex01/includes/color.hpp index cd7cfa9..facac79 100644 --- a/cpp00/ex01/includes/color.hpp +++ b/cpp00/ex01/includes/color.hpp @@ -6,42 +6,42 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/17 15:27:54 by rparodi #+# #+# */ -/* Updated: 2024/10/17 15:48:22 by rparodi ### ########.fr */ +/* Updated: 2024/12/23 12:36:02 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef COLOR_HPP -#define COLOR_HPP - -#define CLR_RESET "\033[0m" - -#define CLR_BLACK "\033[0;30m" -#define CLR_RED "\033[0;31m" -#define CLR_GREEN "\033[0;32m" -#define CLR_YELLOW "\033[0;33m" -#define CLR_BLUE "\033[0;34m" -#define CLR_MAGENTA "\033[0;35m" -#define CLR_CYAN "\033[0;36m" -#define CLR_WHITE "\033[0;37m" -#define CLR_GOLD "\033[38;5;220m" -#define CLR_GREY "\033[38;5;240m" - -#define CLR_LIGHT_BLACK "\033[0;90m" -#define CLR_LIGHT_RED "\033[0;91m" -#define CLR_LIGHT_GREEN "\033[0;92m" -#define CLR_LIGHT_YELLOW "\033[0;93m" -#define CLR_LIGHT_BLUE "\033[0;94m" -#define CLR_LIGHT_MAGENTA "\033[0;95m" -#define CLR_LIGHT_CYAN "\033[0;96m" -#define CLR_LIGHT_WHITE "\033[0;97m" - -#define CLR_BOLD_BLACK "\033[1;30m" -#define CLR_BOLD_RED "\033[1;31m" -#define CLR_BOLD_GREEN "\033[1;32m" -#define CLR_BOLD_YELLOW "\033[1;33m" -#define CLR_BOLD_BLUE "\033[1;34m" -#define CLR_BOLD_MAGENTA "\033[1;35m" -#define CLR_BOLD_CYAN "\033[1;36m" -#define CLR_BOLD_WHITE "\033[1;37m" + #define COLOR_HPP + + #define CLR_RESET "\033[0m" + + #define CLR_BLACK "\033[0;30m" + #define CLR_RED "\033[0;31m" + #define CLR_GREEN "\033[0;32m" + #define CLR_YELLOW "\033[0;33m" + #define CLR_BLUE "\033[0;34m" + #define CLR_MAGENTA "\033[0;35m" + #define CLR_CYAN "\033[0;36m" + #define CLR_WHITE "\033[0;37m" + #define CLR_GOLD "\033[38;5;220m" + #define CLR_GREY "\033[38;5;240m" + + #define CLR_LIGHT_BLACK "\033[0;90m" + #define CLR_LIGHT_RED "\033[0;91m" + #define CLR_LIGHT_GREEN "\033[0;92m" + #define CLR_LIGHT_YELLOW "\033[0;93m" + #define CLR_LIGHT_BLUE "\033[0;94m" + #define CLR_LIGHT_MAGENTA "\033[0;95m" + #define CLR_LIGHT_CYAN "\033[0;96m" + #define CLR_LIGHT_WHITE "\033[0;97m" + + #define CLR_BOLD_BLACK "\033[1;30m" + #define CLR_BOLD_RED "\033[1;31m" + #define CLR_BOLD_GREEN "\033[1;32m" + #define CLR_BOLD_YELLOW "\033[1;33m" + #define CLR_BOLD_BLUE "\033[1;34m" + #define CLR_BOLD_MAGENTA "\033[1;35m" + #define CLR_BOLD_CYAN "\033[1;36m" + #define CLR_BOLD_WHITE "\033[1;37m" #endif diff --git a/cpp00/ex01/includes/phonebook.hpp b/cpp00/ex01/includes/phonebook.hpp index 3f54b92..3e69a39 100644 --- a/cpp00/ex01/includes/phonebook.hpp +++ b/cpp00/ex01/includes/phonebook.hpp @@ -6,56 +6,56 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/17 14:56:49 by rparodi #+# #+# */ -/* Updated: 2024/10/22 14:06:11 by rparodi ### ########.fr */ +/* Updated: 2024/12/23 12:36:19 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef PHONEBOOK_HPP -# define PHONEBOOK_HPP + #define PHONEBOOK_HPP -#include -#include -#include -#include -#include -#include "color.hpp" + #include + #include + #include + #include + #include + #include "color.hpp" -#define MENU CLR_BLUE << "ADD" << CLR_RESET << ":\tAdding a new contact" << std::endl << CLR_BLUE << "SEARCH" << CLR_RESET << ":\tSearching a contact in the list" << std::endl << CLR_BLUE << "EXIT" << CLR_RESET << ":\texit the program" << std::endl + #define MENU CLR_BLUE << "ADD" << CLR_RESET << ":\tAdding a new contact" << std::endl << CLR_BLUE << "SEARCH" << CLR_RESET << ":\tSearching a contact in the list" << std::endl << CLR_BLUE << "EXIT" << CLR_RESET << ":\texit the program" << std::endl -std::string get_input(const char *err_msg, std::string file, int line); + std::string get_input(const char *err_msg, std::string file, int line); -class Contact -{ - public: - Contact(); - ~Contact(); - void init_new(int id); - void print_all(); - void print(); - bool getUsed(); - void setUsed(); - void clear(); - private: - std::string _get_number(const char *err_msg, std::string file, int line); - bool _used; - int _id; - std::string _first_name; - std::string _last_name; - std::string _nickname; - std::string _number; - std::string _secret; -}; + class Contact + { + public: + Contact(); + ~Contact(); + void init_new(int id); + void print_all(); + void print(); + bool getUsed(); + void setUsed(); + void clear(); + private: + std::string _get_number(const char *err_msg, std::string file, int line); + bool _used; + int _id; + std::string _first_name; + std::string _last_name; + std::string _nickname; + std::string _number; + std::string _secret; + }; -class PhoneBook -{ - public: - PhoneBook(); - ~PhoneBook(); - void add(int id); - Contact array_contact[8]; - void search(); - private: - void searching_header(); -}; + class PhoneBook + { + public: + PhoneBook(); + ~PhoneBook(); + void add(int id); + Contact array_contact[8]; + void search(); + private: + void searching_header(); + }; #endif diff --git a/cpp01/ex00/Zombie.hpp b/cpp01/ex00/Zombie.hpp index 500f67a..6658bb2 100644 --- a/cpp01/ex00/Zombie.hpp +++ b/cpp01/ex00/Zombie.hpp @@ -6,27 +6,27 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/04 16:03:03 by rparodi #+# #+# */ -/* Updated: 2024/11/04 16:31:17 by rparodi ### ########.fr */ +/* Updated: 2024/12/23 12:36:49 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef ZOMBIE_HPP -# define ZOMBIE_HPP - -#include -#include - -class Zombie -{ - public: - Zombie(std::string name); - ~Zombie(); - void announce(void); - private: - std::string _name; -}; - -Zombie* newZombie( std::string name ); -void randomChump( std::string name ); + #define ZOMBIE_HPP + + #include + #include + + class Zombie + { + public: + Zombie(std::string name); + ~Zombie(); + void announce(void); + private: + std::string _name; + }; + + Zombie* newZombie( std::string name ); + void randomChump( std::string name ); #endif diff --git a/cpp01/ex00/main.cpp b/cpp01/ex00/main.cpp index 8def09e..110ead6 100644 --- a/cpp01/ex00/main.cpp +++ b/cpp01/ex00/main.cpp @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/04 15:48:46 by rparodi #+# #+# */ -/* Updated: 2024/11/04 16:40:59 by rparodi ### ########.fr */ +/* Updated: 2024/12/17 23:05:23 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #include "Zombie.hpp" + int main() { Zombie roger = Zombie("Roger"); diff --git a/cpp01/ex01/Zombie.hpp b/cpp01/ex01/Zombie.hpp index dfc1b17..48a4652 100644 --- a/cpp01/ex01/Zombie.hpp +++ b/cpp01/ex01/Zombie.hpp @@ -6,60 +6,60 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/04 16:03:03 by rparodi #+# #+# */ -/* Updated: 2024/11/05 12:55:24 by rparodi ### ########.fr */ +/* Updated: 2024/12/23 12:38:52 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef ZOMBIE_HPP -# define ZOMBIE_HPP - -#include -#include -#include - -class Zombie -{ - public: - Zombie(); - ~Zombie(); - void announce(void); - void setName( std::string name ); - private: - std::string _name; -}; - -Zombie* zombieHorde( int N, std::string name ); - - -#define CLR_RESET "\033[0m" - -#define CLR_BLACK "\033[0;30m" -#define CLR_RED "\033[0;31m" -#define CLR_GREEN "\033[0;32m" -#define CLR_YELLOW "\033[0;33m" -#define CLR_BLUE "\033[0;34m" -#define CLR_MAGENTA "\033[0;35m" -#define CLR_CYAN "\033[0;36m" -#define CLR_WHITE "\033[0;37m" -#define CLR_GOLD "\033[38;5;220m" -#define CLR_GREY "\033[38;5;240m" - -#define CLR_LIGHT_BLACK "\033[0;90m" -#define CLR_LIGHT_RED "\033[0;91m" -#define CLR_LIGHT_GREEN "\033[0;92m" -#define CLR_LIGHT_YELLOW "\033[0;93m" -#define CLR_LIGHT_BLUE "\033[0;94m" -#define CLR_LIGHT_MAGENTA "\033[0;95m" -#define CLR_LIGHT_CYAN "\033[0;96m" -#define CLR_LIGHT_WHITE "\033[0;97m" - -#define CLR_BOLD_BLACK "\033[1;30m" -#define CLR_BOLD_RED "\033[1;31m" -#define CLR_BOLD_GREEN "\033[1;32m" -#define CLR_BOLD_YELLOW "\033[1;33m" -#define CLR_BOLD_BLUE "\033[1;34m" -#define CLR_BOLD_MAGENTA "\033[1;35m" -#define CLR_BOLD_CYAN "\033[1;36m" -#define CLR_BOLD_WHITE "\033[1;37m" - + # define ZOMBIE_HPP + + #include + #include + #include + + class Zombie + { + public: + Zombie(); + ~Zombie(); + void announce(void); + void setName( std::string name ); + private: + std::string _name; + }; + + Zombie* zombieHorde( int N, std::string name ); + + + #define CLR_RESET "\033[0m" + + #define CLR_BLACK "\033[0;30m" + #define CLR_RED "\033[0;31m" + #define CLR_GREEN "\033[0;32m" + #define CLR_YELLOW "\033[0;33m" + #define CLR_BLUE "\033[0;34m" + #define CLR_MAGENTA "\033[0;35m" + #define CLR_CYAN "\033[0;36m" + #define CLR_WHITE "\033[0;37m" + #define CLR_GOLD "\033[38;5;220m" + #define CLR_GREY "\033[38;5;240m" + + #define CLR_LIGHT_BLACK "\033[0;90m" + #define CLR_LIGHT_RED "\033[0;91m" + #define CLR_LIGHT_GREEN "\033[0;92m" + #define CLR_LIGHT_YELLOW "\033[0;93m" + #define CLR_LIGHT_BLUE "\033[0;94m" + #define CLR_LIGHT_MAGENTA "\033[0;95m" + #define CLR_LIGHT_CYAN "\033[0;96m" + #define CLR_LIGHT_WHITE "\033[0;97m" + + #define CLR_BOLD_BLACK "\033[1;30m" + #define CLR_BOLD_RED "\033[1;31m" + #define CLR_BOLD_GREEN "\033[1;32m" + #define CLR_BOLD_YELLOW "\033[1;33m" + #define CLR_BOLD_BLUE "\033[1;34m" + #define CLR_BOLD_MAGENTA "\033[1;35m" + #define CLR_BOLD_CYAN "\033[1;36m" + #define CLR_BOLD_WHITE "\033[1;37m" + #endif diff --git a/cpp01/ex03/HumanA.hpp b/cpp01/ex03/HumanA.hpp index 637df78..50c959b 100644 --- a/cpp01/ex03/HumanA.hpp +++ b/cpp01/ex03/HumanA.hpp @@ -6,25 +6,25 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/05 13:34:19 by rparodi #+# #+# */ -/* Updated: 2024/11/05 14:23:03 by rparodi ### ########.fr */ +/* Updated: 2024/12/23 12:38:16 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef HUMANA_HPP -#define HUMANA_HPP - -#include "Weapon.hpp" -#include -#include - -class HumanA { - public: - HumanA(std::string name, Weapon &toGive); - ~HumanA(); - void attack(); - private: - std::string _name; - Weapon *_weapon; -}; + #define HUMANA_HPP + + #include "Weapon.hpp" + #include + #include + + class HumanA { + public: + HumanA(std::string name, Weapon &toGive); + ~HumanA(); + void attack(); + private: + std::string _name; + Weapon *_weapon; + }; #endif diff --git a/cpp01/ex03/HumanB.hpp b/cpp01/ex03/HumanB.hpp index f058d2c..4be1c8d 100644 --- a/cpp01/ex03/HumanB.hpp +++ b/cpp01/ex03/HumanB.hpp @@ -6,27 +6,27 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/05 13:34:19 by rparodi #+# #+# */ -/* Updated: 2024/11/05 14:32:31 by rparodi ### ########.fr */ +/* Updated: 2024/12/23 12:38:24 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef HUMANB_HPP -#define HUMANB_HPP - -#include "Weapon.hpp" -#include -#include - -class HumanB { - public: - HumanB(std::string name); - ~HumanB(); - void attack(); - void setWeapon(Weapon &_toGive); - private: - std::string _name; - bool _isArmed; - Weapon *_weaponGiven; -}; + #define HUMANB_HPP + + #include "Weapon.hpp" + #include + #include + + class HumanB { + public: + HumanB(std::string name); + ~HumanB(); + void attack(); + void setWeapon(Weapon &_toGive); + private: + std::string _name; + bool _isArmed; + Weapon *_weaponGiven; + }; #endif diff --git a/cpp01/ex03/Weapon.hpp b/cpp01/ex03/Weapon.hpp index aefcd6f..956d25c 100644 --- a/cpp01/ex03/Weapon.hpp +++ b/cpp01/ex03/Weapon.hpp @@ -6,32 +6,32 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/05 13:24:43 by rparodi #+# #+# */ -/* Updated: 2024/11/05 14:25:09 by rparodi ### ########.fr */ +/* Updated: 2024/12/23 12:38:07 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef WEAPON_HPP -#define WEAPON_HPP - -#include -#include - -class Weapon { - public: - Weapon(std::string type); - ~Weapon(); - std::string getType(); - void setType(std::string type); - private: - std::string _type; -}; - -#define CLR_RESET "\033[0m" - -#define CLR_YELLOW "\033[0;33m" -#define CLR_GOLD "\033[38;5;220m" - -#define CLR_BLUE "\033[0;34m" -#define CLR_CYAN "\033[0;36m" + #define WEAPON_HPP + + #include + #include + + class Weapon { + public: + Weapon(std::string type); + ~Weapon(); + std::string getType(); + void setType(std::string type); + private: + std::string _type; + }; + + #define CLR_RESET "\033[0m" + + #define CLR_YELLOW "\033[0;33m" + #define CLR_GOLD "\033[38;5;220m" + + #define CLR_BLUE "\033[0;34m" + #define CLR_CYAN "\033[0;36m" #endif diff --git a/cpp01/ex04/color.hpp b/cpp01/ex04/color.hpp index cd7cfa9..02459b3 100644 --- a/cpp01/ex04/color.hpp +++ b/cpp01/ex04/color.hpp @@ -6,42 +6,42 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/17 15:27:54 by rparodi #+# #+# */ -/* Updated: 2024/10/17 15:48:22 by rparodi ### ########.fr */ +/* Updated: 2024/12/23 12:37:37 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef COLOR_HPP -#define COLOR_HPP - -#define CLR_RESET "\033[0m" - -#define CLR_BLACK "\033[0;30m" -#define CLR_RED "\033[0;31m" -#define CLR_GREEN "\033[0;32m" -#define CLR_YELLOW "\033[0;33m" -#define CLR_BLUE "\033[0;34m" -#define CLR_MAGENTA "\033[0;35m" -#define CLR_CYAN "\033[0;36m" -#define CLR_WHITE "\033[0;37m" -#define CLR_GOLD "\033[38;5;220m" -#define CLR_GREY "\033[38;5;240m" - -#define CLR_LIGHT_BLACK "\033[0;90m" -#define CLR_LIGHT_RED "\033[0;91m" -#define CLR_LIGHT_GREEN "\033[0;92m" -#define CLR_LIGHT_YELLOW "\033[0;93m" -#define CLR_LIGHT_BLUE "\033[0;94m" -#define CLR_LIGHT_MAGENTA "\033[0;95m" -#define CLR_LIGHT_CYAN "\033[0;96m" -#define CLR_LIGHT_WHITE "\033[0;97m" - -#define CLR_BOLD_BLACK "\033[1;30m" -#define CLR_BOLD_RED "\033[1;31m" -#define CLR_BOLD_GREEN "\033[1;32m" -#define CLR_BOLD_YELLOW "\033[1;33m" -#define CLR_BOLD_BLUE "\033[1;34m" -#define CLR_BOLD_MAGENTA "\033[1;35m" -#define CLR_BOLD_CYAN "\033[1;36m" -#define CLR_BOLD_WHITE "\033[1;37m" + #define COLOR_HPP + + #define CLR_RESET "\033[0m" + + #define CLR_BLACK "\033[0;30m" + #define CLR_RED "\033[0;31m" + #define CLR_GREEN "\033[0;32m" + #define CLR_YELLOW "\033[0;33m" + #define CLR_BLUE "\033[0;34m" + #define CLR_MAGENTA "\033[0;35m" + #define CLR_CYAN "\033[0;36m" + #define CLR_WHITE "\033[0;37m" + #define CLR_GOLD "\033[38;5;220m" + #define CLR_GREY "\033[38;5;240m" + + #define CLR_LIGHT_BLACK "\033[0;90m" + #define CLR_LIGHT_RED "\033[0;91m" + #define CLR_LIGHT_GREEN "\033[0;92m" + #define CLR_LIGHT_YELLOW "\033[0;93m" + #define CLR_LIGHT_BLUE "\033[0;94m" + #define CLR_LIGHT_MAGENTA "\033[0;95m" + #define CLR_LIGHT_CYAN "\033[0;96m" + #define CLR_LIGHT_WHITE "\033[0;97m" + + #define CLR_BOLD_BLACK "\033[1;30m" + #define CLR_BOLD_RED "\033[1;31m" + #define CLR_BOLD_GREEN "\033[1;32m" + #define CLR_BOLD_YELLOW "\033[1;33m" + #define CLR_BOLD_BLUE "\033[1;34m" + #define CLR_BOLD_MAGENTA "\033[1;35m" + #define CLR_BOLD_CYAN "\033[1;36m" + #define CLR_BOLD_WHITE "\033[1;37m" #endif diff --git a/cpp01/ex04/err_msg.hpp b/cpp01/ex04/err_msg.hpp index 7f229ce..04543ed 100644 --- a/cpp01/ex04/err_msg.hpp +++ b/cpp01/ex04/err_msg.hpp @@ -6,18 +6,18 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/05 15:26:18 by rparodi #+# #+# */ -/* Updated: 2024/11/06 16:35:49 by rparodi ### ########.fr */ +/* Updated: 2024/12/23 12:39:18 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef ERR_MSG_HPP -# define ERR_MSG_HPP - -#include "color.hpp" - -#define ERR_PREFIX "Error:\n" -#define ARGS_MISSING "Please give 3 arguments: !" -#define FILE_CANT_OPEN ": The file cannot be open !" -#define FILE_CANT_READ ": The file connot be read !" + #define ERR_MSG_HPP + + #include "color.hpp" + + #define ERR_PREFIX "Error:\n" + #define ARGS_MISSING "Please give 3 arguments: !" + #define FILE_CANT_OPEN ": The file cannot be open !" + #define FILE_CANT_READ ": The file connot be read !" #endif diff --git a/cpp01/ex04/sed.hpp b/cpp01/ex04/sed.hpp index d2e481c..e541fdf 100644 --- a/cpp01/ex04/sed.hpp +++ b/cpp01/ex04/sed.hpp @@ -6,32 +6,32 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/05 15:27:45 by rparodi #+# #+# */ -/* Updated: 2024/11/06 15:56:45 by rparodi ### ########.fr */ +/* Updated: 2024/12/23 12:36:59 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef SED_HPP -#define SED_HPP - -#include -#include -#include -#include - -#include "err_msg.hpp" - -class Sed -{ - public: - Sed(char **argv, std::ifstream *input); - ~Sed(); - bool line(std::ofstream& output); - const char *getFilename(); - private: - std::string _filename; - std::string _to_replace; - std::string _by_word; - std::ifstream *_input; -}; + #define SED_HPP + + #include + #include + #include + #include + + #include "err_msg.hpp" + + class Sed + { + public: + Sed(char **argv, std::ifstream *input); + ~Sed(); + bool line(std::ofstream& output); + const char *getFilename(); + private: + std::string _filename; + std::string _to_replace; + std::string _by_word; + std::ifstream *_input; + }; #endif diff --git a/cpp01/ex05/Harl.hpp b/cpp01/ex05/Harl.hpp index fe26d3e..7b6c417 100644 --- a/cpp01/ex05/Harl.hpp +++ b/cpp01/ex05/Harl.hpp @@ -6,32 +6,32 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/06 17:37:15 by rparodi #+# #+# */ -/* Updated: 2024/11/06 19:43:33 by rparodi ### ########.fr */ +/* Updated: 2024/12/23 12:37:09 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef HARL_HPP -#define HARL_HPP - -#include -#include - -#define DEBUG_MSG "I love having extra bacon for my 7XL-double-cheese-triple-pickle-special- ketchup burger. I really do!" -#define ERROR_MSG "This is unacceptable! I want to speak to the manager now." -#define INFO_MSG "I cannot believe adding extra bacon costs more money. You didn’t put enough bacon in my burger! If you did, I wouldn’t be asking for more!" -#define WARN_MSG "I think I deserve to have some extra bacon for free. I’ve been coming for years whereas you started working here since last month." - -class Harl -{ - public: - Harl(); - ~Harl(); - void complain(std::string level); - private: - void debug(void); - void info(void); - void warning(void); - void error(void); -}; - + #define HARL_HPP + + #include + #include + + #define DEBUG_MSG "I love having extra bacon for my 7XL-double-cheese-triple-pickle-special- ketchup burger. I really do!" + #define ERROR_MSG "This is unacceptable! I want to speak to the manager now." + #define INFO_MSG "I cannot believe adding extra bacon costs more money. You didn’t put enough bacon in my burger! If you did, I wouldn’t be asking for more!" + #define WARN_MSG "I think I deserve to have some extra bacon for free. I’ve been coming for years whereas you started working here since last month." + + class Harl + { + public: + Harl(); + ~Harl(); + void complain(std::string level); + private: + void debug(void); + void info(void); + void warning(void); + void error(void); + }; + #endif diff --git a/cpp01/ex06/Harl.hpp b/cpp01/ex06/Harl.hpp index fe26d3e..a61fac6 100644 --- a/cpp01/ex06/Harl.hpp +++ b/cpp01/ex06/Harl.hpp @@ -6,32 +6,32 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/11/06 17:37:15 by rparodi #+# #+# */ -/* Updated: 2024/11/06 19:43:33 by rparodi ### ########.fr */ +/* Updated: 2024/12/23 12:37:22 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef HARL_HPP -#define HARL_HPP - -#include -#include - -#define DEBUG_MSG "I love having extra bacon for my 7XL-double-cheese-triple-pickle-special- ketchup burger. I really do!" -#define ERROR_MSG "This is unacceptable! I want to speak to the manager now." -#define INFO_MSG "I cannot believe adding extra bacon costs more money. You didn’t put enough bacon in my burger! If you did, I wouldn’t be asking for more!" -#define WARN_MSG "I think I deserve to have some extra bacon for free. I’ve been coming for years whereas you started working here since last month." - -class Harl -{ - public: - Harl(); - ~Harl(); - void complain(std::string level); - private: - void debug(void); - void info(void); - void warning(void); - void error(void); -}; + #define HARL_HPP + + #include + #include + + #define DEBUG_MSG "I love having extra bacon for my 7XL-double-cheese-triple-pickle-special- ketchup burger. I really do!" + #define ERROR_MSG "This is unacceptable! I want to speak to the manager now." + #define INFO_MSG "I cannot believe adding extra bacon costs more money. You didn’t put enough bacon in my burger! If you did, I wouldn’t be asking for more!" + #define WARN_MSG "I think I deserve to have some extra bacon for free. I’ve been coming for years whereas you started working here since last month." + + class Harl + { + public: + Harl(); + ~Harl(); + void complain(std::string level); + private: + void debug(void); + void info(void); + void warning(void); + void error(void); + }; #endif