Skip to content

Commit 0263134

Browse files
authored
Merge pull request #5862 from MicrosoftDocs/FromPublicMasterBranch
Confirm merge from FromPublicMasterBranch to main to sync with https://github.com/MicrosoftDocs/cpp-docs (branch main)
2 parents fdf7c94 + 067283f commit 0263134

File tree

4 files changed

+70
-68
lines changed

4 files changed

+70
-68
lines changed

docs/cpp/inheritance-cpp.md

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,54 @@
11
---
2-
description: "Learn more about: Inheritance (C++)"
3-
title: "Inheritance (C++)"
2+
title: "Inheritance (C++)"
3+
description: "Learn more about: Inheritance (C++)"
44
ms.date: "11/04/2016"
55
helpviewer_keywords: ["derived classes [C++]", "derived classes [C++], about derived classes", "classes [C++], derived"]
6-
ms.assetid: 3534ca19-d9ed-4a40-be1b-b921ad0e6956
76
---
8-
# Inheritance (C++)
7+
# Inheritance (C++)
98

109
This section explains how to use derived classes to produce extensible programs.
1110

1211
## Overview
1312

14-
New classes can be derived from existing classes using a mechanism called "inheritance" (see the information beginning in [Single Inheritance](../cpp/single-inheritance.md)). Classes that are used for derivation are called "base classes" of a particular derived class. A derived class is declared using the following syntax:
13+
New classes can be derived from existing classes using a mechanism called "inheritance" (see the information beginning in [Single Inheritance](single-inheritance.md)). Classes that are used for derivation are called "base classes" of a particular derived class. A derived class is declared using the following syntax:
1514

1615
```cpp
17-
class Derived : [virtual] [access-specifier] Base
16+
class DerivedSingleBase : [virtual] [access-specifier] Base
1817
{
19-
// member list
18+
// member list
2019
};
21-
class Derived : [virtual] [access-specifier] Base1,
22-
[virtual] [access-specifier] Base2, . . .
20+
21+
class DerivedMultipleBases : [virtual] [access-specifier] Base1,
22+
[virtual] [access-specifier] Base2, ...
2323
{
24-
// member list
24+
// member list
2525
};
2626
```
2727

28-
After the tag (name) for the class, a colon appears followed by a list of base specifications. The base classes so named must have been declared previously. The base specifications may contain an access specifier, which is one of the keywords **`public`**, **`protected`** or **`private`**. These access specifiers appear before the base class name and apply only to that base class. These specifiers control the derived class's permission to use to members of the base class. See [Member-Access Control](../cpp/member-access-control-cpp.md) for information on access to base class members. If the access specifier is omitted, the access to that base is considered **`private`**. The base specifications may contain the keyword **`virtual`** to indicate virtual inheritance. This keyword may appear before or after the access specifier, if any. If virtual inheritance is used, the base class is referred to as a virtual base class.
28+
After the tag (name) for the class, a colon appears followed by a list of base specifications. The base classes so named must have been declared previously. The base specifications may contain an access specifier, which is one of the keywords [**`public`**](public-cpp.md), [**`protected`**](protected-cpp.md) or [**`private`**](private-cpp.md). These access specifiers appear before the base class name and apply only to that base class. These specifiers control the derived class's permission to use members of the base class. See [Member-Access Control](member-access-control-cpp.md) for information on access to base class members. If the access specifier is omitted, the access to that base is considered **`private`**. The base specifications may contain the keyword [**`virtual`**](virtual-cpp.md) to indicate virtual inheritance. This keyword may appear before or after the access specifier, if any. If virtual inheritance is used, the base class is referred to as a virtual base class.
2929

30-
Multiple base classes can be specified, separated by commas. If a single base class is specified, the inheritance model is [Single inheritance](../cpp/single-inheritance.md). If more than one base class is specified, the inheritance model is called [Multiple inheritance](../cpp/multiple-base-classes.md).
30+
Multiple base classes can be specified, separated by commas. If a single base class is specified, the inheritance model is [Single inheritance](single-inheritance.md). If more than one base class is specified, the inheritance model is called [Multiple inheritance](multiple-base-classes.md).
3131

3232
The following topics are included:
3333

34-
- [Single inheritance](../cpp/single-inheritance.md)
34+
- [Single inheritance](single-inheritance.md)
35+
36+
- [Multiple base classes](multiple-base-classes.md)
37+
38+
- [Virtual functions](virtual-functions.md)
3539

36-
- [Multiple base classes](../cpp/multiple-base-classes.md)
40+
- [Explicit overrides](explicit-overrides-cpp.md)
3741

38-
- [Virtual functions](../cpp/virtual-functions.md)
42+
- [Abstract classes](abstract-classes-cpp.md)
3943

40-
- [Explicit overrides](../cpp/explicit-overrides-cpp.md)
44+
- [Summary of scope rules](summary-of-scope-rules.md)
4145

42-
- [Abstract classes](../cpp/abstract-classes-cpp.md)
46+
**Microsoft Specific**
4347

44-
- [Summary of scope rules](../cpp/summary-of-scope-rules.md)
48+
The [`__super`](super.md) and [`__interface`](interface.md) keywords are documented in this section.
4549

46-
The [__super](../cpp/super.md) and [__interface](../cpp/interface.md) keywords are documented in this section.
50+
**END Microsoft Specific**
4751

4852
## See also
4953

50-
[C++ Language Reference](../cpp/cpp-language-reference.md)
54+
[C++ Language Reference](cpp-language-reference.md)

docs/data/data-access-in-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Connect to Azure SQL Database from C or C++ applications.
3131
[Azure Storage](/azure/storage/common/storage-introduction) is a cloud storage solution for modern applications that rely on durability, availability, and scalability to meet the needs of their customers. Connect to Azure Storage from C++ by using the Azure Storage Client Library for C++.
3232

3333
[ODBC Driver for SQL Server](/sql/connect/odbc/microsoft-odbc-driver-for-sql-server)<br/>
34-
The latest ODBC driver provides robust data access to Microsoft SQL Server and Microsoft Azure SQL Database for C/C++ based applications. Provides support for features including always encrypted, Azure Active Directory, and AlwaysOn Availability Groups. Also available for MacOS and Linux.
34+
The latest ODBC driver provides robust data access to Microsoft SQL Server and Microsoft Azure SQL Database for C/C++ based applications. Provides support for features including always encrypted, Azure Active Directory, and AlwaysOn Availability Groups. Also available for macOS and Linux.
3535

3636
[OLE DB Driver for SQL Server](/sql/connect/oledb/oledb-driver-for-sql-server)<br/>
3737
The latest OLE DB driver is a stand-alone data access application programming interface (API) that supports Microsoft SQL Server and Microsoft Azure SQL Database.

docs/parallel/concrt/reference/transformer-class.md

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: transformer Class"
32
title: "transformer Class"
3+
description: "Learn more about: transformer Class"
44
ms.date: "11/04/2016"
55
f1_keywords: ["transformer", "AGENTS/concurrency::transformer", "AGENTS/concurrency::transformer::transformer", "AGENTS/concurrency::transformer::accept_message", "AGENTS/concurrency::transformer::consume_message", "AGENTS/concurrency::transformer::link_target_notification", "AGENTS/concurrency::transformer::propagate_message", "AGENTS/concurrency::transformer::propagate_to_any_targets", "AGENTS/concurrency::transformer::release_message", "AGENTS/concurrency::transformer::reserve_message", "AGENTS/concurrency::transformer::resume_propagation", "AGENTS/concurrency::transformer::send_message", "AGENTS/concurrency::transformer::supports_anonymous_source"]
66
helpviewer_keywords: ["transformer class"]
7-
ms.assetid: eea71925-7043-4a92-bfd4-dbc0ece5d081
87
---
98
# transformer Class
109

@@ -13,17 +12,17 @@ A `transformer` messaging block is a single-target, multi-source, ordered `propa
1312
## Syntax
1413

1514
```cpp
16-
template<class _Input, class _Output>
15+
template <class _Input, class _Output>
1716
class transformer : public propagator_block<single_link_registry<ITarget<_Output>>,
1817
multi_link_registry<ISource<_Input>>>;
1918
```
2019
2120
### Parameters
2221
23-
*_Input*<br/>
22+
*`_Input`*\
2423
The payload type of the messages accepted by the buffer.
2524
26-
*_Output*<br/>
25+
*`_Output`*\
2726
The payload type of the messages stored and propagated out by the buffer.
2827
2928
## Members
@@ -32,27 +31,27 @@ The payload type of the messages stored and propagated out by the buffer.
3231
3332
|Name|Description|
3433
|----------|-----------------|
35-
|[transformer](#ctor)|Overloaded. Constructs a `transformer` messaging block.|
36-
|[~transformer Destructor](#dtor)|Destroys the `transformer` messaging block.|
34+
|[`transformer`](#ctor)|Overloaded. Constructs a `transformer` messaging block.|
35+
|[`~transformer`](#dtor)|Destroys the `transformer` messaging block.|
3736
3837
### Protected Methods
3938
4039
|Name|Description|
4140
|----------|-----------------|
42-
|[accept_message](#accept_message)|Accepts a message that was offered by this `transformer` messaging block, transferring ownership to the caller.|
43-
|[consume_message](#consume_message)|Consumes a message previously offered by the `transformer` and reserved by the target, transferring ownership to the caller.|
44-
|[link_target_notification](#link_target_notification)|A callback that notifies that a new target has been linked to this `transformer` messaging block.|
45-
|[propagate_message](#propagate_message)|Asynchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `propagate` method, when called by a source block.|
46-
|[propagate_to_any_targets](#propagate_to_any_targets)|Executes the transformer function on the input messages.|
47-
|[release_message](#release_message)|Releases a previous message reservation. (Overrides [source_block::release_message](source-block-class.md#release_message).)|
48-
|[reserve_message](#reserve_message)|Reserves a message previously offered by this `transformer` messaging block. (Overrides [source_block::reserve_message](source-block-class.md#reserve_message).)|
49-
|[resume_propagation](#resume_propagation)|Resumes propagation after a reservation has been released. (Overrides [source_block::resume_propagation](source-block-class.md#resume_propagation).)|
50-
|[send_message](#send_message)|Synchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `send` method, when called by a source block.|
51-
|[supports_anonymous_source](#supports_anonymous_source)|Overrides the `supports_anonymous_source` method to indicate that this block can accept messages offered to it by a source that is not linked. (Overrides [ITarget::supports_anonymous_source](itarget-class.md#supports_anonymous_source).)|
41+
|[`accept_message`](#accept_message)|Accepts a message that was offered by this `transformer` messaging block, transferring ownership to the caller.|
42+
|[`consume_message`](#consume_message)|Consumes a message previously offered by the `transformer` and reserved by the target, transferring ownership to the caller.|
43+
|[`link_target_notification`](#link_target_notification)|A callback that notifies that a new target has been linked to this `transformer` messaging block.|
44+
|[`propagate_message`](#propagate_message)|Asynchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `propagate` method, when called by a source block.|
45+
|[`propagate_to_any_targets`](#propagate_to_any_targets)|Executes the transformer function on the input messages.|
46+
|[`release_message`](#release_message)|Releases a previous message reservation. (Overrides [`source_block::release_message`](source-block-class.md#release_message).)|
47+
|[`reserve_message`](#reserve_message)|Reserves a message previously offered by this `transformer` messaging block. (Overrides [`source_block::reserve_message`](source-block-class.md#reserve_message).)|
48+
|[`resume_propagation`](#resume_propagation)|Resumes propagation after a reservation has been released. (Overrides [`source_block::resume_propagation`](source-block-class.md#resume_propagation).)|
49+
|[`send_message`](#send_message)|Synchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `send` method, when called by a source block.|
50+
|[`supports_anonymous_source`](#supports_anonymous_source)|Overrides the `supports_anonymous_source` method to indicate that this block can accept messages offered to it by a source that is not linked. (Overrides [`ITarget::supports_anonymous_source`](itarget-class.md#supports_anonymous_source).)|
5251
5352
## Remarks
5453
55-
For more information, see [Asynchronous Message Blocks](../../../parallel/concrt/asynchronous-message-blocks.md).
54+
For more information, see [Asynchronous Message Blocks](../asynchronous-message-blocks.md).
5655
5756
## Inheritance Hierarchy
5857
@@ -72,7 +71,7 @@ For more information, see [Asynchronous Message Blocks](../../../parallel/concrt
7271
7372
**Namespace:** concurrency
7473
75-
## <a name="accept_message"></a> accept_message
74+
## <a name="accept_message"></a> `accept_message`
7675
7776
Accepts a message that was offered by this `transformer` messaging block, transferring ownership to the caller.
7877
@@ -82,14 +81,14 @@ virtual message<_Output>* accept_message(runtime_object_identity _MsgId);
8281

8382
### Parameters
8483

85-
*_MsgId*<br/>
84+
*`_MsgId`*\
8685
The `runtime_object_identity` of the offered `message` object.
8786

8887
### Return Value
8988

9089
A pointer to the `message` object that the caller now has ownership of.
9190

92-
## <a name="consume_message"></a> consume_message
91+
## <a name="consume_message"></a> `consume_message`
9392

9493
Consumes a message previously offered by the `transformer` and reserved by the target, transferring ownership to the caller.
9594

@@ -99,7 +98,7 @@ virtual message<_Output>* consume_message(runtime_object_identity _MsgId);
9998
10099
### Parameters
101100
102-
*_MsgId*<br/>
101+
*`_MsgId`*\
103102
The `runtime_object_identity` of the `message` object being consumed.
104103
105104
### Return Value
@@ -110,15 +109,15 @@ A pointer to the `message` object that the caller now has ownership of.
110109
111110
Similar to `accept`, but is always preceded by a call to `reserve`.
112111
113-
## <a name="link_target_notification"></a> link_target_notification
112+
## <a name="link_target_notification"></a> `link_target_notification`
114113
115114
A callback that notifies that a new target has been linked to this `transformer` messaging block.
116115
117116
```cpp
118117
virtual void link_target_notification(_Inout_ ITarget<_Output> *);
119118
```
120119

121-
## <a name="propagate_message"></a> propagate_message
120+
## <a name="propagate_message"></a> `propagate_message`
122121

123122
Asynchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `propagate` method, when called by a source block.
124123

@@ -130,25 +129,25 @@ virtual message_status propagate_message(
130129
131130
### Parameters
132131
133-
*_PMessage*<br/>
132+
*`_PMessage`*\
134133
A pointer to the `message` object.
135134
136-
*_PSource*<br/>
135+
*`_PSource`*\
137136
A pointer to the source block offering the message.
138137
139138
### Return Value
140139
141140
A [message_status](concurrency-namespace-enums.md) indication of what the target decided to do with the message.
142141
143-
## <a name="propagate_to_any_targets"></a> propagate_to_any_targets
142+
## <a name="propagate_to_any_targets"></a> `propagate_to_any_targets`
144143
145144
Executes the transformer function on the input messages.
146145
147146
```cpp
148147
virtual void propagate_to_any_targets(_Inout_opt_ message<_Output> *);
149148
```
150149

151-
## <a name="release_message"></a> release_message
150+
## <a name="release_message"></a> `release_message`
152151

153152
Releases a previous message reservation.
154153

@@ -158,10 +157,10 @@ virtual void release_message(runtime_object_identity _MsgId);
158157
159158
### Parameters
160159
161-
*_MsgId*<br/>
160+
*`_MsgId`*\
162161
The `runtime_object_identity` of the `message` object being released.
163162
164-
## <a name="reserve_message"></a> reserve_message
163+
## <a name="reserve_message"></a> `reserve_message`
165164
166165
Reserves a message previously offered by this `transformer` messaging block.
167166
@@ -171,7 +170,7 @@ virtual bool reserve_message(runtime_object_identity _MsgId);
171170

172171
### Parameters
173172

174-
*_MsgId*<br/>
173+
*`_MsgId`*\
175174
The `runtime_object_identity` of the `message` object being reserved.
176175

177176
### Return Value
@@ -182,15 +181,15 @@ The `runtime_object_identity` of the `message` object being reserved.
182181

183182
After `reserve` is called, if it returns **`true`**, either `consume` or `release` must be called to either take or release ownership of the message.
184183

185-
## <a name="resume_propagation"></a> resume_propagation
184+
## <a name="resume_propagation"></a> `resume_propagation`
186185

187186
Resumes propagation after a reservation has been released.
188187

189188
```cpp
190189
virtual void resume_propagation();
191190
```
192191

193-
## <a name="send_message"></a> send_message
192+
## <a name="send_message"></a> `send_message`
194193

195194
Synchronously passes a message from an `ISource` block to this `transformer` messaging block. It is invoked by the `send` method, when called by a source block.
196195

@@ -202,17 +201,17 @@ virtual message_status send_message(
202201
203202
### Parameters
204203
205-
*_PMessage*<br/>
204+
*`_PMessage`*\
206205
A pointer to the `message` object.
207206
208-
*_PSource*<br/>
207+
*`_PSource`*\
209208
A pointer to the source block offering the message.
210209
211210
### Return Value
212211
213212
A [message_status](concurrency-namespace-enums.md) indication of what the target decided to do with the message.
214213
215-
## <a name="supports_anonymous_source"></a> supports_anonymous_source
214+
## <a name="supports_anonymous_source"></a> `supports_anonymous_source`
216215
217216
Overrides the `supports_anonymous_source` method to indicate that this block can accept messages offered to it by a source that is not linked.
218217
@@ -224,7 +223,7 @@ virtual bool supports_anonymous_source();
224223

225224
**`true`** because the block does not postpone offered messages.
226225

227-
## <a name="ctor"></a> transformer
226+
## <a name="ctor"></a> `transformer`
228227

229228
Constructs a `transformer` messaging block.
230229

@@ -263,19 +262,19 @@ transformer(
263262
264263
### Parameters
265264
266-
*_Func*<br/>
265+
*`_Func`*\
267266
A function that will be invoked for each accepted message.
268267
269-
*_PTarget*<br/>
268+
*`_PTarget`*\
270269
A pointer to a target block to link with the transformer.
271270
272-
*_Filter*<br/>
271+
*`_Filter`*\
273272
A filter function which determines whether offered messages should be accepted.
274273
275-
*_PScheduler*<br/>
274+
*`_PScheduler`*\
276275
The `Scheduler` object within which the propagation task for the `transformer` messaging block is scheduled.
277276
278-
*_PScheduleGroup*<br/>
277+
*`_PScheduleGroup`*\
279278
The `ScheduleGroup` object within which the propagation task for the `transformer` messaging block is scheduled. The `Scheduler` object used is implied by the schedule group.
280279
281280
### Remarks
@@ -286,7 +285,7 @@ The type `_Transform_method` is a functor with signature `_Output (_Input const
286285
287286
The type `filter_method` is a functor with signature `bool (_Input const &)` which is invoked by this `transformer` messaging block to determine whether or not it should accept an offered message.
288287
289-
## <a name="dtor"></a> ~transformer
288+
## <a name="dtor"></a> `~transformer`
290289
291290
Destroys the `transformer` messaging block.
292291
@@ -296,5 +295,5 @@ Destroys the `transformer` messaging block.
296295

297296
## See also
298297

299-
[concurrency Namespace](concurrency-namespace.md)<br/>
298+
[concurrency Namespace](concurrency-namespace.md)\
300299
[call Class](call-class.md)

docs/standard-library/tuple-size-class-tuple.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: tuple_size class;"
3-
title: "tuple_size class;"
2+
title: "tuple_size class"
3+
description: "Learn more about: tuple_size class"
44
ms.date: 06/29/2022
55
f1_keywords: ["tuple_size", "std::tuple_size", "utility/std::tuple_size"]
66
helpviewer_keywords: ["std::tuple_size"]
7-
ms.assetid: 73852fc5-eb68-41f1-8379-465cedc2314a
87
---
98
# `tuple_size` class
109

0 commit comments

Comments
 (0)