aboutsummaryrefslogtreecommitdiff
path: root/backend/Object.cpp
blob: e14c780381b5be993b7e15f726a675858f536aeb (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
#include <string.h>
#include <stdlib.h>

#include "Object.h"

#include "util.h"

Object::Object(const char * name, const char * description) {
	this->set_name(name);
	this->set_description(description);
}

Object::~Object() {
	safe_free(this->name);
	safe_free(this->description);
}

void Object::set_name(const char * name) {
	safe_free(this->name);
	this->name = strdup(name);
}
const char * Object::get_name() {
	return this->name;
}

void Object::set_description(const char * description) {
	safe_free(this->description);
	this->description = strdup(description);
}
const char * Object::get_description() {
	return this->description;
}

void Object::set_hidden(bool hidden) {
	this->hidden = hidden;
}
bool Object::get_hidden() {
	return this->hidden;
}