ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
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)
14#endif
15
17
18namespace 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;
55 class Paragraphs;
56
57} // namespace alib::lang[::format]
58
59namespace 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.
69
70/// Type alias in namespace \b alib.
72
73/// Type alias in namespace \b alib.
75
76/// Type alias in namespace \b alib.
78
79/**
80 * Shared pointer to instances of \alib{lang::format;Formatter;standard formatters}.
81 *
82 * \see Method \alib{lang::format;Formatter::GetDefault}.
83 */
84using SPFormatter = std::shared_ptr< lang::format::Formatter>;
85
86} // namespace [alib]
87
88
89#endif // HPP_ALIB_LANG_FORMAT_FWDS
#define ALIB_ASSERT_MODULE(modulename)
Definition alib.hpp:190
Definition alib.cpp:57
std::shared_ptr< lang::format::Formatter > SPFormatter
void(*)(const Box &self, const String &formatSpec, NumberFormat &nf, AString &target) Signature