Logo AND Algorithmique Numérique Distribuée

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