BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlar_enumvtable.h
Go to the documentation of this file.
1/// @file bdlar_enumvtable.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bdlar_enumvtable.h -*-C++-*-
8#ifndef INCLUDED_BDLAR_ENUMVTABLE
9#define INCLUDED_BDLAR_ENUMVTABLE
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup bdlar_enumvtable bdlar_enumvtable
15/// @brief Provide ...
16/// @addtogroup bdl
17/// @{
18/// @addtogroup bdlar
19/// @{
20/// @addtogroup bdlar_enumvtable
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bdlar_enumvtable-purpose"> Purpose</a>
25/// * <a href="#bdlar_enumvtable-classes"> Classes </a>
26/// * <a href="#bdlar_enumvtable-description"> Description </a>
27///
28/// # Purpose {#bdlar_enumvtable-purpose}
29/// Provide ...
30///
31/// # Classes {#bdlar_enumvtable-classes}
32///
33/// - bdlar::EnumVtable: ...
34/// - bdlar::EnumConstVtable: ...
35///
36/// # Description {#bdlar_enumvtable-description}
37/// This component provides ...
38///
39/// @}
40/** @} */
41/** @} */
42
43/** @addtogroup bdl
44 * @{
45 */
46/** @addtogroup bdlar
47 * @{
48 */
49/** @addtogroup bdlar_enumvtable
50 * @{
51 */
52
53#include <bsl_string.h>
54
55
56namespace bdlar {
57
58 // ======================
59 // struct EnumConstVtable
60 // ======================
61
62/// This struct stores a series of function pointers to wrappers that invoke
63/// the underlying methods with read-only access of the supplied type erased
64/// object that implement the "enum" type category.
65///
66/// See @ref bdlar_enumvtable
68 // TYPES
69 typedef void ToInt(int *result, const void *value);
70 typedef void ToString(bsl::string *result, const void *value);
71 typedef bool HasFallback(const void *value);
72 typedef bool IsFallback(const void *value);
73 typedef const char *XsdName(const void *object, int format);
74
75 // PUBLIC DATA
81};
82
83 // =================
84 // struct EnumVtable
85 // =================
86
87/// This struct stores a series of function pointers to wrappers that invoke
88/// the underlying methods of the supplied type erased object that implement
89/// the "enum" type category.
90///
91/// See @ref bdlar_enumvtable
92struct EnumVtable {
93 // TYPES
94 typedef int FromInt(void *result, int number);
95 typedef int FromString(void *result, const char *string, int stringLength);
96 typedef int MakeFallback(void *result);
97 typedef void Reset(void *object);
98
99 // PUBLIC DATA
105};
106
107} // close package namespace
108
109
110#endif
111
112// ----------------------------------------------------------------------------
113// Copyright 2024 Bloomberg Finance L.P.
114//
115// Licensed under the Apache License, Version 2.0 (the "License");
116// you may not use this file except in compliance with the License.
117// You may obtain a copy of the License at
118//
119// http://www.apache.org/licenses/LICENSE-2.0
120//
121// Unless required by applicable law or agreed to in writing, software
122// distributed under the License is distributed on an "AS IS" BASIS,
123// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
124// See the License for the specific language governing permissions and
125// limitations under the License.
126// ----------------------------- END-OF-FILE ----------------------------------
127
128/** @} */
129/** @} */
130/** @} */
Definition bslstl_string.h:1252
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlar_accessorref.h:59
Definition bdlar_enumvtable.h:67
bool IsFallback(const void *value)
Definition bdlar_enumvtable.h:72
void ToString(bsl::string *result, const void *value)
Definition bdlar_enumvtable.h:70
void ToInt(int *result, const void *value)
Definition bdlar_enumvtable.h:69
bool HasFallback(const void *value)
Definition bdlar_enumvtable.h:71
ToInt * d_toInt_fp
Definition bdlar_enumvtable.h:76
ToString * d_toString_fp
Definition bdlar_enumvtable.h:77
HasFallback * d_hasFallback_fp
Definition bdlar_enumvtable.h:78
IsFallback * d_isFallback_fp
Definition bdlar_enumvtable.h:79
const char * XsdName(const void *object, int format)
Definition bdlar_enumvtable.h:73
XsdName * d_xsdName_fp
Definition bdlar_enumvtable.h:80
Definition bdlar_enumvtable.h:92
Reset * d_reset_fp
Definition bdlar_enumvtable.h:104
int FromInt(void *result, int number)
Definition bdlar_enumvtable.h:94
EnumConstVtable d_const
Definition bdlar_enumvtable.h:100
void Reset(void *object)
Definition bdlar_enumvtable.h:97
FromInt * d_fromInt_fp
Definition bdlar_enumvtable.h:101
MakeFallback * d_makeFallback_fp
Definition bdlar_enumvtable.h:103
int MakeFallback(void *result)
Definition bdlar_enumvtable.h:96
int FromString(void *result, const char *string, int stringLength)
Definition bdlar_enumvtable.h:95
FromString * d_fromString_fp
Definition bdlar_enumvtable.h:102