Salome HOME
Fixed problem with too many executions of extrusion wit hexternal sketch edges
[modules/shaper.git] / src / Events / Events_Error.cpp
1 /*
2  * Events_Error.cpp
3  *
4  *  Created on: Apr 28, 2014
5  *      Author: sbh
6  */
7
8 #include <Events_Error.h>
9 #include <Events_Loop.h>
10
11 Events_Error::Events_Error(char* theDescription, const void* theSender)
12     : Events_Message(Events_Error::errorID(), theSender)
13 {
14   myDescription = theDescription;
15 }
16
17 Events_Error::~Events_Error()
18 {
19 }
20
21 Events_ID Events_Error::errorID()
22 {
23   Events_Loop* aLoop = Events_Loop::loop();
24   return aLoop->eventByName("ApplicationError");
25 }
26
27 char* Events_Error::description() const
28 {
29   return myDescription;
30 }
31
32 void Events_Error::send(char* theDescription, const void* theSender)
33 {
34   boost::shared_ptr<Events_Message> aNewOne = 
35     boost::shared_ptr<Events_Message>(new Events_Error(theDescription, theSender));
36   Events_Loop::loop()->send(aNewOne);
37 }
38
39 void Events_Error::send(std::string theDescription, const void* theSender)
40 {
41   Events_Error::send((char*) theDescription.c_str(), theSender);
42 }