From a96965f0864af0091f0f3c2b6759d57d17b7dc1a Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 19 Oct 2023 23:05:11 +0200 Subject: [PATCH] Initial commit --- .gitignore | 6 ++++++ Makefile | 34 ++++++++++++++++++++++++++++++++++ binome.txt | 0 includes/Consultant.hpp | 17 +++++++++++++++++ includes/Expert.hpp | 17 +++++++++++++++++ includes/Gestionnaire.hpp | 17 +++++++++++++++++ includes/Projet.hpp | 17 +++++++++++++++++ includes/ProtoProjet.hpp | 17 +++++++++++++++++ includes/RunProjet.hpp | 17 +++++++++++++++++ includes/Tache.hpp | 17 +++++++++++++++++ src/Consultant.cpp | 15 +++++++++++++++ src/Expert.cpp | 15 +++++++++++++++ src/Gestionnaire.cpp | 15 +++++++++++++++ src/Projet.cpp | 15 +++++++++++++++ src/ProtoProjet.cpp | 15 +++++++++++++++ src/RunProjet.cpp | 15 +++++++++++++++ src/Tache.cpp | 15 +++++++++++++++ src/main.cpp | 1 + 18 files changed, 265 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 binome.txt create mode 100644 includes/Consultant.hpp create mode 100644 includes/Expert.hpp create mode 100644 includes/Gestionnaire.hpp create mode 100644 includes/Projet.hpp create mode 100644 includes/ProtoProjet.hpp create mode 100644 includes/RunProjet.hpp create mode 100644 includes/Tache.hpp create mode 100644 src/Consultant.cpp create mode 100644 src/Expert.cpp create mode 100644 src/Gestionnaire.cpp create mode 100644 src/Projet.cpp create mode 100644 src/ProtoProjet.cpp create mode 100644 src/RunProjet.cpp create mode 100644 src/Tache.cpp create mode 100644 src/main.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fe5cc77 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.o +*.out + +*.pdf + +*.tar diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e00bd3c --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +CXX = g++ +CXXFLAGS = --std=c++11 +RM = rm +TAR = tar -cf + +SOURCES = $(wildcard src/*.cpp) +OBJETS = $(patsubst %.cpp,%.cpp.o,$(notdir $(SOURCES))) + +EXE = tp5 +EXE_EXT = out + +%.cpp.o: src/%.cpp + $(CXX) -c -o $@ $< $(CXXFLAGS) $(DEVFLAGS) + +main: CXXFLAGS += -O3 +main: compilation + +dev: CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g +dev: CXXFLAGS += -Wold-style-cast -Wsign-conversion +dev: compilation + +compilation: $(OBJETS) + $(CXX) -o $(EXE).$(EXE_EXT) $(OBJETS) + +all: + main + +clean: + $(RM) $(OBJETS) $(EXE).$(EXE_EXT) *.tar + +archive: + $(TAR) "$(EXE).tar" $(SOURCES) $(wildcard includes/*.hpp) Makefile \ + binome.txt +# diagramme_uml.* explications.pdf diff --git a/binome.txt b/binome.txt new file mode 100644 index 0000000..e69de29 diff --git a/includes/Consultant.hpp b/includes/Consultant.hpp new file mode 100644 index 0000000..6915577 --- /dev/null +++ b/includes/Consultant.hpp @@ -0,0 +1,17 @@ +#ifndef TP5_CONSULTANT_HPP +#define TP5_CONSULTANT_HPP 1 + +#include + +class Consultant { + friend std::ostream &operator<<(std::ostream &, const Consultant &); + +public: + Consultant(); // constructor + virtual ~Consultant(); // destructor + + Consultant(const Consultant &); // copy constructor + const Consultant &operator=(const Consultant &); // copy assignement +}; + +#endif diff --git a/includes/Expert.hpp b/includes/Expert.hpp new file mode 100644 index 0000000..589149f --- /dev/null +++ b/includes/Expert.hpp @@ -0,0 +1,17 @@ +#ifndef TP5_EXPERT_HPP +#define TP5_EXPERT_HPP 1 + +#include + +class Expert { + friend std::ostream &operator<<(std::ostream &, const Expert &); + +public: + Expert(); // constructor + virtual ~Expert(); // destructor + + Expert(const Expert &); // copy constructor + const Expert &operator=(const Expert &); // copy assignement +}; + +#endif diff --git a/includes/Gestionnaire.hpp b/includes/Gestionnaire.hpp new file mode 100644 index 0000000..b563b38 --- /dev/null +++ b/includes/Gestionnaire.hpp @@ -0,0 +1,17 @@ +#ifndef TP5_GESTIONNAIRE_HPP +#define TP5_GESTIONNAIRE_HPP 1 + +#include + +class Gestionnaire { + friend std::ostream &operator<<(std::ostream &, const Gestionnaire &); + +public: + Gestionnaire(); // constructor + virtual ~Gestionnaire(); // destructor + + Gestionnaire(const Gestionnaire &); // copy constructor + const Gestionnaire &operator=(const Gestionnaire &); // copy assignement +}; + +#endif diff --git a/includes/Projet.hpp b/includes/Projet.hpp new file mode 100644 index 0000000..b6b5433 --- /dev/null +++ b/includes/Projet.hpp @@ -0,0 +1,17 @@ +#ifndef TP5_PROJET_HPP +#define TP5_PROJET_HPP 1 + +#include + +class Projet { + friend std::ostream &operator<<(std::ostream &, const Projet &); + +public: + Projet(); // constructor + virtual ~Projet(); // destructor + + Projet(const Projet &); // copy constructor + const Projet &operator=(const Projet &); // copy assignement +}; + +#endif diff --git a/includes/ProtoProjet.hpp b/includes/ProtoProjet.hpp new file mode 100644 index 0000000..2a28556 --- /dev/null +++ b/includes/ProtoProjet.hpp @@ -0,0 +1,17 @@ +#ifndef TP5_PROTOPROJET_HPP +#define TP5_PROTOPROJET_HPP 1 + +#include "Projet.hpp" + +class ProtoProjet : public Projet { + friend std::ostream &operator<<(std::ostream &, const ProtoProjet &); + +public: + ProtoProjet(); // constructor + virtual ~ProtoProjet(); // destructor + + ProtoProjet(const ProtoProjet &); // copy constructor + const ProtoProjet &operator=(const ProtoProjet &); // copy assignement +}; + +#endif diff --git a/includes/RunProjet.hpp b/includes/RunProjet.hpp new file mode 100644 index 0000000..74aa24c --- /dev/null +++ b/includes/RunProjet.hpp @@ -0,0 +1,17 @@ +#ifndef TP5_RUNPROJET_HPP +#define TP5_RUNPROJET_HPP 1 + +#include "ProtoProjet.hpp" + +class RunProjet : public ProtoProjet { + friend std::ostream &operator<<(std::ostream &, const RunProjet &); + +public: + RunProjet(); // constructor + virtual ~RunProjet(); // destructor + + RunProjet(const RunProjet &); // copy constructor + const RunProjet &operator=(const RunProjet &); // copy assignement +}; + +#endif diff --git a/includes/Tache.hpp b/includes/Tache.hpp new file mode 100644 index 0000000..563ec3a --- /dev/null +++ b/includes/Tache.hpp @@ -0,0 +1,17 @@ +#ifndef TP5_TACHE_HPP +#define TP5_TACHE_HPP 1 + +#include + +class Tache { + friend std::ostream &operator<<(std::ostream &, const Tache &); + +public: + Tache(); // constructor + virtual ~Tache(); // destructor + + Tache(const Tache &); // copy constructor + const Tache &operator=(const Tache &); // copy assignement +}; + +#endif diff --git a/src/Consultant.cpp b/src/Consultant.cpp new file mode 100644 index 0000000..b5ff8b5 --- /dev/null +++ b/src/Consultant.cpp @@ -0,0 +1,15 @@ +#include "../includes/Consultant.hpp" + +Consultant::Consultant() { std::cout << "Hello, Consultant!\n"; } + +Consultant::~Consultant() {} + +Consultant::Consultant(const Consultant &) {} + +const Consultant &Consultant::operator=(const Consultant &src) { + if (this == &src) { + return *this; + } + + return *this; +} diff --git a/src/Expert.cpp b/src/Expert.cpp new file mode 100644 index 0000000..40ba729 --- /dev/null +++ b/src/Expert.cpp @@ -0,0 +1,15 @@ +#include "../includes/Expert.hpp" + +Expert::Expert() { std::cout << "Hello, Expert!\n"; } + +Expert::~Expert() {} + +Expert::Expert(const Expert &) {} + +const Expert &Expert::operator=(const Expert &src) { + if (this == &src) { + return *this; + } + + return *this; +} diff --git a/src/Gestionnaire.cpp b/src/Gestionnaire.cpp new file mode 100644 index 0000000..91ac278 --- /dev/null +++ b/src/Gestionnaire.cpp @@ -0,0 +1,15 @@ +#include "../includes/Gestionnaire.hpp" + +Gestionnaire::Gestionnaire() { std::cout << "Hello, Gestionnaire!\n"; } + +Gestionnaire::~Gestionnaire() {} + +Gestionnaire::Gestionnaire(const Gestionnaire &) {} + +const Gestionnaire &Gestionnaire::operator=(const Gestionnaire &src) { + if (this == &src) { + return *this; + } + + return *this; +} diff --git a/src/Projet.cpp b/src/Projet.cpp new file mode 100644 index 0000000..094dde4 --- /dev/null +++ b/src/Projet.cpp @@ -0,0 +1,15 @@ +#include "../includes/Projet.hpp" + +Projet::Projet() { std::cout << "Hello, project!\n"; } + +Projet::~Projet() {} + +Projet::Projet(const Projet &) {} + +const Projet &Projet::operator=(const Projet &src) { + if (this == &src) { + return *this; + } + + return *this; +} diff --git a/src/ProtoProjet.cpp b/src/ProtoProjet.cpp new file mode 100644 index 0000000..0a695b5 --- /dev/null +++ b/src/ProtoProjet.cpp @@ -0,0 +1,15 @@ +#include "../includes/ProtoProjet.hpp" + +ProtoProjet::ProtoProjet() { std::cout << "Hello, protoProject!\n"; } + +ProtoProjet::~ProtoProjet() {} + +ProtoProjet::ProtoProjet(const ProtoProjet &) {} + +const ProtoProjet &ProtoProjet::operator=(const ProtoProjet &src) { + if (this == &src) { + return *this; + } + + return *this; +} diff --git a/src/RunProjet.cpp b/src/RunProjet.cpp new file mode 100644 index 0000000..500fc08 --- /dev/null +++ b/src/RunProjet.cpp @@ -0,0 +1,15 @@ +#include "../includes/RunProjet.hpp" + +RunProjet::RunProjet() { std::cout << "Hello, runProject!\n"; } + +RunProjet::~RunProjet() {} + +RunProjet::RunProjet(const RunProjet &) {} + +const RunProjet &RunProjet::operator=(const RunProjet &src) { + if (this == &src) { + return *this; + } + + return *this; +} diff --git a/src/Tache.cpp b/src/Tache.cpp new file mode 100644 index 0000000..e4f0d9c --- /dev/null +++ b/src/Tache.cpp @@ -0,0 +1,15 @@ +#include "../includes/Tache.hpp" + +Tache::Tache() { std::cout << "Hello, tache!\n"; } + +Tache::~Tache() {} + +Tache::Tache(const Tache &) {} + +const Tache &Tache::operator=(const Tache &src) { + if (this == &src) { + return *this; + } + + return *this; +} diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..06e216a --- /dev/null +++ b/src/main.cpp @@ -0,0 +1 @@ +int main(int argc, char const *argv[]) { return 0; }