preCICE v3.1.1
Loading...
Searching...
No Matches
TypeNames.hpp
Go to the documentation of this file.
1/*
2 * Returns pretty type names for various types.
3 * Used for generating the XML documentation.
4 * They are inlined, so that they don't need to be defined in a separate cpp file.
5 */
6
7#pragma once
8
9#include <Eigen/Core>
10#include <string>
11
12namespace precice {
13namespace utils {
14
15inline std::string getTypeName(const double &var)
16{
17 return "float";
18}
19
21{
22 return "string";
23}
24
25inline std::string getTypeName(const bool &var)
26{
27 return "boolean";
28}
29
30inline std::string getTypeName(const int &var)
31{
32 return "integer";
33}
34
35inline std::string getTypeName(Eigen::VectorXd const &var)
36{
37 return "vector";
38}
39
40} // namespace utils
41} // namespace precice
std::string getTypeName(const double &var)
Definition TypeNames.hpp:15
Main namespace of the precice library.