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
All of the examples use now the StringHelp class to simplify the string manipulation.
[simgrid.git]
/
examples
/
cxx
/
suspend
/
DreamMaster.cxx
diff --git
a/examples/cxx/suspend/DreamMaster.cxx
b/examples/cxx/suspend/DreamMaster.cxx
index
dd1bab9
..
62ed58f
100644
(file)
--- a/
examples/cxx/suspend/DreamMaster.cxx
+++ b/
examples/cxx/suspend/DreamMaster.cxx
@@
-4,17
+4,17
@@
#include <HostNotFoundException.hpp>
\r
#include <Msg.hpp>
\r
\r
#include <HostNotFoundException.hpp>
\r
#include <Msg.hpp>
\r
\r
-#include <
iostream
>
\r
-using namespace std;
\r
+#include <
Msg.hpp
>
\r
+
\r
\r
MSG_IMPLEMENT_DYNAMIC(DreamMaster, Process);
\r
\r
int DreamMaster::main(int argc, char** argv)
\r
{
\r
\r
\r
MSG_IMPLEMENT_DYNAMIC(DreamMaster, Process);
\r
\r
int DreamMaster::main(int argc, char** argv)
\r
{
\r
\r
-
cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Hello I'm " << getName() << " on " << getHost().getName() << "!" << endl
;
\r
+
info("Hello")
;
\r
\r
\r
-
cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Let's create a lazy guy."
;
\r
+
info("Let's create a lazy guy.")
;
\r
\r
\r
LazyGuy* lazy;
\r
\r
\r
LazyGuy* lazy;
\r
@@
-23,15
+23,15
@@
int DreamMaster::main(int argc, char** argv)
{
\r
Host currentHost = Host::currentHost();
\r
\r
{
\r
Host currentHost = Host::currentHost();
\r
\r
-
cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Current host name : " << currentHost.getName() << endl
;
\r
+
info(TEXT_("Current host name : ") + TEXT_(currentHost.getName()))
;
\r
\r
lazy = new LazyGuy(currentHost,"LazyGuy");
\r
\r
\r
lazy = new LazyGuy(currentHost,"LazyGuy");
\r
\r
-
cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Let's wait a little bit..." << endl
;
\r
+
info("Let's wait a little bit...")
;
\r
\r
Process::sleep(10.0);
\r
\r
\r
Process::sleep(10.0);
\r
\r
-
cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Let's wake the lazy guy up! >:) " << endl
;
\r
+
info("Let's wake the lazy guy up! >:) ")
;
\r
\r
lazy->resume();
\r
\r
\r
lazy->resume();
\r
\r
@@
-39,13
+39,15
@@
int DreamMaster::main(int argc, char** argv)
}
\r
catch(HostNotFoundException e)
\r
{
\r
}
\r
catch(HostNotFoundException e)
\r
{
\r
-
cerr << e.toString() <<". Stopping Now!" << endl
;
\r
+
error(TEXT_(e.toString()) + TEXT_(". Stopping Now!"))
;
\r
exit(1);
\r
}
\r
\r
//lazy->migrate(currentHost);
\r
\r
exit(1);
\r
}
\r
\r
//lazy->migrate(currentHost);
\r
\r
- cout <<"[" << getName() << ":" << getHost().getName() << "] " << "OK, goodbye now." << endl;
\r
+ info("OK, goodbye now.");
\r
+
\r
+ delete this;
\r
\r
return 0;
\r
\r
\r
return 0;
\r
\r