diff options
Diffstat (limited to 'backend/Object.h')
-rw-r--r-- | backend/Object.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/backend/Object.h b/backend/Object.h index b98dc82..07b7b74 100644 --- a/backend/Object.h +++ b/backend/Object.h @@ -1,24 +1,26 @@ #pragma once +#include "String.h" + class Object { private: - const char * name = nullptr; - const char * description = nullptr; + String name; + String description; public: - void set_name(const char * name); - const char * get_name(); - virtual const char * get_displayname(); - void set_description(const char * description); - const char * get_description(); + void set_name(const String & name); + const String & get_name() const; + virtual const String & get_displayname() const; + void set_description(const String & description); + const String & get_description() const; void set_hidden(bool hidden); bool get_hidden(); protected: friend class ObjectFactory; - Object(const char * name = "", const char * description = ""); + Object(const String & name, const String & description); public: - virtual ~Object(); + virtual ~Object() = default; protected: bool hidden = false; |