src
lib
strings.cpp
Go to the documentation of this file.
1
9
/*****************************************************************************
10
** Includes
11
*****************************************************************************/
12
13
#include "../../include/ecl/formatters/strings.hpp"
14
15
/*****************************************************************************
16
** Namespaces
17
*****************************************************************************/
18
19
namespace
ecl
{
20
21
/*****************************************************************************
22
** Using
23
*****************************************************************************/
24
25
using
std::string;
26
27
/*****************************************************************************
28
** Implementation [Format<string>]
29
*****************************************************************************/
30
31
Format<std::string>&
Format<std::string>::operator ()
(
int
w,
Alignment
a)
32
{
33
width(w);
34
align(a);
35
return
*
this
;
36
}
37
38
Format<std::string>
&
Format<std::string>::operator()
(
const
std::string &input_string)
39
{
40
s = input_string;
41
ready_to_format =
true
;
42
return
*
this
;
43
}
44
45
/*****************************************************************************
46
* Implementation [temporary formatting]
47
*****************************************************************************/
48
Format<std::string>
&
Format<std::string>::operator()
(
const
std::string &input_string,
int
w)
49
{
50
width(w);
51
s = input_string;
52
ready_to_format =
true
;
53
return
*
this
;
54
}
55
Format<std::string>
&
Format<std::string>::operator()
(
const
std::string &input_string,
int
w,
Alignment
a)
56
{
57
width(w);
58
align(a);
59
s = input_string;
60
ready_to_format =
true
;
61
return
*
this
;
62
}
63
64
};
// namespace ecl
65
66
67
ecl::Format< std::string >::operator()
Format< std::string > & operator()(int w, Alignment a)
Definition:
strings.cpp:35
ecl::Format< std::string >
Formatter for string types.
Definition:
strings.hpp:48
ecl::Format
Primary template for all formatter classes.
Definition:
common.hpp:103
ecl::Alignment
Alignment
Alignment tags for text formatting.
Definition:
common.hpp:33
ecl
Embedded control libraries.
ecl_formatters
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:27