Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Meet the coding style (line length <= 100)
[modules/shaper.git]
/
src
/
Events
/
Events_LongOp.cpp
diff --git
a/src/Events/Events_LongOp.cpp
b/src/Events/Events_LongOp.cpp
index 647d2bb4c545d576631a0420a42889e92f0eb661..f298a9ae547692888ab43758c5b2379324c57616 100644
(file)
--- a/
src/Events/Events_LongOp.cpp
+++ b/
src/Events/Events_LongOp.cpp
@@
-1,3
+1,5
@@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// File: Events_LongOp.cpp
// Created: 29 Jul 2014
// Author: Mikhail PONIKAROV
// File: Events_LongOp.cpp
// Created: 29 Jul 2014
// Author: Mikhail PONIKAROV
@@
-10,7
+12,7
@@
std::map<void*, int> MY_SENDERS;
Events_LongOp::Events_LongOp(void* theSender)
std::map<void*, int> MY_SENDERS;
Events_LongOp::Events_LongOp(void* theSender)
- : Events_Message(Events_LongOp::eventID(), theSender)
+
: Events_Message(Events_LongOp::eventID(), theSender)
{
}
{
}
@@
-29,12
+31,13
@@
void Events_LongOp::start(void* theSender)
bool toSend = MY_SENDERS.empty();
if (MY_SENDERS.find(theSender) == MY_SENDERS.end())
MY_SENDERS[theSender] = 1;
bool toSend = MY_SENDERS.empty();
if (MY_SENDERS.find(theSender) == MY_SENDERS.end())
MY_SENDERS[theSender] = 1;
- else
+ else
MY_SENDERS[theSender]++;
if (toSend) {
MY_SENDERS[theSender]++;
if (toSend) {
- Events_LongOp anEvent(theSender);
- Events_Loop::loop()->send(anEvent);
+ std::shared_ptr<Events_Message> aNewOne =
+ std::shared_ptr<Events_Message>(new Events_LongOp(theSender));
+ Events_Loop::loop()->send(aNewOne);
}
}
}
}
@@
-42,12
+45,15
@@
void Events_LongOp::end(void* theSender)
{
if (MY_SENDERS.find(theSender) != MY_SENDERS.end()) {
int aCount = MY_SENDERS[theSender];
{
if (MY_SENDERS.find(theSender) != MY_SENDERS.end()) {
int aCount = MY_SENDERS[theSender];
- if (aCount <= 1) MY_SENDERS.erase(theSender);
- else MY_SENDERS[theSender] = aCount - 1;
+ if (aCount <= 1)
+ MY_SENDERS.erase(theSender);
+ else
+ MY_SENDERS[theSender] = aCount - 1;
}
if (MY_SENDERS.empty()) {
}
if (MY_SENDERS.empty()) {
- Events_LongOp anEvent(theSender);
- Events_Loop::loop()->send(anEvent);
+ std::shared_ptr<Events_Message> aNewOne =
+ std::shared_ptr<Events_Message>(new Events_LongOp(theSender));
+ Events_Loop::loop()->send(aNewOne);
}
}
}
}