-/* Copyright (c) 2006-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2020. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <unordered_map>
namespace simgrid {
+
+extern template class XBT_PUBLIC xbt::Extendable<s4u::Storage>;
+
namespace s4u {
/** Storage represent the disk resources, usually associated to a given host
protected:
virtual ~Storage() = default;
+
public:
/** @brief Callback signal fired when a new Storage is created */
static xbt::signal<void(Storage&)> on_creation;
/** @brief Retrieves the name of that storage as a C string */
const char* get_cname() const { return name_.c_str(); }
- const char* get_type();
- Host* get_host() { return attached_to_; };
+ const char* get_type() const;
+ Host* get_host() const { return attached_to_; };
void set_host(Host* host) { attached_to_ = host; }
const std::unordered_map<std::string, std::string>* get_properties() const;
const char* get_property(const std::string& key) const;
void set_property(const std::string&, const std::string& value);
- void set_data(void* data) { userdata_ = data; }
- void* get_data() { return userdata_; }
-
IoPtr io_init(sg_size_t size, s4u::Io::OpType type);
IoPtr read_async(sg_size_t size);
Host* attached_to_ = nullptr;
kernel::resource::StorageImpl* const pimpl_;
std::string name_;
- void* userdata_ = nullptr;
};
} // namespace s4u