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
Remove xbt::args: use vector<string> instead
[simgrid.git]
/
src
/
simix
/
smx_deployment.cpp
diff --git
a/src/simix/smx_deployment.cpp
b/src/simix/smx_deployment.cpp
index
b5e84b1
..
db1becc
100644
(file)
--- a/
src/simix/smx_deployment.cpp
+++ b/
src/simix/smx_deployment.cpp
@@
-1,9
+1,12
@@
-/* Copyright (c) 2007, 2009-201
5
. The SimGrid Team.
+/* Copyright (c) 2007, 2009-201
6
. 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. */
* 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 <string>
+#include <vector>
+
#include "smx_private.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
#include "smx_private.h"
#include "xbt/sysdep.h"
#include "xbt/log.h"
@@
-59,7
+62,7
@@
void SIMIX_launch_application(const char *file)
// Wrap a main() function into a ActorCodeFactory:
static simgrid::simix::ActorCodeFactory toActorCodeFactory(xbt_main_func_t code)
{
// Wrap a main() function into a ActorCodeFactory:
static simgrid::simix::ActorCodeFactory toActorCodeFactory(xbt_main_func_t code)
{
- return [code](s
imgrid::xbt::args
args) {
+ return [code](s
td::vector<std::string>
args) {
return simgrid::xbt::wrapMain(code, std::move(args));
};
}
return simgrid::xbt::wrapMain(code, std::move(args));
};
}
@@
-151,3
+154,14
@@
void SIMIX_process_set_function(const char *process_host,
process.on_failure = SURF_PROCESS_ON_FAILURE_DIE;
sg_platf_new_process(&process);
}
process.on_failure = SURF_PROCESS_ON_FAILURE_DIE;
sg_platf_new_process(&process);
}
+
+namespace simgrid {
+namespace simix {
+
+void registerFunction(const char* name, ActorCodeFactory factory)
+{
+ simix_global->registered_functions[name] = std::move(factory);
+}
+
+}
+}
\ No newline at end of file