forked from University/epr24pr5-ojanssen2
34 lines
769 B
C++
34 lines
769 B
C++
#include "Task.h"
|
|
#include "Util.h"
|
|
#include "FormatError.h"
|
|
|
|
using err::FormatError;
|
|
using util::Util;
|
|
|
|
namespace models {
|
|
Task::Task(const int& id, const string& name, const string& description, const vector<int>& children): id(id), name(name), description(description), children(children) {}
|
|
|
|
Task::Task(): id(0), name(""), description(""), children({}) {}
|
|
|
|
ostream& Task::write(ostream& stream) {
|
|
stream << this;
|
|
return stream;
|
|
}
|
|
|
|
int Task::get_id() const {
|
|
return this->id;
|
|
}
|
|
|
|
string Task::get_name() const {
|
|
return this->name;
|
|
}
|
|
|
|
string Task::get_description() const {
|
|
return this->description;
|
|
}
|
|
|
|
vector<int> Task::get_children() const {
|
|
return this->children;
|
|
}
|
|
|
|
}
|