DEENESPTFRRUARHIKOZHNL

类 ara::diag::DiagnosticSovdArrayContentElementDataIterator

[SWS_DM_02215] Upstream: RS_Diag_04260

class DiagnosticSovdArrayContentElementDataIterator {...};

Iterator for a DiagnosticSovdArrayContentElementData.

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Forwarding-Header#include "ara/diag/diag_fwd.h"
Scopenamespace ara::diag

用户指南人工智能生成

用于在诊断内容中顺序遍历和解引用单个 SOVD 数组元素。
AI 生成 未审核 模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 326a63144281 来源 未决问题(3)
译自德文指南gemini-3.8-flash-low · 2026-10-13 · 德文原文

用于在诊断内容中顺序遍历和解引用单个 SOVD 数组元素。

类 ara::diag::DiagnosticSovdArrayContentElementDataIterator 用于在诊断内容中逐步迭代 SOVD 数组元素([SWS_DM_02215]、AUTOSAR_AP_SWS_Diagnostics §8.60.4 “Class: DiagnosticSovdArrayContentElementDataIterator”)。它提供了用于比较、通过前缀自增进行前移以及解引用的运算符,以提供指向 DiagnosticSovdContentElementData 的引用或指针([SWS_DM_02216]、[SWS_DM_02220])。所有函数均为线程安全并被指定为 noexcept,因此在解引用之前必须由应用程序确保目标区域的有效性。

上下文

类 ara::diag::DiagnosticSovdArrayContentElementDataIterator 为基于 SOVD 的诊断通信(面向服务的车辆诊断,Service-Oriented Vehicle Diagnostics)中的数组元素提供了一个专用迭代器([SWS_DM_02215]、AUTOSAR_AP_SWS_Diagnostics §8.60.4 “Class: DiagnosticSovdArrayContentElementDataIterator”)。其主要职责是提供标准化的迭代接口,以便顺序遍历数据数组的各个元素。调用方诊断应用程序以及引用的 DiagnosticSovdContentElementData 类型目标元素充当交互对象([SWS_DM_02216]、[SWS_DM_02217])。该迭代器在头文件 ara/diag/diagnostic_sovd_content_element_data.h 中声明(AUTOSAR_AP_SWS_Diagnostics §8.60.4.1 “Public Member Functions”)。

生命周期

规范并未为 ara::diag::DiagnosticSovdArrayContentElementDataIterator 定义其专有的公共构造函数;因此,实例由相应的 SOVD 容器结构通过其迭代器方法创建并提供(解读)。 问题 Q-e1fbf51ab4acc197 (未决)迭代器本身并不拥有底层有效负载数据的所有权,而仅保存对内存中相应元素的引用。因此,迭代器实例的有效性可能严格与其父数据结构的生命周期和有效性绑定(解读)。 问题 Q-c01219664b4adc56 (未决)

在生命周期和并发性方面,所有成员函数均被指定为异常安全(exception safe)和线程安全(thread-safe)([SWS_DM_02216]、[SWS_DM_02218]、[SWS_DM_02219]、[SWS_DM_02220])。这允许跨多个线程执行并发读取和前进操作,前提是底层数据结构未被并发破坏性修改。

使用路径

常规流程遵循 C++ 前向迭代器的典型模式。应用程序通过 operator!=([SWS_DM_02219])或 operator==([SWS_DM_02218]、AUTOSAR_AP_SWS_Diagnostics §8.60.4.1.1.5 “operator==”)将当前迭代器位置与尾后(End)迭代器进行比较。如果尚未到达末尾,则读取当前元素:要么通过解引用 operator*([SWS_DM_02216])返回对 DiagnosticSovdContentElementData 的引用,要么通过箭头运算符 operator->([SWS_DM_02217]、AUTOSAR_AP_SWS_Diagnostics §8.60.4.1.1.4 “operator->”)返回相应的指针。随后,应用程序使用前缀递增运算符 operator++ 将位置前进到下一个数组元素([SWS_DM_02220]、AUTOSAR_AP_SWS_Diagnostics §8.60.4.1.1.3 “operator++”)。

SOVD 数组元素的顺序迭代应用DiagnosticSovdArrayContentElementDataIteratorDiagnosticSovdContentElementDataloopSolange it != endoperator!=(endIterator)trueoperator*()指向 DiagnosticSovdContentElementData 的引用Elementdaten verarbeitenoperator++()指向自增后迭代器的引用

时序图:遍历 SOVD 数组元素的迭代循环期间的调用序列。来源:[SWS_DM_02216]、[SWS_DM_02219]、[SWS_DM_02220]。

错误场景

迭代器的所有方法均带有说明符 noexcept,且根据定义不会抛出任何异常([SWS_DM_02216]、[SWS_DM_02217]、[SWS_DM_02218]、[SWS_DM_02219]、[SWS_DM_02220])。这些接口未设计诸如 ara::core::ErrorCode 之类的错误码。正确性取决于应用程序的调用前置条件:通过 operator* 或 operator-> 进行解引用强制要求迭代器指向有效的数组元素且不能指向末尾位置;访问无效迭代器可能会导致未定义行为(解读)。 问题 Q-63d87e38f9886f6b (未决)

本类指南由 AI 策展助手基于 AUTOSAR 规范 R25-11 生成。

成员图

类图

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__diag__DiagnosticSovdArrayContentElementDataIterator554 DiagnosticSovdArrayContentElementDataIterator + operator!=() + operator*() + operator++() + operator->() + operator==()

详细视图

请在大纲中选择一个条目。

运算符

operator!= 函数

Not equal operator.

auto operator!= (DiagnosticSovdArrayContentElementDataIterator const &other) noexcept -> bool;
operator* 函数

Dereference operator.

auto operator* () noexcept -> DiagnosticSovdContentElementData &;
operator++ 函数

Increment operator.

auto operator++ () noexcept -> DiagnosticSovdArrayContentElementData Iterator &;
operator-> 函数

Dereference operator.

auto operator-> () noexcept -> DiagnosticSovdContentElementData *;
operator== 函数

Equal operator.

auto operator== (DiagnosticSovdArrayContentElementDataIterator const &other) noexcept -> bool;

方法文档

函数 operator!= [SWS_DM_02219] Upstream: RS_Diag_04260

auto operator!= (DiagnosticSovdArrayContentElementDataIterator const &other) noexcept -> bool;

Not equal operator.

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Scopeclass ara::diag::DiagnosticSovdArrayContentElementDataIterator
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
otherThe other iterator to test equality with

Rückgabewert

TypBeschreibung
boolTrue if operator are equals, false otherwise

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_02219
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02219@rel:R25-11#acf2ca49
Content hash
acf2ca49
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02219
Status: valid/unmigrated Version: rel:R25-11#6069fe65 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_02219@rel:R25-11#6069fe65
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 operator* [SWS_DM_02216] Upstream: RS_Diag_04260

auto operator* () noexcept -> DiagnosticSovdContentElementData &;

Dereference operator.

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Scopeclass ara::diag::DiagnosticSovdArrayContentElementDataIterator
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
DiagnosticSovdContentElementDataReturn a reference to the DiagnosticSovdContentElementData

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_02216
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02216@rel:R25-11#d23ebda2
Content hash
d23ebda2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02216
Status: valid/unmigrated Version: rel:R25-11#b1584ef2 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_02216@rel:R25-11#b1584ef2
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 operator++ [SWS_DM_02220] Upstream: RS_Diag_04260

auto operator++ () noexcept -> DiagnosticSovdArrayContentElementData Iterator &;

Increment operator.

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Scopeclass ara::diag::DiagnosticSovdArrayContentElementDataIterator
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
DiagnosticSovdArrayContentElementDataIteratorReference to the incremented iterator

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_02220
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02220@rel:R25-11#76526f66
Content hash
76526f66
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02220
Status: valid/unmigrated Version: rel:R25-11#c29d507b Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_02220@rel:R25-11#c29d507b
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 operator-> [SWS_DM_02217] Upstream: RS_Diag_04260

auto operator-> () noexcept -> DiagnosticSovdContentElementData *;

Dereference operator.

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Scopeclass ara::diag::DiagnosticSovdArrayContentElementDataIterator
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
DiagnosticSovdContentReturn a pointer to the DiagnosticSovdContentElementData ElementData *

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_02217
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02217@rel:R25-11#1119a5bf
Content hash
1119a5bf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02217
Status: valid/unmigrated Version: rel:R25-11#9925393e Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_02217@rel:R25-11#9925393e
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

函数 operator== [SWS_DM_02218] Upstream: RS_Diag_04260

auto operator== (DiagnosticSovdArrayContentElementDataIterator const &other) noexcept -> bool;

Equal operator.

Header-Datei#include "ara/diag/diagnostic_sovd_content_element_data.h"
Scopeclass ara::diag::DiagnosticSovdArrayContentElementDataIterator
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Parameter (in)

ParameterBeschreibung
otherThe other iterator to test equality with

Rückgabewert

TypBeschreibung
boolTrue if operator are equals, false otherwise

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_DM_02218
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_DM_02218@rel:R25-11#b24f8db2
Content hash
b24f8db2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Diagnostics.pdf#nameddest=SWS_DM_02218
Status: valid/unmigrated Version: rel:R25-11#2c54c371 Versionshistorie & Revisions (1 transition)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_DM_02218@rel:R25-11#2c54c371
Point-in-Time History:
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill