mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +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"
|
||||
#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() {
|
||||
_dirty = true;
|
||||
dirty = true;
|
||||
}
|
||||
|
||||
void Resource::save() {
|
||||
@ -129,9 +104,9 @@ void Resource::from_json(const std::string &data) {
|
||||
|
||||
Resource::Resource() :
|
||||
Reference() {
|
||||
_id = 0;
|
||||
_dirty = false;
|
||||
_resource_name = get_class();
|
||||
id = 0;
|
||||
dirty = false;
|
||||
resource_name = get_class();
|
||||
}
|
||||
|
||||
Resource::~Resource() {
|
||||
|
@ -17,14 +17,9 @@ class Resource : public Reference {
|
||||
RCPP_OBJECT(Resource, Reference);
|
||||
|
||||
public:
|
||||
int get_id();
|
||||
void set_id(const int value);
|
||||
|
||||
bool get_dirty();
|
||||
void set_dirty(const bool value);
|
||||
|
||||
std::string get_resource_name();
|
||||
void set_resource_name(const std::string &name);
|
||||
int id;
|
||||
bool dirty;
|
||||
std::string resource_name;
|
||||
|
||||
void changed();
|
||||
|
||||
@ -58,9 +53,6 @@ public:
|
||||
~Resource();
|
||||
|
||||
private:
|
||||
int _id;
|
||||
bool _dirty;
|
||||
std::string _resource_name;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user