Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Offer the possibility to change smpi bandwidth and latency factor into tag config...
[simgrid.git] / src / cxx / LogicException.hpp
1 /*
2  * LogicException.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_LOGICEXCEPTION_HPP
14 #define MSG_LOGICEXCEPTION_HPP
15
16 #ifndef __cplusplus
17         #error LogicException.hpp requires C++ compilation (use a .cxx suffix)
18 #endif
19
20 #include <Exception.hpp>
21
22 namespace SimGrid
23 {
24         namespace Msg
25         {
26                 
27                 class SIMGRIDX_EXPORT LogicException : public Exception
28                 {
29                         public:
30                         
31                         // Default constructor.
32                                 LogicException();
33                         
34                         // Copy constructor.
35                                 LogicException(const LogicException& rLogicException);
36                         
37                         // This constructor takes the detail of the logic exception.
38                                 LogicException(const char* detail);
39                         
40                         // Destructor.
41                                 virtual ~LogicException();
42                                 
43                         // Operations.
44                                         
45                                         // Returns the reason of the exception :
46                                         // the message "Logic exception `detail'"
47                                         const char* toString(void) const;
48                         
49                         // Operators.
50                                 
51                                 // Assignement.
52                                 const LogicException& operator = (const LogicException& rLogicException);
53                                 
54                         private :
55                         
56                         // Attributes.
57                                 
58                                 // A buffer used to build the message returned by the methode toString().
59                                 char* reason;
60                 };
61                 
62                 
63         } // namespace Msg      
64
65 }// namespace SimGrid
66
67
68 #endif // !MSG_INVALIDARGUMENTEXCEPTION_HPP
69
70