Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
cetlib
cetlib
HorizontalRule.h
Go to the documentation of this file.
1
#ifndef cetlib_HorizontalRule_h
2
#define cetlib_HorizontalRule_h
3
4
//====================================================================
5
// HorizontalRule is used by specifying the length of the rule as a
6
// c'tor argument, and then by specifying the character to be repeated
7
// as an argument to the function-call operator (e.g.):
8
//
9
// HorizontalRule r{30}; // Repeats a character 30 times
10
// std::cout << r('=') << '\n'
11
// << r('-') << '\n';
12
//
13
//====================================================================
14
15
#include <string>
16
17
namespace
cet
{
18
class
HorizontalRule
{
19
public
:
20
explicit
constexpr
HorizontalRule
(std::size_t
const
w
) :
w_
{w} {}
21
auto
22
operator()
(
char
const
fill
)
const
23
{
24
return
std::string
(
w_
, fill);
25
}
26
27
private
:
28
std::size_t
const
w_
;
29
};
30
}
31
32
#endif
/* cetlib_HorizontalRule_h */
33
34
// Local Variables:
35
// mode: c++
36
// End:
string
std::string string
Definition:
nybbler.cc:12
cet::HorizontalRule::operator()
auto operator()(char const fill) const
Definition:
HorizontalRule.h:22
cet
Definition:
PluginSymbolResolvers.h:8
cet::HorizontalRule::w_
std::size_t const w_
Definition:
HorizontalRule.h:28
cet::HorizontalRule
Definition:
HorizontalRule.h:18
translator.fill
def fill(s)
Definition:
translator.py:93
projectgui.w
w
Definition:
projectgui.py:20
cet::HorizontalRule::HorizontalRule
constexpr HorizontalRule(std::size_t const w)
Definition:
HorizontalRule.h:20
Generated by
1.8.11