mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2025-02-20 15:14:26 +01:00
Remove the simple getters/setters from Resource. They are not needed anymore.
This commit is contained in:
parent
f9df80e197
commit
4c8920777f
@ -11,33 +11,8 @@
|
|||||||
#include "core/database/database_manager.h"
|
#include "core/database/database_manager.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int Resource::get_id() {
|
|
||||||
return _id;
|
|
||||||
}
|
|
||||||
void Resource::set_id(const int value) {
|
|
||||||
_id = value;
|
|
||||||
|
|
||||||
changed();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Resource::get_dirty() {
|
|
||||||
return _dirty;
|
|
||||||
}
|
|
||||||
void Resource::set_dirty(const bool value) {
|
|
||||||
_dirty = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string Resource::get_resource_name() {
|
|
||||||
return _resource_name;
|
|
||||||
}
|
|
||||||
void Resource::set_resource_name(const std::string &name) {
|
|
||||||
_resource_name = name;
|
|
||||||
|
|
||||||
changed();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Resource::changed() {
|
void Resource::changed() {
|
||||||
_dirty = true;
|
dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Resource::save() {
|
void Resource::save() {
|
||||||
@ -129,9 +104,9 @@ void Resource::from_json(const std::string &data) {
|
|||||||
|
|
||||||
Resource::Resource() :
|
Resource::Resource() :
|
||||||
Reference() {
|
Reference() {
|
||||||
_id = 0;
|
id = 0;
|
||||||
_dirty = false;
|
dirty = false;
|
||||||
_resource_name = get_class();
|
resource_name = get_class();
|
||||||
}
|
}
|
||||||
|
|
||||||
Resource::~Resource() {
|
Resource::~Resource() {
|
||||||
|
@ -17,14 +17,9 @@ class Resource : public Reference {
|
|||||||
RCPP_OBJECT(Resource, Reference);
|
RCPP_OBJECT(Resource, Reference);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int get_id();
|
int id;
|
||||||
void set_id(const int value);
|
bool dirty;
|
||||||
|
std::string resource_name;
|
||||||
bool get_dirty();
|
|
||||||
void set_dirty(const bool value);
|
|
||||||
|
|
||||||
std::string get_resource_name();
|
|
||||||
void set_resource_name(const std::string &name);
|
|
||||||
|
|
||||||
void changed();
|
void changed();
|
||||||
|
|
||||||
@ -58,9 +53,6 @@ public:
|
|||||||
~Resource();
|
~Resource();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int _id;
|
|
||||||
bool _dirty;
|
|
||||||
std::string _resource_name;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
Reference in New Issue
Block a user