preCICE
v3.1.2
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
{
13
namespace
utils {
14
15
inline
std::string
getTypeName
(
const
double
&var)
16
{
17
return
"float"
;
18
}
19
20
inline
std::string
getTypeName
(
const
std::string
&var)
21
{
22
return
"string"
;
23
}
24
25
inline
std::string
getTypeName
(
const
bool
&var)
26
{
27
return
"boolean"
;
28
}
29
30
inline
std::string
getTypeName
(
const
int
&var)
31
{
32
return
"integer"
;
33
}
34
35
inline
std::string
getTypeName
(Eigen::VectorXd
const
&var)
36
{
37
return
"vector"
;
38
}
39
40
}
// namespace utils
41
}
// namespace precice
std::string
precice::utils::getTypeName
std::string getTypeName(const double &var)
Definition
TypeNames.hpp:15
precice
Main namespace of the precice library.
Definition
Acceleration.cpp:5
string