ALib C++ Library
by
Library Version:
2402 R1
Documentation generated by
Loading...
Searching...
No Matches
home
dev
A-Worx
ALib
src
alib
lang
format
lang/format/fwds.hpp
Go to the documentation of this file.
1
/** ************************************************************************************************
2
* \file
3
* This header file is part of sub-namespace #alib::lang::format of module \alib_basecamp of
4
* the \aliblong.
5
*
6
* \emoji :copyright: 2013-2024 A-Worx GmbH, Germany.
7
* Published under \ref mainpage_license "Boost Software License".
8
**************************************************************************************************/
9
#ifndef HPP_ALIB_LANG_FORMAT_FWDS
10
#define HPP_ALIB_LANG_FORMAT_FWDS 1
11
12
#if !defined (HPP_ALIB_CAMP_MESSAGE_EXCEPTION)
13
#include "
alib/lang/message/exception.hpp
"
14
#endif
15
16
ALIB_ASSERT_MODULE
(CAMP)
17
18
namespace
alib
{
namespace
lang {
namespace
format {
19
20
/** ************************************************************************************************
21
* This interface class exposes interface method \c Invoke which writes the content of the
22
* box to the given \b %AString object in accordance with \c formatSpec.
23
*
24
* \see
25
* For more information about this class see chapter
26
* \ref alib_basecamp_format_custom_types "4.3. Formatting Custom Types" of the
27
* \ref alib_basecamp_format "Programmer's Manual" of module \alib_basecamp_nl.
28
**************************************************************************************************/
29
struct
FFormat
30
{
31
/**
32
* Signature of the invokable function.<br>
33
* Implementations write the content of \p{box} to the given \b %AString object \p{target} in
34
* accordance to the type-specific format specification \p{formatSpec}.
35
*
36
* @param self The box that the function was invoked on.
37
* @param formatSpec The specification of the format (type specific). If empty, a default
38
* specification string might have to be chosen.
39
* @param nf A copy of the number format of the formatter (allowed to be modified).
40
* @param target The AString object receiving the formatted string.
41
*/
42
using
Signature
= void (*) (
const
Box
& self,
const
String
& formatSpec,
NumberFormat
& nf,
43
AString
& target );
44
};
45
46
47
48
// #################################################################################################
49
// Forwards
50
// #################################################################################################
51
52
class
Formatter
;
53
class
FormatterPythonStyle
;
54
class
FormatterJavaStyle
;
55
class
Paragraphs
;
56
57
}
// namespace alib::lang[::format]
58
59
namespace
basecamp {
class
BaseCamp; }
60
61
}
// namespace alib[:lang]
62
63
64
// #################################################################################################
65
// Alias types in namespace #alib.
66
// #################################################################################################
67
/// Type alias in namespace \b alib.
68
using
Formatter
=
lang::format::Formatter
;
69
70
/// Type alias in namespace \b alib.
71
using
FormatterPythonStyle
=
lang::format::FormatterPythonStyle
;
72
73
/// Type alias in namespace \b alib.
74
using
FormatterJavaStyle
=
lang::format::FormatterJavaStyle
;
75
76
/// Type alias in namespace \b alib.
77
using
Paragraphs
=
lang::format::Paragraphs
;
78
79
/**
80
* Shared pointer to instances of \alib{lang::format;Formatter;standard formatters}.
81
*
82
* \see Method \alib{lang::format;Formatter::GetDefault}.
83
*/
84
using
SPFormatter
= std::shared_ptr< lang::format::Formatter>;
85
86
}
// namespace [alib]
87
88
89
#endif
// HPP_ALIB_LANG_FORMAT_FWDS
alib::boxing::Box
Definition
box.inl:38
alib::lang::format::FormatterJavaStyle
Definition
formatterjavastyle.hpp:126
alib::lang::format::FormatterPythonStyle
Definition
formatterpythonstyle.hpp:328
alib::lang::format::Formatter
Definition
formatter.hpp:65
alib::lang::format::Paragraphs
Definition
paragraphs.hpp:36
alib::strings::TAString< character >
alib::strings::TString< character >
exception.hpp
ALIB_ASSERT_MODULE
#define ALIB_ASSERT_MODULE(modulename)
Definition
alib.hpp:190
alib
Definition
alib.cpp:57
alib::SPFormatter
std::shared_ptr< lang::format::Formatter > SPFormatter
Definition
lang/format/fwds.hpp:84
alib::lang::format::FFormat
Definition
lang/format/fwds.hpp:30
alib::lang::format::FFormat::Signature
void(*)(const Box &self, const String &formatSpec, NumberFormat &nf, AString &target) Signature
Definition
lang/format/fwds.hpp:42
alib::strings::TNumberFormat< character >