Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
All
Functions
Enumerations
Enumerator
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
a
b
f
o
p
r
s
t
v
w
~
+
Functions
a
b
f
o
p
w
~
+
Variables
a
b
p
r
s
t
v
w
Related Functions
+
Files
File List
+
File Members
All
Functions
Macros
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
Embedded control libraries.
ecl::Format< std::string >
Formatter for string types.
Definition:
strings.hpp:42
ecl::Format
Primary template for all formatter classes.
Definition:
common.hpp:99
ecl::Alignment
Alignment
Alignment tags for text formatting.
Definition:
common.hpp:29
ecl_formatters
Author(s): Daniel Stonier
autogenerated on Mon Feb 28 2022 22:18:36