Warning, file /include/unicode/displayoptions.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #ifndef __DISPLAYOPTIONS_H__
0005 #define __DISPLAYOPTIONS_H__
0006
0007 #include "unicode/utypes.h"
0008
0009 #if U_SHOW_CPLUSPLUS_API
0010
0011 #if !UCONFIG_NO_FORMATTING
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include "unicode/udisplayoptions.h"
0021 #include "unicode/uversion.h"
0022
0023 U_NAMESPACE_BEGIN
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043 class U_I18N_API DisplayOptions {
0044 public:
0045
0046
0047
0048
0049
0050 class U_I18N_API Builder {
0051 public:
0052
0053
0054
0055
0056
0057
0058
0059 Builder &setGrammaticalCase(UDisplayOptionsGrammaticalCase grammaticalCase) {
0060 this->grammaticalCase = grammaticalCase;
0061 return *this;
0062 }
0063
0064
0065
0066
0067
0068
0069
0070
0071 Builder &setNounClass(UDisplayOptionsNounClass nounClass) {
0072 this->nounClass = nounClass;
0073 return *this;
0074 }
0075
0076
0077
0078
0079
0080
0081
0082
0083 Builder &setPluralCategory(UDisplayOptionsPluralCategory pluralCategory) {
0084 this->pluralCategory = pluralCategory;
0085 return *this;
0086 }
0087
0088
0089
0090
0091
0092
0093
0094
0095 Builder &setCapitalization(UDisplayOptionsCapitalization capitalization) {
0096 this->capitalization = capitalization;
0097 return *this;
0098 }
0099
0100
0101
0102
0103
0104
0105
0106
0107 Builder &setNameStyle(UDisplayOptionsNameStyle nameStyle) {
0108 this->nameStyle = nameStyle;
0109 return *this;
0110 }
0111
0112
0113
0114
0115
0116
0117
0118
0119 Builder &setDisplayLength(UDisplayOptionsDisplayLength displayLength) {
0120 this->displayLength = displayLength;
0121 return *this;
0122 }
0123
0124
0125
0126
0127
0128
0129
0130
0131 Builder &setSubstituteHandling(UDisplayOptionsSubstituteHandling substituteHandling) {
0132 this->substituteHandling = substituteHandling;
0133 return *this;
0134 }
0135
0136
0137
0138
0139
0140
0141
0142 DisplayOptions build() { return DisplayOptions(*this); }
0143
0144 private:
0145 friend DisplayOptions;
0146
0147 Builder();
0148 Builder(const DisplayOptions &displayOptions);
0149
0150 UDisplayOptionsGrammaticalCase grammaticalCase;
0151 UDisplayOptionsNounClass nounClass;
0152 UDisplayOptionsPluralCategory pluralCategory;
0153 UDisplayOptionsCapitalization capitalization;
0154 UDisplayOptionsNameStyle nameStyle;
0155 UDisplayOptionsDisplayLength displayLength;
0156 UDisplayOptionsSubstituteHandling substituteHandling;
0157 };
0158
0159
0160
0161
0162
0163
0164
0165 static Builder builder();
0166
0167
0168
0169
0170
0171
0172 Builder copyToBuilder() const;
0173
0174
0175
0176
0177
0178
0179 UDisplayOptionsGrammaticalCase getGrammaticalCase() const { return grammaticalCase; }
0180
0181
0182
0183
0184
0185
0186
0187 UDisplayOptionsNounClass getNounClass() const { return nounClass; }
0188
0189
0190
0191
0192
0193
0194
0195 UDisplayOptionsPluralCategory getPluralCategory() const { return pluralCategory; }
0196
0197
0198
0199
0200
0201
0202
0203 UDisplayOptionsCapitalization getCapitalization() const { return capitalization; }
0204
0205
0206
0207
0208
0209
0210
0211 UDisplayOptionsNameStyle getNameStyle() const { return nameStyle; }
0212
0213
0214
0215
0216
0217
0218
0219 UDisplayOptionsDisplayLength getDisplayLength() const { return displayLength; }
0220
0221
0222
0223
0224
0225
0226
0227 UDisplayOptionsSubstituteHandling getSubstituteHandling() const { return substituteHandling; }
0228
0229
0230
0231
0232
0233
0234
0235 DisplayOptions &operator=(const DisplayOptions &other) = default;
0236
0237
0238
0239
0240
0241
0242
0243 DisplayOptions &operator=(DisplayOptions &&other) noexcept = default;
0244
0245
0246
0247
0248
0249
0250
0251 DisplayOptions(const DisplayOptions &other) = default;
0252
0253 private:
0254 DisplayOptions(const Builder &builder);
0255 UDisplayOptionsGrammaticalCase grammaticalCase;
0256 UDisplayOptionsNounClass nounClass;
0257 UDisplayOptionsPluralCategory pluralCategory;
0258 UDisplayOptionsCapitalization capitalization;
0259 UDisplayOptionsNameStyle nameStyle;
0260 UDisplayOptionsDisplayLength displayLength;
0261 UDisplayOptionsSubstituteHandling substituteHandling;
0262 };
0263
0264 U_NAMESPACE_END
0265
0266 #endif
0267
0268 #endif
0269
0270 #endif