diff --git a/core/resource.cpp b/core/resource.cpp index cbbb927..04edacb 100644 --- a/core/resource.cpp +++ b/core/resource.cpp @@ -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() { diff --git a/core/resource.h b/core/resource.h index 33fbe85..150785f 100644 --- a/core/resource.h +++ b/core/resource.h @@ -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 \ No newline at end of file