BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlar_choicevtable.h
Go to the documentation of this file.
1/// @file bdlar_choicevtable.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bdlar_choicevtable.h -*-C++-*-
8#ifndef INCLUDED_BDLAR_CHOICEVTABLE
9#define INCLUDED_BDLAR_CHOICEVTABLE
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup bdlar_choicevtable bdlar_choicevtable
15/// @brief Provide ...
16/// @addtogroup bdl
17/// @{
18/// @addtogroup bdlar
19/// @{
20/// @addtogroup bdlar_choicevtable
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bdlar_choicevtable-purpose"> Purpose</a>
25/// * <a href="#bdlar_choicevtable-classes"> Classes </a>
26/// * <a href="#bdlar_choicevtable-description"> Description </a>
27///
28/// # Purpose {#bdlar_choicevtable-purpose}
29/// Provide ...
30///
31/// # Classes {#bdlar_choicevtable-classes}
32///
33/// - bdlar::ChoiceVtable: ...
34/// - bdlar::ChoiceConstVtable: ...
35///
36/// # Description {#bdlar_choicevtable-description}
37/// This component provides ...
38///
39/// @}
40/** @} */
41/** @} */
42
43/** @addtogroup bdl
44 * @{
45 */
46/** @addtogroup bdlar
47 * @{
48 */
49/** @addtogroup bdlar_choicevtable
50 * @{
51 */
52
53
54namespace bdlar {
55
56// Forward
57class AccessorWithInfoRef;
58class ManipulatorWithInfoRef;
59
60 // ========================
61 // struct ChoiceConstVtable
62 // ========================
63
64/// This struct stores a series of function pointers to wrappers that invoke
65/// the underlying methods with read-only access of the supplied type erased
66/// object that implement the "choice" type category.
67///
68/// See @ref bdlar_choicevtable
70 // TYPES
71 typedef int SelectionId(const void *object);
72 typedef bool HasSelectionId(const void *object, int selectionId);
73 typedef bool HasSelectionName(const void *object,
74 const char *selectionName,
75 int selectionNameLength);
76 typedef int AccessSelection(const void *object,
77 AccessorWithInfoRef& accessor);
78 typedef const char *XsdName(const void *object, int format);
79
80 // PUBLIC DATA
81 SelectionId *d_selectionId_fp;
82 HasSelectionId *d_hasSelectionId_fp;
83 HasSelectionName *d_hasSelectionName_fp;
84 AccessSelection *d_accessSelection_fp;
85 XsdName *d_xsdName_fp;
86};
87
88 // ===================
89 // struct ChoiceVtable
90 // ===================
91
92/// This struct stores a series of function pointers to wrappers that invoke
93/// the underlying methods of the supplied type erased object that implement
94/// the "choice" type category.
95///
96/// See @ref bdlar_choicevtable
98 // TYPES
99 typedef int MakeSelectionById(void *object, int selectionId);
100 typedef int MakeSelectionByName(void *object,
101 const char *selectionName,
102 int selectionNameLength);
103 typedef void Reset(void *object);
104 typedef int ManipulateSelection(void *object,
105 ManipulatorWithInfoRef& manipulator);
106
107 // PUBLIC DATA
109 MakeSelectionById *d_makeSelectionById_fp;
110 MakeSelectionByName *d_makeSelectionByName_fp;
111 ManipulateSelection *d_manipulateSelection_fp;
113};
114
115} // close package namespace
116
117
118#endif
119
120// ----------------------------------------------------------------------------
121// Copyright 2024 Bloomberg Finance L.P.
122//
123// Licensed under the Apache License, Version 2.0 (the "License");
124// you may not use this file except in compliance with the License.
125// You may obtain a copy of the License at
126//
127// http://www.apache.org/licenses/LICENSE-2.0
128//
129// Unless required by applicable law or agreed to in writing, software
130// distributed under the License is distributed on an "AS IS" BASIS,
131// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
132// See the License for the specific language governing permissions and
133// limitations under the License.
134// ----------------------------- END-OF-FILE ----------------------------------
135
136/** @} */
137/** @} */
138/** @} */
Definition bdlar_accessorref.h:109
Definition bdlar_manipulatorref.h:109
#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_choicevtable.h:69
int AccessSelection(const void *object, AccessorWithInfoRef &accessor)
Definition bdlar_choicevtable.h:76
int SelectionId(const void *object)
Definition bdlar_choicevtable.h:71
bool HasSelectionName(const void *object, const char *selectionName, int selectionNameLength)
Definition bdlar_choicevtable.h:73
const char * XsdName(const void *object, int format)
Definition bdlar_choicevtable.h:78
HasSelectionId * d_hasSelectionId_fp
Definition bdlar_choicevtable.h:82
bool HasSelectionId(const void *object, int selectionId)
Definition bdlar_choicevtable.h:72
XsdName * d_xsdName_fp
Definition bdlar_choicevtable.h:85
HasSelectionName * d_hasSelectionName_fp
Definition bdlar_choicevtable.h:83
SelectionId * d_selectionId_fp
Definition bdlar_choicevtable.h:81
AccessSelection * d_accessSelection_fp
Definition bdlar_choicevtable.h:84
Definition bdlar_choicevtable.h:97
ChoiceConstVtable d_const
Definition bdlar_choicevtable.h:108
int ManipulateSelection(void *object, ManipulatorWithInfoRef &manipulator)
Definition bdlar_choicevtable.h:104
MakeSelectionByName * d_makeSelectionByName_fp
Definition bdlar_choicevtable.h:110
void Reset(void *object)
Definition bdlar_choicevtable.h:103
ManipulateSelection * d_manipulateSelection_fp
Definition bdlar_choicevtable.h:111
MakeSelectionById * d_makeSelectionById_fp
Definition bdlar_choicevtable.h:109
int MakeSelectionByName(void *object, const char *selectionName, int selectionNameLength)
Definition bdlar_choicevtable.h:100
int MakeSelectionById(void *object, int selectionId)
Definition bdlar_choicevtable.h:99
Reset * d_reset_fp
Definition bdlar_choicevtable.h:112