preCICE
v3.2.0
Loading...
Searching...
No Matches
src
utils
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
12
namespace
precice::utils
{
13
14
inline
std::string
getTypeName
(
const
double
&var)
15
{
16
return
"float"
;
17
}
18
19
inline
std::string
getTypeName
(
const
std::string
&var)
20
{
21
return
"string"
;
22
}
23
24
inline
std::string
getTypeName
(
const
bool
&var)
25
{
26
return
"boolean"
;
27
}
28
29
inline
std::string
getTypeName
(
const
int
&var)
30
{
31
return
"integer"
;
32
}
33
34
inline
std::string
getTypeName
(Eigen::VectorXd
const
&var)
35
{
36
return
"vector"
;
37
}
38
39
}
// namespace precice::utils
std::string
precice::utils
contains precice-related utilities.
Definition
PointToPointCommunicationTest.cpp:23
precice::utils::getTypeName
std::string getTypeName(const double &var)
Definition
TypeNames.hpp:14
string