Logo
中文版
详情联系: neusar-support@reachauto.com
ReadAccessorAPI

函数

 ara::per::ReadAccessor::ReadAccessor ()=delete
 The default constructor for ReadAccessor shall not be used. 更多...
 
 ara::per::ReadAccessor::ReadAccessor (ReadAccessor &&ra)=delete
 The move constructor for ReadAccessor shall not be used. 更多...
 
ReadAccessorara::per::ReadAccessor::operator= (ReadAccessor &&ra) &=delete
 The move assignment operator for ReadAccessor shall not be used. 更多...
 
 ara::per::ReadAccessor::ReadAccessor (const ReadAccessor &)=delete
 The copy constructor for ReadAccessor shall not be used. 更多...
 
ReadAccessorara::per::ReadAccessor::operator= (const ReadAccessor &)=delete
 The copy assignment operator for ReadAccessor shall not be used. 更多...
 
 ara::per::ReadAccessor::~ReadAccessor () noexcept=default
 Destructor for ReadAccessor. 更多...
 
ara::core::Result< char > ara::per::ReadAccessor::PeekChar () noexcept
 Returns the character at the current position of the file. 更多...
 
ara::core::Result< ara::core::Byte > ara::per::ReadAccessor::PeekByte () const noexcept
 Returns the byte at the current position of the file. 更多...
 
ara::core::Result< char > ara::per::ReadAccessor::GetChar () noexcept
 Returns the character at the current position of the file, advancing the current position 更多...
 
ara::core::Result< ara::core::Byte > ara::per::ReadAccessor::GetByte () noexcept
 Returns the byte at the current position of the file, advancing the current position. 更多...
 
ara::core::Result< ara::core::String > ara::per::ReadAccessor::ReadText (uint64_t n) noexcept
 Reads a number of characters into a String, starting from the current position. 更多...
 
ara::core::Result< ara::core::String > ara::per::ReadAccessor::ReadText () noexcept
 Reads all remaining characters into a String, starting from the current position. 更多...
 
ara::core::Result< ara::core::Vector< ara::core::Byte > > ara::per::ReadAccessor::ReadBinary () noexcept
 Reads all remaining bytes into a Vector of Byte, starting from the current position. 更多...
 
ara::core::Result< ara::core::Vector< ara::core::Byte > > ara::per::ReadAccessor::ReadBinary (uint64_t n) noexcept
 Reads a number of bytes into a Vector of Byte, starting from the current position. 更多...
 
ara::core::Result< ara::core::String > ara::per::ReadAccessor::ReadLine (char delimiter='\n') noexcept
 Reads a complete line of characters into a String, advancing the current position accordingly 更多...
 
uint64_t ara::per::ReadAccessor::GetPosition () const noexcept
 Returns the current position relative to the beginning of the file. 更多...
 
ara::core::Result< void > ara::per::ReadAccessor::SetPosition (uint64_t position) noexcept
 Sets the current position relative to the beginning of the file. 更多...
 
ara::core::Result< uint64_t > ara::per::ReadAccessor::MovePosition (Origin const origin, int64_t const offset) noexcept
 Moves the current position in the file relative to the Origin. 更多...
 
bool ara::per::ReadAccessor::IsEof () const noexcept
 Checks if the current position is at end of file.。 更多...
 
uint64_t ara::per::ReadAccessor::GetSize () const noexcept
 Returns the current size of a file in bytes 更多...
 

详细描述

函数说明

◆ GetByte()

ara::core::Result< ara::core::Byte > ara::per::ReadAccessor::GetByte ( )
noexcept

Returns the byte at the current position of the file, advancing the current position.

Function Implementation

模板参数
N/A
参数
[in]N/A
[out]N/A
[in,out]N/A
返回
A Result containing a ara::core::Byte. In case of an error, it contains any of the errors defined below, or a vendor specific error.
注解
In case of an error, the current position is not changed.
异常
N/A
Swsid
SWS_PER_00419
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
PerErrc::kPhysicalStorageFailure Returned if access to the storage fails. PerErrc::kIsEof Returned if the current position is at the end of the file or if the file is empty.
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{SWS_PER_00526}

在文件 第 行定义.

◆ GetChar()

ara::core::Result< char > ara::per::ReadAccessor::GetChar ( )
noexcept

Returns the character at the current position of the file, advancing the current position

Function Implementation

模板参数
N/A
参数
[in]N/A
[out]N/A
[in,out]N/A
返回
A Result containing a char. In case of an error, it contains any of the errors defined below, or a vendor specific error.
注解
Returns the character at the current position of the file, advancing the current position In case of an error, the current position is not changed.
异常
N/A
Swsid
SWS_PER_00168
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
PerErrc::kPhysicalStorageFailure Returned if access to the storage fails. PerErrc::kIsEof Returned if the current position is at the end of the file or if the file is empty.
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{SWS_PER_00521}

在文件 第 行定义.

◆ GetPosition()

uint64_t ara::per::ReadAccessor::GetPosition ( ) const
noexcept

Returns the current position relative to the beginning of the file.

Function Implementation

模板参数
N/A
参数
[in]N/A
[out]N/A
[in,out]N/A
返回
std::uint64_t The current position in the file in bytes from the beginning of the file.
注解
Returns the current position relative to the beginning of the file.
异常
N/A
Swsid
SWS_PER_00162
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
re-entrant
Fireandforget
no
错误
N/A
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{SWS_PER_00517}

在文件 第 行定义.

◆ GetSize()

uint64_t ara::per::ReadAccessor::GetSize ( ) const
noexcept

Returns the current size of a file in bytes

Function Implementation

模板参数
N/A
参数
[in]N/A
[out]N/A
[in,out]N/A
返回
std::uint64_t The current size of the file in bytes.
注解
Returns the current size of a file in bytes
异常
N/A
Swsid
SWS_PER_00424
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
N/A
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{SWS_PER_00519, SWS_PER_CUSTOM_00008}

在文件 第 行定义.

被这些函数引用 .

这是这个函数的调用关系图:

◆ IsEof()

bool ara::per::ReadAccessor::IsEof ( ) const
noexcept

Checks if the current position is at end of file.。

Function Implementation

模板参数
N/A
参数
[in]N/A
[out]N/A
[in,out]N/A
返回
bool: if the current position is at end of file.
注解
Checks if the current position is at end of file.。
异常
N/A
Swsid
SWS_PER_00107
符合标准
Yes
非标原因
N/A
种类
function
可见
public
线程安全
re-entrant
Fireandforget
no
错误
N/A
头文件
ara/per/read_accessor_impl.h
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{SWS_PER_00518}

在文件 第 行定义.

引用了 .

函数调用图:

◆ MovePosition()

ara::core::Result< uint64_t > ara::per::ReadAccessor::MovePosition ( Origin const  origin,
int64_t const  offset 
)
noexcept

Moves the current position in the file relative to the Origin.

Function Implementation

模板参数
N/A
参数
[in]originStarting point from which to move 'offset' bytes.
[in]offsetOffset in bytes relative to 'origin'.
[out]N/A
[in,out]N/A
返回
ara::core::Result<std::uint64_t> A Result containing the new position in bytes from the beginning of the file. In case of an error, it contains any of the errors defined below, or a vendor specific error.
注解
Moves the current position in the file relative to the Origin.In case of an error, the current position is not changed.
异常
N/A
Swsid
SWS_PER_00164
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
re-entrant
Fireandforget
no
错误
PerErrc::kInvalidPosition Returned if the resulting position is lower than zero or beyond the end of the file.
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{SWS_PER_00516}

在文件 第 行定义.

◆ operator=() [1/2]

ReadAccessor& ara::per::ReadAccessor::operator= ( const ReadAccessor )
delete

The copy assignment operator for ReadAccessor shall not be used.

模板参数
N/A
参数
[in]raReadAccessor object
[out]N/A
[in,out]N/A
返回
N/A
注解
The copy assignment operator for ReadAccessor shall not be used.
异常
N/A
Swsid
SWS_PER_00416
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
N/A
头文件
异常安全
N/A
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{N/A}

◆ operator=() [2/2]

ReadAccessor& ara::per::ReadAccessor::operator= ( ReadAccessor &&  ra) &
delete

The move assignment operator for ReadAccessor shall not be used.

模板参数
N/A
参数
[in]raReadAccessor object
[out]N/A
[in,out]N/A
返回
N/A
注解
The move assignment operator for ReadAccessor shall not be used.
异常
N/A
Swsid
SWS_PER_00414
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
N/A
头文件
异常安全
N/A
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{N/A}

◆ PeekByte()

ara::core::Result< ara::core::Byte > ara::per::ReadAccessor::PeekByte ( ) const
noexcept

Returns the byte at the current position of the file.

Function Implementation

模板参数
N/A
参数
[in]N/A
[out]N/A
[in,out]N/A
返回
A Result containing a ara::core::Byte. In case of an error, it contains any of the errors defined below, or a vendor specific error.
注解
The current position is not changed.
异常
N/A
Swsid
SWS_PER_00418
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
PerErrc::kPhysicalStorageFailure Returned if access to the storage fails. PerErrc::kIsEof Returned if the current position is at the end of the file or if the file is empty.
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{SWS_PER_00525}

在文件 第 行定义.

◆ PeekChar()

ara::core::Result< char > ara::per::ReadAccessor::PeekChar ( )
noexcept

Returns the character at the current position of the file.

Function Implementation

模板参数
N/A
参数
[in]N/A
[out]N/A
[in,out]N/A
返回
A Result containing a character. In case of an error, it contains any of the errors defined below, or a vendor specific error.
注解
Returns the character at the current position of the file. The current position is not changed.
异常
N/A
Swsid
SWS_PER_00167
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
PerErrc::kPhysicalStorageFailure Returned if access to the storage fails. PerErrc::kIsEof Returned if the current position is at the end of the file or if the file is empty.
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{SWS_PER_00520}

在文件 第 行定义.

◆ ReadAccessor() [1/3]

ara::per::ReadAccessor::ReadAccessor ( )
delete

The default constructor for ReadAccessor shall not be used.

模板参数
N/A
参数
[in]N/A
[out]N/A
[in,out]N/A
返回
N/A
注解
The default constructor for ReadAccessor shall not be used.
异常
N/A
Swsid
SWS_PER_00461
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
N/A
头文件
异常安全
N/A
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{N/A}

◆ ReadAccessor() [2/3]

ara::per::ReadAccessor::ReadAccessor ( const ReadAccessor )
delete

The copy constructor for ReadAccessor shall not be used.

模板参数
N/A
参数
[in]raReadAccessor object
[out]N/A
[in,out]N/A
返回
N/A
注解
The copy constructor for ReadAccessor shall not be used.
异常
N/A
Swsid
SWS_PER_00415
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
N/A
头文件
异常安全
N/A
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{N/A}

◆ ReadAccessor() [3/3]

ara::per::ReadAccessor::ReadAccessor ( ReadAccessor &&  ra)
delete

The move constructor for ReadAccessor shall not be used.

模板参数
N/A
参数
[in]raReadAccessor object
[out]N/A
[in,out]N/A
返回
N/A
注解
The move constructor for ReadAccessor shall not be used.
异常
N/A
Swsid
SWS_PER_00413
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
N/A
头文件
异常安全
N/A
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{N/A}

◆ ReadBinary() [1/2]

ara::core::Result< ara::core::Vector< ara::core::Byte > > ara::per::ReadAccessor::ReadBinary ( )
noexcept

Reads all remaining bytes into a Vector of Byte, starting from the current position.

Function Implementation

模板参数
N/A
参数
[in]N/A
[out]N/A
[in,out]N/A
返回
ara::core::Result<ara::core::Vector<ara::core::Byte>>. A Result containing Vector of Byte. In case of an error, it contains any of the errors defined below, or a vendor specific error.
注解
The current position is set to the end of the file.In case of an error, the current position is not changed.
异常
N/A
Swsid
SWS_PER_00421
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
PerErrc::kPhysicalStorageFailure Returned if access to the storage fails. PerErrc::kIsEof Returned if the current position is at the end of the file or if the file is empty.
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{SWS_PER_00527}

在文件 第 行定义.

◆ ReadBinary() [2/2]

ara::core::Result< ara::core::Vector< ara::core::Byte > > ara::per::ReadAccessor::ReadBinary ( uint64_t  n)
noexcept

Reads a number of bytes into a Vector of Byte, starting from the current position.

Function Implementation

模板参数
N/A
参数
[in]nNumber of bytes to read.
[out]N/A
[in,out]N/A
返回
ara::core::Result<ara::core::Vector<ara::core::Byte>>. A Result containing a Vector of Byte. In case of an error, it contains any of the errors defined below, ora vendor specific error.
注解
The current position is advanced accordingly.If the end of the file is reached, the number of returned bytes can be less than the requested number, and the current position is set to the end of the file.In case of an error, the current position is not changed.
异常
N/A
Swsid
SWS_PER_00422
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
PerErrc::kPhysicalStorageFailure Returned if access to the storage fails. PerErrc::kIsEof Returned if the current position is at the end of the file or if the file is empty.
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{SWS_PER_00528}

在文件 第 行定义.

◆ ReadLine()

ara::core::Result< ara::core::String > ara::per::ReadAccessor::ReadLine ( char  delimiter = '\n')
noexcept

Reads a complete line of characters into a String, advancing the current position accordingly

Function Implementation

模板参数
N/A
参数
[in]delimThe character that is used as delimiter.
[out]N/A
[in,out]N/A
返回
ara::core::Result<ara::core::String> A Result containing a String. In case of an error, it contains any of the errors defined below, or a vendor specific error.
注解
Reads a complete line of characters into a String, advancing the current position accordingly
异常
N/A
Swsid
SWS_PER_00119
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
PerErrc::kPhysicalStorageFailure Returned if access to the storage fails. PerErrc::kIsEof Returned if the current position is at the end of the file or if the file is empty.
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{SWS_PER_00524}

在文件 第 行定义.

◆ ReadText() [1/2]

ara::core::Result< ara::core::String > ara::per::ReadAccessor::ReadText ( )
noexcept

Reads all remaining characters into a String, starting from the current position.

Function Implementation

模板参数
N/A
参数
[in]N/A
[out]N/A
[in,out]N/A
返回
A Result containing a String. In case of an error, it contains any of the errors defined below, or a vendor specific error.
注解
The current position is set to the end of the file.In case of an error, the current position is not changed.
异常
N/A
Swsid
SWS_PER_00420
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
PerErrc::kPhysicalStorageFailure Returned if access to the storage fails. PerErrc::kIsEof Returned if the current position is at the end of the file or if the file is empty.
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{SWS_PER_00523}

在文件 第 行定义.

◆ ReadText() [2/2]

ara::core::Result< ara::core::String > ara::per::ReadAccessor::ReadText ( uint64_t  n)
noexcept

Reads a number of characters into a String, starting from the current position.

Function Implementation

模板参数
N/A
参数
[in]nNumber of characters to read.
[out]N/A
[in,out]N/A
返回
A Result containing a String. In case of an error, it contains any of the errors defined below, or a vendor specific error.
注解
The current position is advanced accordingly. If the end of the file is reached, the number of returned characters can be less than the requested number, and the current position is set to the end of the file.In case of an error, the current position is not changed.
异常
N/A
Swsid
SWS_PER_00165
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
PerErrc::kPhysicalStorageFailure Returned if access to the storage fails. PerErrc::kIsEof Returned if the current position is at the end of the file or if the file is empty.
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{SWS_PER_00522}

在文件 第 行定义.

◆ SetPosition()

ara::core::Result< void > ara::per::ReadAccessor::SetPosition ( uint64_t  position)
noexcept

Sets the current position relative to the beginning of the file.

Function Implementation

模板参数
N/A
参数
[in]positionCurrent position in the file in bytes from the beginning of the file.
[out]N/A
[in,out]N/A
返回
ara::core::Result<void> A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.
注解
Sets the current position relative to the beginning of the file.In case of an error, the current position is not changed.
异常
N/A
Swsid
SWS_PER_00163
符合标准
Yes
非标原因
N/A
种类
function
可见
public
线程安全
re-entrant
Fireandforget
no
错误
PerErrc::kInvalidPosition Returned if the resulting position is lower than zero or beyond the end of the file.
头文件
异常安全
noexcept
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{SWS_PER_00515}

在文件 第 行定义.

◆ ~ReadAccessor()

ara::per::ReadAccessor::~ReadAccessor ( )
defaultnoexcept

Destructor for ReadAccessor.

模板参数
N/A
参数
[in]N/A
[out]N/A
[in,out]N/A
返回
N/A
注解
Destructor for ReadAccessor.
异常
N/A
Swsid
SWS_PER_00417
符合标准
yes
非标原因
N/A
种类
function
可见
public
线程安全
no
Fireandforget
no
错误
N/A
头文件
异常安全
N/A
分类
ara
范围
namespace ara::per::ReadAccessor @uptrace{N/A}