BDE 4.14.0 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/// @endcode
77///
78/// ## Usage {#bdlat_formattingmode-usage}
79///
80///
81/// Due to the low-level nature of this component, a usage example is not
82/// necessary.
83/// @}
84/** @} */
85/** @} */
86
87/** @addtogroup bdl
88 * @{
89 */
90/** @addtogroup bdlat
91 * @{
92 */
93/** @addtogroup bdlat_formattingmode
94 * @{
95 */
96
97#include <bdlscm_version.h>
98
100
101
102
103/// This struct contains the symbolic constants for the formatting modes
104/// supported by the `bdlat` framework.
106
107 // CONSTANTS
108 enum {
109 // bit-field: original type (i.e., schema type)
110 e_DEFAULT = 0x0, // default formatting mode
111 e_DEC = 0x1, // use decimal format
112 e_HEX = 0x2, // use hexadecimal format
113 e_BASE64 = 0x3, // use base64 format
114 e_TEXT = 0x4, // use text format
115 e_TYPE_MASK = 0x7, // mask for type bit-field
116
117 // formatting flags
118 e_UNTAGGED = 0x00010000, // use untagged formatting
119 e_ATTRIBUTE = 0x00020000, // use attribute formatting
120 e_SIMPLE_CONTENT = 0x00040000, // use simple content formatting
121 e_NILLABLE = 0x00080000, // use nillable formatting
122 e_LIST = 0x00100000, // use list format (for arrays)
123 e_FLAGS_MASK = 0x001F0000 // mask for formatting flags
124
125#ifndef BDE_OMIT_INTERNAL_DEPRECATED
138
156#endif // BDE_OMIT_INTERNAL_DEPRECATED
157 };
158};
159
160
161
162#endif
163
164// ----------------------------------------------------------------------------
165// Copyright 2015 Bloomberg Finance L.P.
166//
167// Licensed under the Apache License, Version 2.0 (the "License");
168// you may not use this file except in compliance with the License.
169// You may obtain a copy of the License at
170//
171// http://www.apache.org/licenses/LICENSE-2.0
172//
173// Unless required by applicable law or agreed to in writing, software
174// distributed under the License is distributed on an "AS IS" BASIS,
175// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
176// See the License for the specific language governing permissions and
177// limitations under the License.
178// ----------------------------- END-OF-FILE ----------------------------------
179
180/** @} */
181/** @} */
182/** @} */
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition bdlat_formattingmode.h:105
@ e_LIST
Definition bdlat_formattingmode.h:122
@ BDEAT_DEC
Definition bdlat_formattingmode.h:140
@ BDEAT_BASE64
Definition bdlat_formattingmode.h:142
@ e_TYPE_MASK
Definition bdlat_formattingmode.h:115
@ BDEAT_IS_LIST
Definition bdlat_formattingmode.h:155
@ e_BASE64
Definition bdlat_formattingmode.h:113
@ BDEAT_FLAGS_MASK
Definition bdlat_formattingmode.h:150
@ TEXT
Definition bdlat_formattingmode.h:130
@ BASE64
Definition bdlat_formattingmode.h:129
@ e_ATTRIBUTE
Definition bdlat_formattingmode.h:119
@ e_FLAGS_MASK
Definition bdlat_formattingmode.h:123
@ IS_NILLABLE
Definition bdlat_formattingmode.h:135
@ e_DEFAULT
Definition bdlat_formattingmode.h:110
@ BDEAT_DEFAULT
Definition bdlat_formattingmode.h:139
@ DEC
Definition bdlat_formattingmode.h:127
@ BDEAT_TYPE_MASK
Definition bdlat_formattingmode.h:144
@ IS_UNTAGGED
Definition bdlat_formattingmode.h:132
@ BDEAT_IS_SIMPLE_CONTENT
Definition bdlat_formattingmode.h:153
@ e_HEX
Definition bdlat_formattingmode.h:112
@ BDEAT_SIMPLE_CONTENT
Definition bdlat_formattingmode.h:147
@ BDEAT_ATTRIBUTE
Definition bdlat_formattingmode.h:146
@ BDEAT_UNTAGGED
Definition bdlat_formattingmode.h:145
@ e_NILLABLE
Definition bdlat_formattingmode.h:121
@ DEFAULT
Definition bdlat_formattingmode.h:126
@ BDEAT_LIST
Definition bdlat_formattingmode.h:149
@ e_DEC
Definition bdlat_formattingmode.h:111
@ BDEAT_HEX
Definition bdlat_formattingmode.h:141
@ BDEAT_TEXT
Definition bdlat_formattingmode.h:143
@ HEX
Definition bdlat_formattingmode.h:128
@ FLAGS_MASK
Definition bdlat_formattingmode.h:137
@ TYPE_MASK
Definition bdlat_formattingmode.h:131
@ BDEAT_NILLABLE
Definition bdlat_formattingmode.h:148
@ e_UNTAGGED
Definition bdlat_formattingmode.h:118
@ BDEAT_IS_ATTRIBUTE
Definition bdlat_formattingmode.h:152
@ IS_SIMPLE_CONTENT
Definition bdlat_formattingmode.h:134
@ BDEAT_IS_NILLABLE
Definition bdlat_formattingmode.h:154
@ IS_ATTRIBUTE
Definition bdlat_formattingmode.h:133
@ BDEAT_IS_UNTAGGED
Definition bdlat_formattingmode.h:151
@ e_SIMPLE_CONTENT
Definition bdlat_formattingmode.h:120
@ e_TEXT
Definition bdlat_formattingmode.h:114
@ IS_LIST
Definition bdlat_formattingmode.h:136