类 ara::per::SharedHandle
[SWS_PER_00362] Upstream: RS_PER_00002 , RS_AP_00122 , RS_AP_00140
template <typename T> class SharedHandle final {...};
Handle to a File Storage or Key-Value Storage. A SharedHandle is returned by the functions OpenFileStorage() and OpenKeyValueStorage() and can be passed between threads as needed. It provides the abstraction that is necessary to allow thread-safe implementation of OpenFile Storage() and OpenKeyValueStorage().
Header-Datei #include "ara/per/shared_handle.h" Forwarding-Header #include "ara/per/per_fwd.h" Scope namespace ara::per
用户指南人工智能生成 实现跨线程边界对文件存储与键值存储的线程安全访问。
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 7420a4e54761
来源
未决问题(1)
摘要 详细
实现跨线程边界对文件存储与键值存储的线程安全访问。
模板类 ara::per::SharedHandle 用作文件存储和键值存储的智能指针抽象,以实现跨线程边界的线程安全访问。在通过工厂函数获取后,必须通过 operator bool() [SWS_PER_00398] 检查句柄的有效性状态,因为在空句柄或因移动操作而失效的句柄上调用其他运算符会导致未定义行为。虽然对所封装对象的解引用是线程安全的,但在同一实例上的赋值与句柄销毁 [SWS_PER_00568] 则需要外部同步。
更多 ›
本指南基于针对模块 per(Adaptive Platform,Release R25-11)的 AUTOSAR 规范,由 AI 策展助手生成。
分组依据 类别 历史
成员图 类图 Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.
G
nara__per__SharedHandle980
SharedHandle
+ SharedHandle()
+ operator=()
+ ~SharedHandle()
+ operatorbool()
+ operator*()
+ operator->()
详细视图 此版本没有元素数据
构造函数和析构函数 Move constructor for SharedHandle. The source handle object is invalidated and cannot be used anymore. The operator bool() shall be used to check the state of a handle object before using any other operators of the handle object.
重载 SharedHandle 2 Destructor for SharedHandle.
运算符 Non-constant dereference operator.
重载 * 2 Non-constant arrow operator.
重载 -> 2 Move assignment operator for SharedHandle. The source handle object is invalidated and cannot be used anymore. The operator bool() shall be used to check the state of a handle object before using any other operators of the handle object.
重载 = 2 Handle state. True if the handle represents a valid object of the templated class, False if the handle is empty (e.g. after a move operation). Using other operators than bool() of an empty handle will result in undefined behavior.
explicit operator bool () const noexcept;
点击条目以查看其关系。
基类 派生类 使用 被使用于 继承 自此版本起移除 用于 此类中无关联 函数 AI 评注 打开类页面 无法加载类页面。 调整顺序 调整宽度 调整大纲宽度 章节 阅读时间 SWS 引用 图表 放回中间 调整顺序或拖到标题栏 取消停靠 – 在内容中显示 移到中间栏 作为标签停靠到标题栏 元素 AI 模型 打开审计档案 档案 打开简短版本 打开中等版本 打开完整版本 恢复默认视图 已恢复默认视图 撤销 关闭详细视图 签名 基本信息 值 截至所选版本的最后一次更改 之后的下一次更改 单击:选择版本 无法放在此处:拖到标题栏可停靠,拖到中间栏可取消停靠。 新增 已更改 未更改 已移除 未包含 更改 内容无变化 首次出现于 移除于 没有可用的版本数据。 正在加载版本数据 … 文本 此版本未收录措辞 悬停或单击单元格:与所选版本比较 · 单击版本标题:选择版本 选择版本 属性 版本 元素 只有一个版本有措辞 PDF 中存在,原文尚未导入 首次采集原文 自 {rel} 起未更改 版本颜色 最早版本 最新版本
方法文档
SharedHandle (SharedHandle &&sh) noexcept;
Move constructor for SharedHandle. The source handle object is invalidated and cannot be used anymore. The operator bool() shall be used to check the state of a handle object before using any other operators of the handle object.
Header-Datei #include "ara/per/shared_handle.h" Scope class ara::per::SharedHandle Exception-Sicherheit exception safe
Parameter (in)
Parameter Beschreibung sh The SharedHandle object to be moved.
Status: valid/unmigrated
Version: rel:R25-11#baf6a972
Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00367@rel:R25-11#baf6a972
Point-in-Time History:
Release:
R25-11 (Current / Active) R19-11 R20-11 R21-11 R22-11 R23-11 R24-11
View Snapshot
Recorded Revisions (8):
R25-11 rel:R25-11#c6b5785d2026-09-30 Inspect R19-11 rel:R19-11#61682ff62026-10-14 Inspect R20-11 rel:R20-11#feee1b5f2026-10-14 Inspect R21-11 rel:R21-11#a723d9eb2026-10-14 Inspect R22-11 rel:R22-11#a01e63662026-10-14 Inspect R23-11 rel:R23-11#c6715fc12026-10-14 Inspect R24-11 rel:R24-11#11aacf592026-10-14 Inspect R25-11 rel:R25-11#baf6a9722026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
SharedHandle (const SharedHandle &sh) noexcept;
Copy constructor for SharedHandle.
Header-Datei #include "ara/per/shared_handle.h" Scope class ara::per::SharedHandle Exception-Sicherheit exception safe
Parameter (in)
Parameter Beschreibung sh The SharedHandle object to be copied.
Status: valid/unmigrated
Version: rel:R25-11#2fc92783
Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00369@rel:R25-11#2fc92783
Point-in-Time History:
Release:
R25-11 (Current / Active) R19-11 R20-11 R21-11 R22-11 R23-11 R24-11
View Snapshot
Recorded Revisions (8):
R25-11 rel:R25-11#b3eb49e52026-09-30 Inspect R19-11 rel:R19-11#e9a54ca92026-10-14 Inspect R20-11 rel:R20-11#42ab36a92026-10-14 Inspect R21-11 rel:R21-11#42ab36a92026-10-14 Inspect R22-11 rel:R22-11#17047f412026-10-14 Inspect R23-11 rel:R23-11#5c3ad8ec2026-10-14 Inspect R24-11 rel:R24-11#1d1eaeab2026-10-14 Inspect R25-11 rel:R25-11#2fc927832026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
T & operator* () noexcept;
Non-constant dereference operator.
Header-Datei #include "ara/per/shared_handle.h" Scope class ara::per::SharedHandle Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Rückgabewert
Typ Beschreibung T& A reference to the SharedHandle object.
Status: valid/unmigrated
Version: rel:R25-11#57896558
Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00402@rel:R25-11#57896558
Point-in-Time History:
Release:
R25-11 (Current / Active) R19-11 R20-11 R21-11 R22-11 R23-11 R24-11
View Snapshot
Recorded Revisions (8):
R25-11 rel:R25-11#0230eb7e2026-09-30 Inspect R19-11 rel:R19-11#c44f13ab2026-10-14 Inspect R20-11 rel:R20-11#a17d07312026-10-14 Inspect R21-11 rel:R21-11#a17d07312026-10-14 Inspect R22-11 rel:R22-11#8ce1201b2026-10-14 Inspect R23-11 rel:R23-11#7b133f712026-10-14 Inspect R24-11 rel:R24-11#578965582026-10-14 Inspect R25-11 rel:R25-11#578965582026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
const T & operator* () const noexcept;
Constant dereference operator.
Header-Datei #include "ara/per/shared_handle.h" Scope class ara::per::SharedHandle Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Rückgabewert
Typ Beschreibung const T & A constant reference to the SharedHandle object.
Status: valid/unmigrated
Version: rel:R25-11#78070564
Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00403@rel:R25-11#78070564
Point-in-Time History:
Release:
R25-11 (Current / Active) R19-11 R20-11 R21-11 R22-11 R23-11 R24-11
View Snapshot
Recorded Revisions (8):
R25-11 rel:R25-11#9b7262392026-09-30 Inspect R19-11 rel:R19-11#6d2f89fd2026-10-14 Inspect R20-11 rel:R20-11#5ba93d692026-10-14 Inspect R21-11 rel:R21-11#340cf29e2026-10-14 Inspect R22-11 rel:R22-11#d61050d72026-10-14 Inspect R23-11 rel:R23-11#fa9449332026-10-14 Inspect R24-11 rel:R24-11#780705642026-10-14 Inspect R25-11 rel:R25-11#780705642026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
T * operator-> () noexcept;
Non-constant arrow operator.
Header-Datei #include "ara/per/shared_handle.h" Scope class ara::per::SharedHandle Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Rückgabewert
Typ Beschreibung T* A pointer to the SharedHandle object.
Status: valid/unmigrated
Version: rel:R25-11#c0487fc0
Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00363@rel:R25-11#c0487fc0
Point-in-Time History:
Release:
R25-11 (Current / Active) R19-11 R20-11 R21-11 R22-11 R23-11 R24-11
View Snapshot
Recorded Revisions (8):
R25-11 rel:R25-11#e0d8ebf82026-09-30 Inspect R19-11 rel:R19-11#1b3905802026-10-14 Inspect R20-11 rel:R20-11#c2e557d82026-10-14 Inspect R21-11 rel:R21-11#296dba682026-10-14 Inspect R22-11 rel:R22-11#04f451bb2026-10-14 Inspect R23-11 rel:R23-11#0ae983872026-10-14 Inspect R24-11 rel:R24-11#c0487fc02026-10-14 Inspect R25-11 rel:R25-11#c0487fc02026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
const T * operator-> () const noexcept;
Header-Datei #include "ara/per/shared_handle.h" Scope class ara::per::SharedHandle Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Rückgabewert
Typ Beschreibung const T * A constant pointer to the SharedHandle object.
Status: valid/unmigrated
Version: rel:R25-11#d9c790a2
Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00364@rel:R25-11#d9c790a2
Point-in-Time History:
Release:
R25-11 (Current / Active) R19-11 R20-11 R21-11 R22-11 R23-11 R24-11
View Snapshot
Recorded Revisions (8):
R25-11 rel:R25-11#478012352026-09-30 Inspect R19-11 rel:R19-11#9cb165252026-10-14 Inspect R20-11 rel:R20-11#28a967bb2026-10-14 Inspect R21-11 rel:R21-11#3b6443842026-10-14 Inspect R22-11 rel:R22-11#d63d40332026-10-14 Inspect R23-11 rel:R23-11#d4e20ee62026-10-14 Inspect R24-11 rel:R24-11#d9c790a22026-10-14 Inspect R25-11 rel:R25-11#d9c790a22026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
SharedHandle & operator= (SharedHandle &&sh) & noexcept;
Move assignment operator for SharedHandle. The source handle object is invalidated and cannot be used anymore. The operator bool() shall be used to check the state of a handle object before using any other operators of the handle object.
Header-Datei #include "ara/per/shared_handle.h" Scope class ara::per::SharedHandle Exception-Sicherheit exception safe Thread-Sicherheit not thread-safe
Parameter (in)
Parameter Beschreibung sh The SharedHandle object to be moved.
Rückgabewert
Status: valid/unmigrated
Version: rel:R25-11#7d51c2da
Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00368@rel:R25-11#7d51c2da
Point-in-Time History:
Release:
R25-11 (Current / Active) R19-11 R20-11 R21-11 R22-11 R23-11 R24-11
View Snapshot
Recorded Revisions (8):
R25-11 rel:R25-11#531ab7712026-09-30 Inspect R19-11 rel:R19-11#c02471c72026-10-14 Inspect R20-11 rel:R20-11#05a98b6e2026-10-14 Inspect R21-11 rel:R21-11#05a98b6e2026-10-14 Inspect R22-11 rel:R22-11#245042672026-10-14 Inspect R23-11 rel:R23-11#722c19a12026-10-14 Inspect R24-11 rel:R24-11#7d51c2da2026-10-14 Inspect R25-11 rel:R25-11#7d51c2da2026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
SharedHandle & operator= (const SharedHandle &sh) & noexcept;
Copy assignment operator for SharedHandle.
Header-Datei #include "ara/per/shared_handle.h" Scope class ara::per::SharedHandle Exception-Sicherheit exception safe Thread-Sicherheit not thread-safe
Parameter (in)
Parameter Beschreibung sh The SharedHandle object to be copied.
Rückgabewert
Typ Beschreibung SharedHandle &The copied SharedHandle object.
Status: valid/unmigrated
Version: rel:R25-11#43114280
Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00370@rel:R25-11#43114280
Point-in-Time History:
Release:
R25-11 (Current / Active) R19-11 R20-11 R21-11 R22-11 R23-11 R24-11
View Snapshot
Recorded Revisions (8):
R25-11 rel:R25-11#bfd2507a2026-09-30 Inspect R19-11 rel:R19-11#4b0f581b2026-10-14 Inspect R20-11 rel:R20-11#5a5c5fd62026-10-14 Inspect R21-11 rel:R21-11#4e8059bf2026-10-14 Inspect R22-11 rel:R22-11#0381e9832026-10-14 Inspect R23-11 rel:R23-11#16530bc42026-10-14 Inspect R24-11 rel:R24-11#431142802026-10-14 Inspect R25-11 rel:R25-11#431142802026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
explicit operator bool () const noexcept;
Handle state. True if the handle represents a valid object of the templated class, False if the handle is empty (e.g. after a move operation). Using other operators than bool() of an empty handle will result in undefined behavior.
Header-Datei #include "ara/per/shared_handle.h" Scope class ara::per::SharedHandle Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Rückgabewert
Typ Beschreibung bool False if the handle is empty, otherwise true.
Status: valid/unmigrated
Version: rel:R25-11#74aa499c
Versionshistorie & Revisions (1 transition, 8 revision)
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_PER_00398@rel:R25-11#74aa499c
Point-in-Time History:
Release:
R25-11 (Current / Active) R19-11 R20-11 R21-11 R22-11 R23-11 R24-11
View Snapshot
Recorded Revisions (8):
R25-11 rel:R25-11#4bc08a422026-09-30 Inspect R19-11 rel:R19-11#9f6113032026-10-14 Inspect R20-11 rel:R20-11#a52f48632026-10-14 Inspect R21-11 rel:R21-11#a52f48632026-10-14 Inspect R22-11 rel:R22-11#b6a326f62026-10-14 Inspect R23-11 rel:R23-11#c602d61d2026-10-14 Inspect R24-11 rel:R24-11#74aa499c2026-10-14 Inspect R25-11 rel:R25-11#74aa499c2026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
~SharedHandle () noexcept;
Destructor for SharedHandle.
Header-Datei #include "ara/per/shared_handle.h" Scope class ara::per::SharedHandle Exception-Sicherheit exception safe Thread-Sicherheit not thread-safe
Status: valid/unmigrated
Version: rel:R25-11#0b0e9470
Versionshistorie & Revisions (1 transition, 4 revision)
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_PER_00568@rel:R25-11#0b0e9470
Point-in-Time History:
Release:
R25-11 (Current / Active) R23-11 R24-11 R20-11 R19-11
View Snapshot
Recorded Revisions (4):
R25-11 rel:R25-11#7153aa7a2026-09-30 Inspect R23-11 rel:R23-11#3a952a352026-10-14 Inspect R24-11 rel:R24-11#0b0e94702026-10-14 Inspect R25-11 rel:R25-11#0b0e94702026-10-14 active Inspect
Historical Snapshot:
× Back to current
🚫
Requirement entfallen: Dieses Element ist im gewählten Release nicht mehr enthalten.
Requirement Text as-of this release:
Reachable Artifacts & Dependents:
Date Actor Transition Reason / Rationale Campaign
2026-08-13 tool none → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record 2026-08-13-status-backfill
gemini-3.8-flash-low· 2026-10-13 · 德文原文