flexiblesusy
is hosted by
Hepforge
,
IPPP Durham
Home
Downloads
FlexibleSUSY
Models
Documentation
Installation
Source code
Resources
Images
Online spectrum generator
Development
ChangeLog
Bugs
Resources
Contact
FlexibleSUSY
src
string_format.cpp
Go to the documentation of this file.
1
// ====================================================================
2
// This file is part of FlexibleSUSY.
3
//
4
// FlexibleSUSY is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published
6
// by the Free Software Foundation, either version 3 of the License,
7
// or (at your option) any later version.
8
//
9
// FlexibleSUSY is distributed in the hope that it will be useful, but
10
// WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
// General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with FlexibleSUSY. If not, see
16
// <http://www.gnu.org/licenses/>.
17
// ====================================================================
18
19
#include "
string_format.hpp
"
20
#include <boost/lexical_cast.hpp>
21
22
namespace
flexiblesusy
{
23
24
#define DEFINE_TO_STRING(type) \
25
std::string to_string(type a) \
26
{ \
27
return boost::lexical_cast<std::string>(a); \
28
}
29
30
DEFINE_TO_STRING
(
char
);
31
DEFINE_TO_STRING
(
unsigned
char
);
32
DEFINE_TO_STRING
(
unsigned
short
);
33
DEFINE_TO_STRING
(
unsigned
int
);
34
DEFINE_TO_STRING
(
unsigned
long
);
35
DEFINE_TO_STRING
(
unsigned
long
long
);
36
DEFINE_TO_STRING
(
signed
char
);
37
DEFINE_TO_STRING
(
signed
short
);
38
DEFINE_TO_STRING
(
signed
int
);
39
DEFINE_TO_STRING
(
signed
long
);
40
DEFINE_TO_STRING
(
signed
long
long
);
41
DEFINE_TO_STRING
(
double
);
42
43
std::string
to_string
(
const
std::complex<double>& a)
44
{
45
return
"("
+
to_string
(std::real(a)) +
","
+
to_string
(std::imag(a)) +
")"
;
46
}
47
48
}
// namespace flexiblesusy
flexiblesusy
Definition
depgen.cpp:33
flexiblesusy::to_string
std::string to_string(char a)
Definition
string_format.cpp:30
DEFINE_TO_STRING
#define DEFINE_TO_STRING(type)
Definition
string_format.cpp:24
string_format.hpp
Generated on Sun Apr 6 2025 11:10:37 for FlexibleSUSY by
1.9.8