w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

numrange_impl.h
Go to the documentation of this file.
1 // © 2018 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 
4 #include "unicode/utypes.h"
5 
6 #if !UCONFIG_NO_FORMATTING
7 #ifndef __SOURCE_NUMRANGE_TYPES_H__
8 #define __SOURCE_NUMRANGE_TYPES_H__
9 
13 #include "number_types.h"
14 #include "number_decimalquantity.h"
15 #include "number_formatimpl.h"
17 #include "formattedval_impl.h"
18 #include "pluralranges.h"
19 
20 U_NAMESPACE_BEGIN namespace number {
21 namespace impl {
22 
23 
24 /**
25  * Class similar to UFormattedNumberData.
26  *
27  * Has incomplete magic number logic that will need to be finished
28  * if this is to be exposed as C API in the future.
29  *
30  * Possible magic number: 0x46445200
31  * Reads in ASCII as "FDR" (FormatteDnumberRange with room at the end)
32  */
34 public:
37 
41 };
42 
43 
44 class NumberRangeFormatterImpl : public UMemory {
45  public:
46  NumberRangeFormatterImpl(const RangeMacroProps& macros, UErrorCode& status);
47 
48  void format(UFormattedNumberRangeData& data, bool equalBeforeRounding, UErrorCode& status) const;
49 
50  private:
54 
57 
58  SimpleFormatter fRangeFormatter;
60 
62 
64  MicroProps& micros1, MicroProps& micros2,
65  UErrorCode& status) const;
66 
68  MicroProps& micros1, MicroProps& micros2,
69  UErrorCode& status) const;
70 
72  MicroProps& micros1, MicroProps& micros2,
73  UErrorCode& status) const;
74 
75  const Modifier& resolveModifierPlurals(const Modifier& first, const Modifier& second) const;
76 };
77 
78 
79 /** Helper function used in upluralrules.cpp */
81  const UFormattedNumberRange* uresult, UErrorCode& status);
82 
83 
84 } // namespace impl
85 } // namespace number
87 
88 #endif //__SOURCE_NUMRANGE_TYPES_H__
89 #endif /* #if !UCONFIG_NO_FORMATTING */
UNumberRangeIdentityFallback fIdentityFallback
Definition: numrange_impl.h:56
void format(UFormattedNumberRangeData &data, Bool__ equalBeforeRounding, UErrorCode &status) const
void formatApproximately(UFormattedNumberRangeData &data, MicroProps &micros1, MicroProps &micros2, UErrorCode &status) const
void formatSingleValue(UFormattedNumberRangeData &data, MicroProps &micros1, MicroProps &micros2, UErrorCode &status) const
void formatRange(UFormattedNumberRangeData &data, MicroProps &micros1, MicroProps &micros2, UErrorCode &status) const
const Modifier & resolveModifierPlurals(const Modifier &first, const Modifier &second) const
NumberRangeFormatterImpl(const RangeMacroProps &macros, UErrorCode &status)
UNumberRangeIdentityResult identityResult
Definition: numrange_impl.h:40
struct rect data
Definition: dvipdfm.c:64
constexpr FormattedStringBuilder::Field kUndefinedField
static char * macros[10]
const UFormattedNumberRangeData * validateUFormattedNumberRange(const UFormattedNumberRange *uresult, UErrorCode &status)
static int32_t first
Definition: ppagelist.c:29
#define impl
Definition: pts_fax.c:34
#define status
C++ API: Simple formatter, minimal subset of MessageFormat.
second
Definition: tex4ht.c:4115
UNumberRangeIdentityResult
@ UNUM_IDENTITY_RESULT_COUNT
UNumberRangeIdentityFallback
struct UFormattedNumberRange UFormattedNumberRange
UNumberRangeCollapse
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Definition: utypes.h:431