-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProjectFactory.cpp
More file actions
28 lines (26 loc) · 842 Bytes
/
ProjectFactory.cpp
File metadata and controls
28 lines (26 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "project.hpp"
class ProjectFactory
{
public:
ProjectFactory() {}
~ProjectFactory() {}
project* create(std::string name, std::string description,std::string date){
project * newProject = new project();
newProject->setName(name);
newProject->setDescription(description);
newProject->set_date(date);
return newProject;
}
Base* modifyName(Base* base, std::string name){
base->setName(name);
return base;
}
Base* modifyDescription(Base* base, std::string description){
base->setDescription(description);
return base;
}
Base* modifyDate(Base* base, std::string date){
base->set_date(date);
return base;
}
};