-public: // TODO, make me private
- ~Host();
- /** Do not use this function, it should be private */
- static Host* by_name_or_create(const char* name);
+
+ /** Host destruction logic */
+protected:
+ virtual ~Host();
+
+private:
+ bool currentlyDestroying_ = false;
+public:
+ void destroy();
+ // No copy/move
+ Host(Host const&) = delete;
+ Host& operator=(Host const&) = delete;
/** Retrieves an host from its name, or return nullptr */
static Host* by_name_or_null(const char* name);
/** Retrieves an host from its name, or return nullptr */
static Host* by_name_or_null(const char* name);
xbt_dict_t properties();
const char*property(const char*key);
void setProperty(const char*key, const char *value);
xbt_dict_t properties();
const char*property(const char*key);
void setProperty(const char*key, const char *value);
/** DO NOT USE DIRECTLY (@todo: these should be protected, once our code is clean) */
surf::Cpu *pimpl_cpu = nullptr;
/** DO NOT USE DIRECTLY (@todo: these should be protected, once our code is clean) */
/** DO NOT USE DIRECTLY (@todo: these should be protected, once our code is clean) */
surf::Cpu *pimpl_cpu = nullptr;
/** DO NOT USE DIRECTLY (@todo: these should be protected, once our code is clean) */