A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test conversion
[simgrid.git]
/
src
/
s4u
/
s4u_storage.cpp
diff --git
a/src/s4u/s4u_storage.cpp
b/src/s4u/s4u_storage.cpp
index
04c1ee4
..
7f52311
100644
(file)
--- a/
src/s4u/s4u_storage.cpp
+++ b/
src/s4u/s4u_storage.cpp
@@
-13,16
+13,14
@@
namespace simgrid {
namespace s4u {
boost::unordered_map <std::string, Storage *> *Storage::storages_ = new boost::unordered_map<std::string, Storage*> ();
namespace s4u {
boost::unordered_map <std::string, Storage *> *Storage::storages_ = new boost::unordered_map<std::string, Storage*> ();
-Storage::Storage(std::string name, smx_storage_t inferior)
{
- name_ = name;
- pimpl_ = inferior;
-
+Storage::Storage(std::string name, smx_storage_t inferior)
:
+ name_(name), pimpl_(inferior)
+{
+ size_ = SIMIX_storage_get_size(pimpl_);
storages_->insert({name, this});
}
storages_->insert({name, this});
}
-Storage::~Storage() {
- // TODO Auto-generated destructor stub
-}
+Storage::~Storage() = default;
smx_storage_t Storage::inferior() {
return pimpl_;
smx_storage_t Storage::inferior() {
return pimpl_;
@@
-41,18
+39,33
@@
Storage &Storage::byName(const char*name) {
return *res;
}
return *res;
}
-const char*Storage::name() {
+const char* Storage::name()
+{
return name_.c_str();
}
return name_.c_str();
}
-sg_size_t Storage::sizeFree() {
+sg_size_t Storage::sizeFree()
+{
return simcall_storage_get_free_size(pimpl_);
}
return simcall_storage_get_free_size(pimpl_);
}
-sg_size_t Storage::sizeUsed() {
+
+sg_size_t Storage::sizeUsed()
+{
return simcall_storage_get_used_size(pimpl_);
}
return simcall_storage_get_used_size(pimpl_);
}
+
sg_size_t Storage::size() {
sg_size_t Storage::size() {
- return SIMIX_storage_get_size(pimpl_);
+ return size_;
+}
+
+xbt_dict_t Storage::properties()
+{
+ return simcall_storage_get_properties(pimpl_);
+}
+
+xbt_dict_t Storage::content()
+{
+ return simcall_storage_get_content(pimpl_);
}
} /* namespace s4u */
}
} /* namespace s4u */