BDE 4.14.0 Production release
Loading...
Searching...
No Matches
balber_berconstants.h
Go to the documentation of this file.
1/// @file balber_berconstants.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// balber_berconstants.h -*-C++-*-
8#ifndef INCLUDED_BALBER_BERCONSTANTS
9#define INCLUDED_BALBER_BERCONSTANTS
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup balber_berconstants balber_berconstants
15/// @brief Provide namespace for BER-related constants.
16/// @addtogroup bal
17/// @{
18/// @addtogroup balber
19/// @{
20/// @addtogroup balber_berconstants
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#balber_berconstants-purpose"> Purpose</a>
25/// * <a href="#balber_berconstants-classes"> Classes </a>
26/// * <a href="#balber_berconstants-description"> Description </a>
27/// * <a href="#balber_berconstants-usage"> Usage </a>
28/// * <a href="#balber_berconstants-example-1-basic-usage"> Example 1: Basic Usage </a>
29///
30/// # Purpose {#balber_berconstants-purpose}
31/// Provide namespace for BER-related constants.
32///
33/// # Classes {#balber_berconstants-classes}
34///
35/// - balber::BerConstants: namespace for BER-related constants
36///
37/// @see BER Specification (ITU-T X.690)
38///
39/// # Description {#balber_berconstants-description}
40/// The `balber::BerConstants` `struct` defined in this component
41/// defines two enumerations, `balber::TagClass` and `balber::TagType`, that
42/// contain symbolic constants for the corresponding tag classes and tag types,
43/// as defined in the BER specification (X.690).
44///
45/// ## Usage {#balber_berconstants-usage}
46///
47///
48/// This section illustrates intended use of this component.
49///
50/// ### Example 1: Basic Usage {#balber_berconstants-example-1-basic-usage}
51///
52///
53/// TBD
54/// @}
55/** @} */
56/** @} */
57
58/** @addtogroup bal
59 * @{
60 */
61/** @addtogroup balber
62 * @{
63 */
64/** @addtogroup balber_berconstants
65 * @{
66 */
67
68#include <balscm_version.h>
69
70#include <bsl_iosfwd.h>
71
72#ifndef BDE_OMIT_INTERNAL_DEPRECATED
73#undef UNIVERSAL
74#undef APPLICATION
75#undef CONTEXT_SPECIFIC
76#undef PRIVATE
77#undef PRIMITIVE
78#undef CONSTRUCTED
79#endif // BDE_OMIT_INTERNAL_DEPRECATED
80
81
82namespace balber {
83
84 // ===================
85 // struct BerConstants
86 // ===================
87
88/// This `struct` contains enumerations of the constants used by the BER
89/// encoder and decoder.
91
92 enum TagClass {
93 // Enumeration of the four possible BER tag classes.
94
95 e_UNIVERSAL = 0x00 // the universal tag class
96 , e_APPLICATION = 0x40 // the application tag class
97 , e_CONTEXT_SPECIFIC = 0x80 // the context-specific tag class
98 , e_PRIVATE = 0xC0 // the private tag class
99
100#ifndef BDE_OMIT_INTERNAL_DEPRECATED
105
110#endif // BDE_OMIT_INTERNAL_DEPRECATED
111 };
112
113 enum TagType {
114 // Enumeration of the two possible BER tag types.
115
116 e_PRIMITIVE = 0x00 // the primitive tag type
117 , e_CONSTRUCTED = 0x20 // the constructed tag type
118
119#ifndef BDE_OMIT_INTERNAL_DEPRECATED
122
125#endif // BDE_OMIT_INTERNAL_DEPRECATED
126 };
127};
128
129// FREE OPERATORS
130
131/// Format the specified `tagClass` to the specified output `stream` and
132/// return a reference providing modifiable access to `stream`.
133bsl::ostream& operator<<(bsl::ostream& stream,
134 BerConstants::TagClass tagClass);
135
136/// Format the specified `tagType` to the specified output `stream` and
137/// return a reference providing modifiable access to `stream`.
138bsl::ostream& operator<<(bsl::ostream& stream,
139 BerConstants::TagType tagType);
140
141} // close package namespace
142
143#endif
144
145// ----------------------------------------------------------------------------
146// Copyright 2015 Bloomberg Finance L.P.
147//
148// Licensed under the Apache License, Version 2.0 (the "License");
149// you may not use this file except in compliance with the License.
150// You may obtain a copy of the License at
151//
152// http://www.apache.org/licenses/LICENSE-2.0
153//
154// Unless required by applicable law or agreed to in writing, software
155// distributed under the License is distributed on an "AS IS" BASIS,
156// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
157// See the License for the specific language governing permissions and
158// limitations under the License.
159// ----------------------------- END-OF-FILE ----------------------------------
160
161/** @} */
162/** @} */
163/** @} */
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balber_berconstants.h:82
bsl::ostream & operator<<(bsl::ostream &stream, BerConstants::TagClass tagClass)
Definition balber_berconstants.h:90
TagType
Definition balber_berconstants.h:113
@ PRIMITIVE
Definition balber_berconstants.h:123
@ e_PRIMITIVE
Definition balber_berconstants.h:116
@ e_CONSTRUCTED
Definition balber_berconstants.h:117
@ BDEM_PRIMITIVE
Definition balber_berconstants.h:120
@ CONSTRUCTED
Definition balber_berconstants.h:124
@ BDEM_CONSTRUCTED
Definition balber_berconstants.h:121
TagClass
Definition balber_berconstants.h:92
@ e_CONTEXT_SPECIFIC
Definition balber_berconstants.h:97
@ BDEM_PRIVATE
Definition balber_berconstants.h:104
@ e_UNIVERSAL
Definition balber_berconstants.h:95
@ BDEM_UNIVERSAL
Definition balber_berconstants.h:101
@ BDEM_APPLICATION
Definition balber_berconstants.h:102
@ UNIVERSAL
Definition balber_berconstants.h:106
@ e_PRIVATE
Definition balber_berconstants.h:98
@ e_APPLICATION
Definition balber_berconstants.h:96
@ APPLICATION
Definition balber_berconstants.h:107
@ CONTEXT_SPECIFIC
Definition balber_berconstants.h:108
@ PRIVATE
Definition balber_berconstants.h:109
@ BDEM_CONTEXT_SPECIFIC
Definition balber_berconstants.h:103