类 ara::per::UniqueHandle
[SWS_PER_00359] Upstream: RS_PER_00002 , RS_AP_00122 , RS_AP_00140
template <typename T> class UniqueHandle final {...};
Handle to a ReadAccessor or ReadWriteAccessor. A UniqueHandle is returned by the functions OpenFileReadOnly(), OpenFileWriteOnly(), and OpenFileReadWrite().
Header-Datei #include "ara/per/unique_handle.h" Forwarding-Header #include "ara/per/per_fwd.h" Scope namespace ara::per
用户指南人工智能生成 管理具有 RAII 语义的文件访问器对象的独占式、可移动访问。
AI 生成
未审核
模型: gemini-3.8-flash-medium · 推理强度: medium · 温度: 不可控 · 提示词: 7be811cdf7d8
来源
未决问题(1)
摘要 详细
管理具有 RAII 语义的文件访问器对象的独占式、可移动访问。
类模板 ara::per::UniqueHandle 在严格的仅移动语义框架下管理 AUTOSAR 持久性文件访问器对象的独占所有权。在通过文件访问函数获取后,实例在任何使用前必须强制通过 operator bool() 检查有效性 [SWS_PER_00371] 。在空句柄或已转移句柄上调用其他运算符会导致未定义行为 [SWS_PER_00399] 。所有操作均声明为 noexcept,其中读取访问是线程安全的,而修改操作则不是。
更多 ›
本指南由 AI 基于 AUTOSAR 规范 R25-11 生成。
分组依据 类别 历史
成员图 类图 Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.
G
nara__per__UniqueHandle733
UniqueHandle
+ UniqueHandle()
+ operator=()
+ ~UniqueHandle()
+ operatorbool()
+ operator*()
+ operator->()
详细视图 此版本没有元素数据
构造函数和析构函数 Move constructor for UniqueHandle. 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.
重载 UniqueHandle 2 Destructor for UniqueHandle.
运算符 Non-constant dereference operator.
重载 * 2 Non-constant arrow operator.
重载 -> 2 Move assignment operator for UniqueHandle. 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} 起未更改 版本颜色 最早版本 最新版本
方法文档
UniqueHandle (UniqueHandle &&uh) noexcept;
Move constructor for UniqueHandle. 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/unique_handle.h" Scope class ara::per::UniqueHandle Exception-Sicherheit exception safe
Parameter (in)
Parameter Beschreibung uh The UniqueHandle object to be moved.
Status: valid/unmigrated
Version: rel:R25-11#b7a796ed
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_00371@rel:R25-11#b7a796ed
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#2472caed2026-09-30 Inspect R19-11 rel:R19-11#5b28d9822026-10-14 Inspect R20-11 rel:R20-11#6556de6a2026-10-14 Inspect R21-11 rel:R21-11#4fd62e1b2026-10-14 Inspect R22-11 rel:R22-11#638b49b92026-10-14 Inspect R23-11 rel:R23-11#4afea7132026-10-14 Inspect R24-11 rel:R24-11#15ae42ea2026-10-14 Inspect R25-11 rel:R25-11#b7a796ed2026-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
UniqueHandle (const UniqueHandle &)=delete;
The copy constructor for UniqueHandle shall not be used.
Status: valid/unmigrated
Version: rel:R25-11#97a13cb3
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_00373@rel:R25-11#97a13cb3
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#22b7f4472026-09-30 Inspect R19-11 rel:R19-11#5ad725022026-10-14 Inspect R20-11 rel:R20-11#30834d982026-10-14 Inspect R21-11 rel:R21-11#30834d982026-10-14 Inspect R22-11 rel:R22-11#5a84219f2026-10-14 Inspect R23-11 rel:R23-11#4fff0fda2026-10-14 Inspect R24-11 rel:R24-11#97a13cb32026-10-14 Inspect R25-11 rel:R25-11#97a13cb32026-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/unique_handle.h" Scope class ara::per::UniqueHandle Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Rückgabewert
Typ Beschreibung T& A reference to the UniqueHandle object.
Status: valid/unmigrated
Version: rel:R25-11#03e17b34
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_00400@rel:R25-11#03e17b34
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#3c202d012026-09-30 Inspect R19-11 rel:R19-11#669b25ad2026-10-14 Inspect R20-11 rel:R20-11#221dd15a2026-10-14 Inspect R21-11 rel:R21-11#94a9e6752026-10-14 Inspect R22-11 rel:R22-11#59befd852026-10-14 Inspect R23-11 rel:R23-11#cc5fb2d62026-10-14 Inspect R24-11 rel:R24-11#03e17b342026-10-14 Inspect R25-11 rel:R25-11#03e17b342026-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/unique_handle.h" Scope class ara::per::UniqueHandle Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Rückgabewert
Typ Beschreibung const T & A constant reference to the UniqueHandle object.
Status: valid/unmigrated
Version: rel:R25-11#55c3ace7
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_00401@rel:R25-11#55c3ace7
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#a493a1ed2026-09-30 Inspect R19-11 rel:R19-11#38e407492026-10-14 Inspect R20-11 rel:R20-11#8d59685c2026-10-14 Inspect R21-11 rel:R21-11#32e0990d2026-10-14 Inspect R22-11 rel:R22-11#96bb511e2026-10-14 Inspect R23-11 rel:R23-11#6bb24b062026-10-14 Inspect R24-11 rel:R24-11#55c3ace72026-10-14 Inspect R25-11 rel:R25-11#55c3ace72026-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/unique_handle.h" Scope class ara::per::UniqueHandle Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Rückgabewert
Typ Beschreibung T* A pointer to the UniqueHandle object.
Status: valid/unmigrated
Version: rel:R25-11#ef2a1027
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_00360@rel:R25-11#ef2a1027
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#98df28e32026-09-30 Inspect R19-11 rel:R19-11#f4d0effe2026-10-14 Inspect R20-11 rel:R20-11#c27e978c2026-10-14 Inspect R21-11 rel:R21-11#ab8f7d8e2026-10-14 Inspect R22-11 rel:R22-11#c187af442026-10-14 Inspect R23-11 rel:R23-11#24381aca2026-10-14 Inspect R24-11 rel:R24-11#ef2a10272026-10-14 Inspect R25-11 rel:R25-11#ef2a10272026-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/unique_handle.h" Scope class ara::per::UniqueHandle Exception-Sicherheit exception safe Thread-Sicherheit thread-safe
Rückgabewert
Typ Beschreibung const T * A constant pointer to the UniqueHandle object.
Status: valid/unmigrated
Version: rel:R25-11#bfbbb900
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_00361@rel:R25-11#bfbbb900
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#db461d5a2026-09-30 Inspect R19-11 rel:R19-11#898a6e702026-10-14 Inspect R20-11 rel:R20-11#5cd9c3f32026-10-14 Inspect R21-11 rel:R21-11#5cd9c3f32026-10-14 Inspect R22-11 rel:R22-11#aef959232026-10-14 Inspect R23-11 rel:R23-11#39c079282026-10-14 Inspect R24-11 rel:R24-11#bfbbb9002026-10-14 Inspect R25-11 rel:R25-11#bfbbb9002026-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
UniqueHandle & operator= (UniqueHandle &&uh) & noexcept;
Move assignment operator for UniqueHandle. 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/unique_handle.h" Scope class ara::per::UniqueHandle Exception-Sicherheit exception safe Thread-Sicherheit not thread-safe
Parameter (in)
Parameter Beschreibung uh The UniqueHandle object to be moved.
Rückgabewert
Status: valid/unmigrated
Version: rel:R25-11#fa5f6ac4
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_00372@rel:R25-11#fa5f6ac4
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#414bd1522026-09-30 Inspect R19-11 rel:R19-11#bc1017fc2026-10-14 Inspect R20-11 rel:R20-11#b45b4d662026-10-14 Inspect R21-11 rel:R21-11#b45b4d662026-10-14 Inspect R22-11 rel:R22-11#eaac664b2026-10-14 Inspect R23-11 rel:R23-11#a9b2fe9d2026-10-14 Inspect R24-11 rel:R24-11#fa5f6ac42026-10-14 Inspect R25-11 rel:R25-11#fa5f6ac42026-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
UniqueHandle & operator= (const UniqueHandle &)=delete;
The copy assignment operator for UniqueHandle shall not be used.
Status: valid/unmigrated
Version: rel:R25-11#473a1718
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_00374@rel:R25-11#473a1718
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#24ed94c02026-09-30 Inspect R19-11 rel:R19-11#7eb83f182026-10-14 Inspect R20-11 rel:R20-11#3556e4cd2026-10-14 Inspect R21-11 rel:R21-11#728358a52026-10-14 Inspect R22-11 rel:R22-11#503812912026-10-14 Inspect R23-11 rel:R23-11#fb958c822026-10-14 Inspect R24-11 rel:R24-11#f5750b432026-10-14 Inspect R25-11 rel:R25-11#473a17182026-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/unique_handle.h" Scope class ara::per::UniqueHandle 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#8ef94211
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_00399@rel:R25-11#8ef94211
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#f0c1c0c02026-09-30 Inspect R19-11 rel:R19-11#8839778e2026-10-14 Inspect R20-11 rel:R20-11#312f50912026-10-14 Inspect R21-11 rel:R21-11#dc10458b2026-10-14 Inspect R22-11 rel:R22-11#aba123462026-10-14 Inspect R23-11 rel:R23-11#dccc30862026-10-14 Inspect R24-11 rel:R24-11#979f05a72026-10-14 Inspect R25-11 rel:R25-11#8ef942112026-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
~UniqueHandle () noexcept;
Destructor for UniqueHandle.
Header-Datei #include "ara/per/unique_handle.h" Scope class ara::per::UniqueHandle Exception-Sicherheit exception safe Thread-Sicherheit not thread-safe
Status: valid/unmigrated
Version: rel:R25-11#185fb928
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_00569@rel:R25-11#185fb928
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#e4cc15fc2026-09-30 Inspect R23-11 rel:R23-11#1d1adf602026-10-14 Inspect R24-11 rel:R24-11#185fb9282026-10-14 Inspect R25-11 rel:R25-11#185fb9282026-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 · 德文原文