Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ok, I stop trying to please sonar.
[simgrid.git] / src / instr / instr_smpi.h
1 /* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef INSTR_SMPI_H_
7 #define INSTR_SMPI_H_ 
8 #ifdef __cplusplus
9 #include <string>
10 extern "C" {
11 #endif
12
13 typedef struct smpi_trace_call_location {
14   const char* filename;
15   int linenumber;
16
17   const char* previous_filename;
18   int previous_linenumber;
19
20 #ifdef __cplusplus
21   std::string get_composed_key() {
22     return std::string(previous_filename) + ':' + std::to_string(previous_linenumber) + ':' + filename + ':' + std::to_string(linenumber);
23   }
24 #endif
25
26 } smpi_trace_call_location_t;
27
28 #ifdef __cplusplus
29 }
30 #endif
31 #endif