BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlat_formattingmode.h
Go to the documentation of this file.
1/// @file bdlat_formattingmode.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bdlat_formattingmode.h -*-C++-*-
8#ifndef INCLUDED_BDLAT_FORMATTINGMODE
9#define INCLUDED_BDLAT_FORMATTINGMODE
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup bdlat_formattingmode bdlat_formattingmode
15/// @brief Provide formatting mode constants.
16/// @addtogroup bdl
17/// @{
18/// @addtogroup bdlat
19/// @{
20/// @addtogroup bdlat_formattingmode
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bdlat_formattingmode-purpose"> Purpose</a>
25/// * <a href="#bdlat_formattingmode-classes"> Classes </a>
26/// * <a href="#bdlat_formattingmode-description"> Description </a>
27/// * <a href="#bdlat_formattingmode-original-type"> Original Type (Schema Type) </a>
28/// * <a href="#bdlat_formattingmode-formatting-flags"> Formatting Flags </a>
29/// * <a href="#bdlat_formattingmode-usage"> Usage </a>
30///
31/// # Purpose {#bdlat_formattingmode-purpose}
32/// Provide formatting mode constants.
33///
34/// # Classes {#bdlat_formattingmode-classes}
35///
36/// - bdlat_FormattingMode: scope for formatting mode constants
37///
38/// @see balxml_typesprintutil balxml_typesparserutil
39///
40/// # Description {#bdlat_formattingmode-description}
41/// The `bdlat_FormattingMode` struct provided in this component
42/// defines the symbolic constants for all the formatting modes supported by the
43/// `bdlat` framework. The formatting modes are separated into two categories:
44/// a bit-field for the original type (i.e., schema type), and a number of
45/// flags.
46///
47/// ## Original Type (Schema Type) {#bdlat_formattingmode-original-type}
48///
49///
50/// This bit-field defines the formatting modes that are derived based on the
51/// type of an element, as defined in the schema. The available modes are:
52/// @code
53/// Formatting Mode Description
54/// --------------- -----------
55/// e_DEFAULT Use a default formatting mode.
56/// e_DEC Use the decimal format.
57/// e_HEX Use the hexadecimal format.
58/// e_BASE64 Use the base64 format.
59/// e_TEXT Use the text format.
60/// @endcode
61///
62/// ## Formatting Flags {#bdlat_formattingmode-formatting-flags}
63///
64///
65/// The following bitwise flags can be applied to a schema element:
66/// @code
67/// Formatting Mode Description
68/// --------------- -----------
69/// e_UNTAGGED Use untagged formatting (for anonymous choices).
70/// e_ATTRIBUTE Use attribute formatting (for XSD attributes).
71/// e_SIMPLE_CONTENT Use simple content formatting (for XSD simple
72/// content types).
73/// e_NILLABLE Use nillable formatting (for XSD `nillable`
74/// option).
75/// e_LIST Use the list format (this is used for arrays).
76/// e_DEFAULT_VALUE `default` attribute is specified for the
77/// corresponding `<xs:element>`.
78/// @endcode
79///
80/// ## Usage {#bdlat_formattingmode-usage}
81///
82///
83/// Due to the low-level nature of this component, a usage example is not
84/// necessary.
85/// @}
86/** @} */
87/** @} */
88
89/** @addtogroup bdl
90 * @{
91 */
92/** @addtogroup bdlat
93 * @{
94 */
95/** @addtogroup bdlat_formattingmode
96 * @{
97 */
98
99#include <bdlscm_version.h>
100
101#include <bdlat_bdeatoverrides.h>
102
103
104
105/// This struct contains the symbolic constants for the formatting modes
106/// supported by the `bdlat` framework.
107///
108/// See @ref bdlat_formattingmode
110
111 // CONSTANTS
112 enum {
113 // bit-field: original type (i.e., schema type)
114 e_DEFAULT = 0x0, // default formatting mode
115 e_DEC = 0x1, // use decimal format
116 e_HEX = 0x2, // use hexadecimal format
117 e_BASE64 = 0x3, // use base64 format
118 e_TEXT = 0x4, // use text format
119 e_TYPE_MASK = 0x7, // mask for type bit-field
120
121 // formatting flags
122 e_UNTAGGED = 0x00010000, // use untagged formatting
123 e_ATTRIBUTE = 0x00020000, // use attribute formatting
124 e_SIMPLE_CONTENT = 0x00040000, // use simple content formatting
125 e_NILLABLE = 0x00080000, // use nillable formatting
126 e_LIST = 0x00100000, // use list format (for arrays)
127 e_DEFAULT_VALUE = 0x00200000, // has default value in XSD
128 e_FLAGS_MASK = 0x003F0000 // mask for formatting flags
129
130#ifndef BDE_OMIT_INTERNAL_DEPRECATED
143
162#endif // BDE_OMIT_INTERNAL_DEPRECATED
163 };
164};
165
166
167
168#endif
169
170// ----------------------------------------------------------------------------
171// Copyright 2015 Bloomberg Finance L.P.
172//
173// Licensed under the Apache License, Version 2.0 (the "License");
174// you may not use this file except in compliance with the License.
175// You may obtain a copy of the License at
176//
177// http://www.apache.org/licenses/LICENSE-2.0
178//
179// Unless required by applicable law or agreed to in writing, software
180// distributed under the License is distributed on an "AS IS" BASIS,
181// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
182// See the License for the specific language governing permissions and
183// limitations under the License.
184// ----------------------------- END-OF-FILE ----------------------------------
185
186/** @} */
187/** @} */
188/** @} */
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlat_formattingmode.h:109
@ e_LIST
Definition bdlat_formattingmode.h:126
@ BDEAT_DEC
Definition bdlat_formattingmode.h:145
@ BDEAT_DEFAULT_VALUE
Definition bdlat_formattingmode.h:155
@ BDEAT_BASE64
Definition bdlat_formattingmode.h:147
@ e_TYPE_MASK
Definition bdlat_formattingmode.h:119
@ BDEAT_IS_LIST
Definition bdlat_formattingmode.h:161
@ e_BASE64
Definition bdlat_formattingmode.h:117
@ BDEAT_FLAGS_MASK
Definition bdlat_formattingmode.h:156
@ TEXT
Definition bdlat_formattingmode.h:135
@ BASE64
Definition bdlat_formattingmode.h:134
@ e_ATTRIBUTE
Definition bdlat_formattingmode.h:123
@ e_FLAGS_MASK
Definition bdlat_formattingmode.h:128
@ IS_NILLABLE
Definition bdlat_formattingmode.h:140
@ e_DEFAULT
Definition bdlat_formattingmode.h:114
@ BDEAT_DEFAULT
Definition bdlat_formattingmode.h:144
@ DEC
Definition bdlat_formattingmode.h:132
@ BDEAT_TYPE_MASK
Definition bdlat_formattingmode.h:149
@ IS_UNTAGGED
Definition bdlat_formattingmode.h:137
@ BDEAT_IS_SIMPLE_CONTENT
Definition bdlat_formattingmode.h:159
@ e_HEX
Definition bdlat_formattingmode.h:116
@ BDEAT_SIMPLE_CONTENT
Definition bdlat_formattingmode.h:152
@ BDEAT_ATTRIBUTE
Definition bdlat_formattingmode.h:151
@ BDEAT_UNTAGGED
Definition bdlat_formattingmode.h:150
@ e_DEFAULT_VALUE
Definition bdlat_formattingmode.h:127
@ e_NILLABLE
Definition bdlat_formattingmode.h:125
@ DEFAULT
Definition bdlat_formattingmode.h:131
@ BDEAT_LIST
Definition bdlat_formattingmode.h:154
@ e_DEC
Definition bdlat_formattingmode.h:115
@ BDEAT_HEX
Definition bdlat_formattingmode.h:146
@ BDEAT_TEXT
Definition bdlat_formattingmode.h:148
@ HEX
Definition bdlat_formattingmode.h:133
@ FLAGS_MASK
Definition bdlat_formattingmode.h:142
@ TYPE_MASK
Definition bdlat_formattingmode.h:136
@ BDEAT_NILLABLE
Definition bdlat_formattingmode.h:153
@ e_UNTAGGED
Definition bdlat_formattingmode.h:122
@ BDEAT_IS_ATTRIBUTE
Definition bdlat_formattingmode.h:158
@ IS_SIMPLE_CONTENT
Definition bdlat_formattingmode.h:139
@ BDEAT_IS_NILLABLE
Definition bdlat_formattingmode.h:160
@ IS_ATTRIBUTE
Definition bdlat_formattingmode.h:138
@ BDEAT_IS_UNTAGGED
Definition bdlat_formattingmode.h:157
@ e_SIMPLE_CONTENT
Definition bdlat_formattingmode.h:124
@ e_TEXT
Definition bdlat_formattingmode.h:118
@ IS_LIST
Definition bdlat_formattingmode.h:141