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
[s4u] Fix atomic_flag initialization
[simgrid.git]
/
include
/
simgrid
/
s4u
/
storage.hpp
diff --git
a/include/simgrid/s4u/storage.hpp
b/include/simgrid/s4u/storage.hpp
index
193a6d2
..
4504bb8
100644
(file)
--- a/
include/simgrid/s4u/storage.hpp
+++ b/
include/simgrid/s4u/storage.hpp
@@
-16,15
+16,18
@@
namespace simgrid {
namespace s4u {
XBT_PUBLIC_CLASS Storage {
namespace s4u {
XBT_PUBLIC_CLASS Storage {
+ friend s4u::Engine;
+
private:
Storage(std::string name, smx_storage_t inferior);
virtual ~Storage();
private:
Storage(std::string name, smx_storage_t inferior);
virtual ~Storage();
+
public:
/** Retrieve a Storage by its name. It must exist in the platform file */
static Storage &byName(const char* name);
const char *name();
public:
/** Retrieve a Storage by its name. It must exist in the platform file */
static Storage &byName(const char* name);
const char *name();
- sg_size_t size
_f
ree();
- sg_size_t size
_u
sed();
+ sg_size_t size
F
ree();
+ sg_size_t size
U
sed();
/** Retrieve the total amount of space of this storage element */
sg_size_t size();
/** Retrieve the total amount of space of this storage element */
sg_size_t size();
@@
-39,18
+42,17
@@
XBT_PUBLIC(const char *) MSG_storage_get_host(msg_storage_t storage);
*/
protected:
smx_storage_t inferior();
*/
protected:
smx_storage_t inferior();
-private:
- static boost::unordered_map<std::string, Storage *> *storages;
- std::string p_name;
- smx_storage_t p_inferior;
-
public:
public:
- void set_userdata(void *data) {p_userdata = data;}
- void *userdata() {return p_userdata;}
+ void setUserdata(void *data) {userdata_ = data;}
+ void *userdata() {return userdata_;}
+
private:
private:
-
void *p_userdata = NULL
;
+
static boost::unordered_map<std::string, Storage *> *storages_
;
+ std::string name_;
+ smx_storage_t pimpl_ = nullptr;
+ void *userdata_ = nullptr;
};
} /* namespace s4u */
};
} /* namespace s4u */