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] add Actor::getPPid and this_actor::getPPid()
[simgrid.git]
/
include
/
simgrid
/
s4u
/
storage.hpp
diff --git
a/include/simgrid/s4u/storage.hpp
b/include/simgrid/s4u/storage.hpp
index
4b4d98a
..
7e9add9
100644
(file)
--- a/
include/simgrid/s4u/storage.hpp
+++ b/
include/simgrid/s4u/storage.hpp
@@
-7,18
+7,25
@@
#ifndef INCLUDE_SIMGRID_S4U_STORAGE_HPP_
#define INCLUDE_SIMGRID_S4U_STORAGE_HPP_
#ifndef INCLUDE_SIMGRID_S4U_STORAGE_HPP_
#define INCLUDE_SIMGRID_S4U_STORAGE_HPP_
+#include <string>
+
#include <boost/unordered_map.hpp>
#include <boost/unordered_map.hpp>
-#include "xbt/base.h"
-#include "simgrid/simix.h"
+
+#include <xbt/base.h>
+
+#include <simgrid/simix.h>
#include <simgrid/s4u/forward.hpp>
namespace simgrid {
namespace s4u {
XBT_PUBLIC_CLASS Storage {
#include <simgrid/s4u/forward.hpp>
namespace simgrid {
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);
public:
/** Retrieve a Storage by its name. It must exist in the platform file */
static Storage &byName(const char* name);
@@
-39,18
+46,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 name_;
- smx_storage_t inferior_;
-
public:
void setUserdata(void *data) {userdata_ = data;}
void *userdata() {return userdata_;}
public:
void setUserdata(void *data) {userdata_ = data;}
void *userdata() {return userdata_;}
+
private:
private:
-
void *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 */