ALib C++ Library
Library Version: 2312 R0
Documentation generated by doxygen
text/fwds.hpp
Go to the documentation of this file.
1 /** ************************************************************************************************
2  * \file
3  * This header file is part of module \alib_text of the \aliblong.
4  *
5  * \emoji :copyright: 2013-2023 A-Worx GmbH, Germany.
6  * Published under \ref mainpage_license "Boost Software License".
7  **************************************************************************************************/
8 #ifndef HPP_ALIB_TEXT_FWDS
9 #define HPP_ALIB_TEXT_FWDS 1
10 
11 #if !defined (HPP_ALIB_RESULTS_EXCEPTION)
13 #endif
14 
16 ALIB_ASSERT_FILESET(MODULES)
17 
18 namespace aworx { namespace lib { namespace text {
19 
20 
21 
22 /** ************************************************************************************************
23  * This interface class exposes interface method \c Invoke which writes the content of the
24  * box to the given \b %AString object in accordance with \c formatSpec.
25  *
26  * \see
27  * For more information about this class see chapter
28  * \ref alib_text_custom_types "3. Formatting Custom Types" of the
29  * \ref alib_mod_text "Programmer's Manual" of module \alib_text_nl.
30  **************************************************************************************************/
31 struct FFormat
32 {
33  /**
34  * Signature of the invokable function.<br>
35  * Implementations write the content of \p{box} to the given \b %AString object \p{target} in
36  * accordance to the type-specific format specification \p{formatSpec}.
37  *
38  * @param self The box that the function was invoked on.
39  * @param formatSpec The specification of the format (type specific). If empty, a default
40  * specification string might have to be chosen.
41  * @param target The AString object receiving the formatted string.
42  */
43  using Signature = void (*) ( const Box& self, const String& formatSpec, AString& target );
44 };
45 
46 
47 
48 // #################################################################################################
49 // Forwards
50 // #################################################################################################
51 
52  class Text;
53  class Formatter;
55  class FormatterJavaStyle;
56  class Paragraphs;
57 
58 }} // namespace aworx[::lib::text]
59 
60 
61 // #################################################################################################
62 // Alias types in namespace #aworx.
63 // #################################################################################################
64 /// Type alias in namespace #aworx.
66 
67 /// Type alias in namespace #aworx.
69 
70 /// Type alias in namespace #aworx.
72 
73 /// Type alias in namespace #aworx.
75 
76 /**
77  * Shared pointer to instances of \alib{text,Formatter,standard formatters}.
78  *
79  * \see Method \alib{text,Formatter::GetDefault}.
80  */
81 using SPFormatter = std::shared_ptr<lib::text::Formatter>;
82 
83 } // namespace [aworx]
84 
85 
86 #endif // HPP_ALIB_TEXT_FWDS
87 
ALIB_ASSERT_MODULE
#define ALIB_ASSERT_MODULE(modulename)
Definition: modules.hpp:237
aworx::lib::text::FormatterPythonStyle
Definition: formatterpythonstyle.hpp:327
ALIB_ASSERT_FILESET
#define ALIB_ASSERT_FILESET(filesetname)
Definition: modules.hpp:242
aworx::FormatterPythonStyle
lib::text::FormatterPythonStyle FormatterPythonStyle
Type alias in namespace aworx.
Definition: text/fwds.hpp:68
aworx::lib::strings::TString< character >
aworx::SPFormatter
std::shared_ptr< lib::text::Formatter > SPFormatter
Definition: text/fwds.hpp:81
aworx::lib::text::FFormat::Signature
void(*)(const Box &self, const String &formatSpec, AString &target) Signature
Definition: text/fwds.hpp:43
aworx
Definition: alox/alox.hpp:40
aworx::Paragraphs
lib::text::Paragraphs Paragraphs
Type alias in namespace aworx.
Definition: text/fwds.hpp:74
aworx::lib::strings::TAString< character >
aworx::lib::text::Formatter
Definition: formatter.hpp:60
aworx::FormatterJavaStyle
lib::text::FormatterJavaStyle FormatterJavaStyle
Type alias in namespace aworx.
Definition: text/fwds.hpp:71
aworx::lib::text::FFormat
Definition: text/fwds.hpp:31
exception.hpp
aworx::lib::text::Text
Definition: text.hpp:158
aworx::Formatter
lib::text::Formatter Formatter
Type alias in namespace aworx.
Definition: text/fwds.hpp:65
aworx::lib::text::FormatterJavaStyle
Definition: formatterjavastyle.hpp:125
aworx::lib::boxing::Box
Definition: box.inl:33
aworx::lib::text::Paragraphs
Definition: paragraphs.hpp:35