Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[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   Events_Error anError(theDescription, theSender);
35   Events_Loop::loop()->send(anError);
36 }
37
38 void Events_Error::send(std::string theDescription, const void* theSender)
39 {
40   Events_Error::send(theDescription.c_str(), theSender);
41 }