Parasol Planning Library (PPL)
RuntimeUtils.h
Go to the documentation of this file.
1 #ifndef RUNTIME_UTILS_H_
2 #define RUNTIME_UTILS_H_
3 
4 #include <cstdlib>
5 #include <iostream>
6 #include <sstream>
7 #include <string>
8 
11 
17 template <typename FilenameType, typename FunctionNameType, typename LineType>
18 std::string
19 WhereAt(FilenameType _file, FunctionNameType _func, LineType _line) {
20  std::ostringstream oss;
21  oss << "File: " << _file
22  << "\n\tFunction: " << _func
23  << "\n\tLine: " << _line;
24  return oss.str();
25 };
26 
27 
29 #ifdef WHERE
30 #undef WHERE
31 #endif
32 #define WHERE WhereAt(__FILE__, __PRETTY_FUNCTION__, __LINE__)
33 
35 
36 #endif
std::string WhereAt(FilenameType _file, FunctionNameType _func, LineType _line)
Definition: RuntimeUtils.h:19