preCICE v3.2.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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::utils {
13
14inline std::string getTypeName(const double &var)
15{
16 return "float";
17}
18
20{
21 return "string";
22}
23
24inline std::string getTypeName(const bool &var)
25{
26 return "boolean";
27}
28
29inline std::string getTypeName(const int &var)
30{
31 return "integer";
32}
33
34inline std::string getTypeName(Eigen::VectorXd const &var)
35{
36 return "vector";
37}
38
39} // namespace precice::utils
contains precice-related utilities.
std::string getTypeName(const double &var)
Definition TypeNames.hpp:14