Initial commit
This commit is contained in:
commit
a96965f086
18 changed files with 265 additions and 0 deletions
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
*.o
|
||||
*.out
|
||||
|
||||
*.pdf
|
||||
|
||||
*.tar
|
34
Makefile
Normal file
34
Makefile
Normal file
|
@ -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
|
0
binome.txt
Normal file
0
binome.txt
Normal file
17
includes/Consultant.hpp
Normal file
17
includes/Consultant.hpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef TP5_CONSULTANT_HPP
|
||||
#define TP5_CONSULTANT_HPP 1
|
||||
|
||||
#include <iostream>
|
||||
|
||||
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
|
17
includes/Expert.hpp
Normal file
17
includes/Expert.hpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef TP5_EXPERT_HPP
|
||||
#define TP5_EXPERT_HPP 1
|
||||
|
||||
#include <iostream>
|
||||
|
||||
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
|
17
includes/Gestionnaire.hpp
Normal file
17
includes/Gestionnaire.hpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef TP5_GESTIONNAIRE_HPP
|
||||
#define TP5_GESTIONNAIRE_HPP 1
|
||||
|
||||
#include <iostream>
|
||||
|
||||
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
|
17
includes/Projet.hpp
Normal file
17
includes/Projet.hpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef TP5_PROJET_HPP
|
||||
#define TP5_PROJET_HPP 1
|
||||
|
||||
#include <iostream>
|
||||
|
||||
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
|
17
includes/ProtoProjet.hpp
Normal file
17
includes/ProtoProjet.hpp
Normal file
|
@ -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
|
17
includes/RunProjet.hpp
Normal file
17
includes/RunProjet.hpp
Normal file
|
@ -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
|
17
includes/Tache.hpp
Normal file
17
includes/Tache.hpp
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef TP5_TACHE_HPP
|
||||
#define TP5_TACHE_HPP 1
|
||||
|
||||
#include <iostream>
|
||||
|
||||
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
|
15
src/Consultant.cpp
Normal file
15
src/Consultant.cpp
Normal file
|
@ -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;
|
||||
}
|
15
src/Expert.cpp
Normal file
15
src/Expert.cpp
Normal file
|
@ -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;
|
||||
}
|
15
src/Gestionnaire.cpp
Normal file
15
src/Gestionnaire.cpp
Normal file
|
@ -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;
|
||||
}
|
15
src/Projet.cpp
Normal file
15
src/Projet.cpp
Normal file
|
@ -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;
|
||||
}
|
15
src/ProtoProjet.cpp
Normal file
15
src/ProtoProjet.cpp
Normal file
|
@ -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;
|
||||
}
|
15
src/RunProjet.cpp
Normal file
15
src/RunProjet.cpp
Normal file
|
@ -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;
|
||||
}
|
15
src/Tache.cpp
Normal file
15
src/Tache.cpp
Normal file
|
@ -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;
|
||||
}
|
1
src/main.cpp
Normal file
1
src/main.cpp
Normal file
|
@ -0,0 +1 @@
|
|||
int main(int argc, char const *argv[]) { return 0; }
|
Reference in a new issue