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
snake_case s4u::Activity
[simgrid.git]
/
include
/
simgrid
/
s4u
/
Engine.hpp
diff --git
a/include/simgrid/s4u/Engine.hpp
b/include/simgrid/s4u/Engine.hpp
index
bb204e9
..
636f678
100644
(file)
--- a/
include/simgrid/s4u/Engine.hpp
+++ b/
include/simgrid/s4u/Engine.hpp
@@
-24,8
+24,7
@@
namespace s4u {
*
* This class is an interface to the simulation engine.
*/
*
* This class is an interface to the simulation engine.
*/
-XBT_PUBLIC_CLASS Engine
-{
+class XBT_PUBLIC Engine {
public:
/** Constructor, taking the command line parameters of your main function */
Engine(int* argc, char** argv);
public:
/** Constructor, taking the command line parameters of your main function */
Engine(int* argc, char** argv);
@@
-47,7
+46,7
@@
public:
/** Registers a function as the default main function of actors
*
* It will be used as fallback when the function requested from the deployment file was not registered.
/** Registers a function as the default main function of actors
*
* It will be used as fallback when the function requested from the deployment file was not registered.
- * It is used for trace-based simulations (see examples/
msg/actions
).
+ * It is used for trace-based simulations (see examples/
s4u/replay-comms and similar
).
*/
void registerDefault(int (*code)(int, char**));
*/
void registerDefault(int (*code)(int, char**));
@@
-56,16
+55,27
@@
public:
protected:
friend s4u::Host;
protected:
friend s4u::Host;
+ friend s4u::Storage;
void addHost(std::string name, simgrid::s4u::Host * host);
void delHost(std::string name);
void addHost(std::string name, simgrid::s4u::Host * host);
void delHost(std::string name);
+ void addStorage(std::string name, simgrid::s4u::Storage * storage);
+ void delStorage(std::string name);
public:
simgrid::s4u::Host* hostByName(std::string name);
simgrid::s4u::Host* hostByNameOrNull(std::string name);
public:
simgrid::s4u::Host* hostByName(std::string name);
simgrid::s4u::Host* hostByNameOrNull(std::string name);
+ simgrid::s4u::Storage* storageByName(std::string name);
+ simgrid::s4u::Storage* storageByNameOrNull(std::string name);
+
size_t getHostCount();
void getHostList(std::vector<Host*> * whereTo);
size_t getHostCount();
void getHostList(std::vector<Host*> * whereTo);
+ std::vector<Host*> getAllHosts();
+
size_t getLinkCount();
void getLinkList(std::vector<Link*> * list);
size_t getLinkCount();
void getLinkList(std::vector<Link*> * list);
+ std::vector<Link*> getAllLinks();
+
+ std::vector<Storage*> getAllStorages();
/** @brief Run the simulation */
void run();
/** @brief Run the simulation */
void run();
@@
-127,16
+137,16
@@
private:
/** Callback fired when the platform is created (ie, the xml file parsed),
* right before the actual simulation starts. */
/** Callback fired when the platform is created (ie, the xml file parsed),
* right before the actual simulation starts. */
-extern XBT_PUBLIC
(xbt::signal<void()>)
onPlatformCreated;
+extern XBT_PUBLIC
xbt::signal<void()>
onPlatformCreated;
-/** Callback fired when the main simulation loop ends, just before
MSG_run (or similar) ends
*/
-extern XBT_PUBLIC
(xbt::signal<void()>)
onSimulationEnd;
+/** Callback fired when the main simulation loop ends, just before
the end of Engine::run()
*/
+extern XBT_PUBLIC
xbt::signal<void()>
onSimulationEnd;
/** Callback fired when the time jumps into the future */
/** Callback fired when the time jumps into the future */
-extern XBT_PUBLIC
(xbt::signal<void(double)>)
onTimeAdvance;
+extern XBT_PUBLIC
xbt::signal<void(double)>
onTimeAdvance;
/** Callback fired when the time cannot jump because of inter-actors deadlock */
/** Callback fired when the time cannot jump because of inter-actors deadlock */
-extern XBT_PUBLIC
(xbt::signal<void(void)>)
onDeadlock;
+extern XBT_PUBLIC
xbt::signal<void(void)>
onDeadlock;
template <class T> XBT_PRIVATE void netzoneByTypeRecursive(s4u::NetZone* current, std::vector<T*>* whereto)
{
template <class T> XBT_PRIVATE void netzoneByTypeRecursive(s4u::NetZone* current, std::vector<T*>* whereto)
{