C++ mpi module for stochmagnet_main Package
MPI_Error.h
1 #ifndef MPI_Error_H
2 #define MPI_Error_H
3 
4 //inherited class object
5 #include "MPI_Object.h"
6 
7 //MPI types header
8 #include "MPI_Type.h"
9 
17 class MPI_Error : public MPI_Object {
18 
19  //attributes
20 private :
21 
22  // CONSTRUCTORS
23  char mErrorString[MPI_MAX_ERROR_STRING];
24  int mErrorLength;
25 public:
29 
30  }
31  // DESTRUCTORS
34  virtual ~MPI_Error(void) {
35 
36  }
37 
38 public:
39 
40 
41 
45  inline static tString ToString(const tMPIError& err) {
46  char errorString[MPI_MAX_ERROR_STRING];
47  int errorLength;
48  MPI_Error_string(err,errorString,&errorLength);
49  return tString(errorString);
50  }
51 
55  inline tString toString(const tMPIError& err) {
56  MPI_Error_string(err,mErrorString,&mErrorLength);
57  return tString(mErrorString);
58  }
61  virtual tString toString() const override {
62  return MPI_Object::toString();
63  }
64 
65 public:
66 
67 
68 public:
69 
70 
71 
72 
73 
74 };
75 
76 
77 #endif
virtual tString toString() const
return the string representation of the object node
Definition: CORE_Object.h:333
This class manages error.
Definition: MPI_Error.h:17
MPI_Error()
create a class
Definition: MPI_Error.h:28
static tString ToString(const tMPIError &err)
get the string representation of the error
Definition: MPI_Error.h:45
virtual ~MPI_Error(void)
destroy the class
Definition: MPI_Error.h:34
virtual tString toString() const override
get the string representation of the error
Definition: MPI_Error.h:61
tString toString(const tMPIError &err)
get the string representation of the error
Definition: MPI_Error.h:55
This class is a base class of E-MicromM core package.
Definition: MPI_Object.h:32