Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add FindNS3 module to cmake.
[simgrid.git] / src / cxx / MsgException.hpp
1 /*
2  * MsgException.hpp
3  *
4  * Copyright 2006,2007 Martin Quinson, Malek Cherier           
5  * All right reserved. 
6  *
7  * This program is free software; you can redistribute 
8  * it and/or modify it under the terms of the license 
9  *(GNU LGPL) which comes with this package. 
10  *
11  */  
12  
13 #ifndef MSG_MSGEXCEPTION_HPP
14 #define MSG_MSGEXCEPTION_HPP
15
16 #include <Exception.hpp>
17
18 namespace SimGrid
19 {
20         namespace Msg
21         {
22                 
23                 class SIMGRIDX_EXPORT MsgException : public Exception
24                 {
25                         public:
26                         
27                         // Default constructor.
28                                 MsgException();
29                         
30                         // Copy constructor.
31                                 MsgException(const MsgException& rMsgException);
32                         
33                         // This constructor takes the reason of the exception.
34                                 MsgException(const char* reason);
35                         
36                         // Destructor.
37                                 virtual ~MsgException();
38                                 
39                         // Operations.
40                                         
41                                         // Returns the reason of the exception :
42                                         // the message "Internal exception `reason'"
43                                         const char* toString(void) const;
44                         
45                         // Operators.
46                                 
47                                 // Assignement.
48                                 const MsgException& operator = (const MsgException& rMsgException);
49                                 
50                         private :
51                         
52                         // Attributes.
53                                 
54                                 // A buffer used to build the message returned by the methode toString().
55                                 char* reason;
56                 };
57                 
58                 
59         } // namespace Msg      
60
61 }// namespace SimGrid
62
63
64 #endif // !MSG_MSGEXCEPTION_HPP
65