Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
c++ify some (untested) code
[simgrid.git] / src / instr / instr_smpi.hpp
index 77951ef..8b08e92 100644 (file)
@@ -10,7 +10,7 @@
 #include "src/instr/instr_private.hpp"
 #include <string>
 
-SG_BEGIN_DECL()
+extern "C" {
 
 XBT_PRIVATE void TRACE_internal_smpi_set_category(const char* category);
 XBT_PRIVATE const char* TRACE_internal_smpi_get_category();
@@ -36,19 +36,20 @@ XBT_PRIVATE char* smpi_container(int rank, char* container, int n);
 
 XBT_PRIVATE const char* encode_datatype(MPI_Datatype datatype, int* known);
 
-typedef struct smpi_trace_call_location {
+class smpi_trace_call_location_t {
+public:
   const char* filename;
   int linenumber;
 
   const char* previous_filename;
   int previous_linenumber;
 
-  std::string get_composed_key() {
-    return std::string(previous_filename) + ':' + std::to_string(previous_linenumber) + ':' + filename + ':' + std::to_string(linenumber);
+  std::string get_composed_key()
+  {
+    return std::string(previous_filename) + ':' + std::to_string(previous_linenumber) + ':' + filename + ':' +
+           std::to_string(linenumber);
   }
-
-} smpi_trace_call_location_t;
-
-SG_END_DECL()
+};
+}
 
 #endif