From 7539e90e6a492d8f51f826db8f93ddeb834cefd9 Mon Sep 17 00:00:00 2001 From: aortigos Date: Wed, 18 Feb 2026 10:39:09 +0100 Subject: [PATCH] Starting Intern Class --- ex03/Intern/Intern.cpp | 38 ++++++++++++++++++++++++++++++++++---- ex03/Intern/Intern.hpp | 18 ++++++++++-------- ex03/Makefile | 3 ++- 3 files changed, 46 insertions(+), 13 deletions(-) diff --git a/ex03/Intern/Intern.cpp b/ex03/Intern/Intern.cpp index 2b3cdca..bdf80d9 100644 --- a/ex03/Intern/Intern.cpp +++ b/ex03/Intern/Intern.cpp @@ -1,13 +1,43 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* Intern.cpp :+: :+: :+: */ +/* Intern.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: aortigos +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2026/02/15 18:00:27 by aortigos #+# #+# */ -/* Updated: 2026/02/06 02:28:09 by aortigos ### ########.fr */ +/* Created: 2026/02/18 10:36:05 by aortigos #+# #+# */ +/* Updated: 2026/02/18 10:36:05 by aortigos ### ########.fr */ /* */ /* ************************************************************************** */ #include "Intern.hpp" + +////////////////// +// Constructors // +////////////////// + +Intern::Intern() +{ + // std::cout << "Intern default constructor called" << std::endl; +} + +Intern::Intern(const Intern &other) +{ + *this = other; + // std::cout << "Intern copy constructor called" << std::endl; +} + +Intern& Intern::operator=(const Intern &other) +{ + if (this != &other) + { + // Copy attributes here + } + // std::cout << "Intern copy assignment operator called" << std::endl; + return (*this); +} + +Intern::~Intern() +{ + // std::cout << "Intern destructor called" << std::endl; +} diff --git a/ex03/Intern/Intern.hpp b/ex03/Intern/Intern.hpp index 12347d7..ee81dfe 100644 --- a/ex03/Intern/Intern.hpp +++ b/ex03/Intern/Intern.hpp @@ -1,27 +1,29 @@ /* ************************************************************************** */ /* */ /* ::: :::::::: */ -/* Intern.hpp :+: :+: :+: */ +/* Intern.hpp :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: aortigos +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ -/* Created: 2026/02/15 18:00:27 by aortigos #+# #+# */ -/* Updated: 2026/02/06 02:28:09 by aortigos ### ########.fr */ +/* Created: 2026/02/18 10:36:05 by aortigos #+# #+# */ +/* Updated: 2026/02/18 10:36:05 by aortigos ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef INTERN_HPP - # define INTERN_HPP # include class Intern { - private: - - public: + private: + public: + Intern(); + Intern(const Intern &other); + Intern& operator=(const Intern &other); + ~Intern(); }; #endif diff --git a/ex03/Makefile b/ex03/Makefile index 5c8edfe..2bcfdf2 100644 --- a/ex03/Makefile +++ b/ex03/Makefile @@ -4,7 +4,8 @@ SRC = main.cpp \ Bureaucrat/Bureaucrat.cpp AForm/AForm.cpp \ ShrubberyCreationForm/ShrubberyCreationForm.cpp \ RobotomyRequestForm/RobotomyRequestForm.cpp \ - PresidentialPardonForm/PresidentialPardonForm.cpp + PresidentialPardonForm/PresidentialPardonForm.cpp \ + Intern/Intern.cpp OBJ = $(SRC:.cpp=.o)