open62541pp 0.17.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
opcua::ByteString Class Reference

#include <types.hpp>

Inheritance diagram for opcua::ByteString:
[legend]

Detailed Description

UA_ByteString wrapper class.

Examples
server_accesscontrol.cpp.

Definition at line 529 of file types.hpp.

Public Member Functions

 ByteString (std::string_view str)
 
 ByteString (const char *str)
 
 ByteString (Span< const uint8_t > bytes)
 
template<typename InputIt >
 ByteString (InputIt first, InputIt last)
 
template<typename Traits >
 operator std::basic_string_view< char, Traits > () const noexcept
 
std::string toBase64 () const
 
std::string_view get () const noexcept
 
constexpr TypeWrapper () noexcept=default
 
constexpr TypeWrapper (const T &native)
 
constexpr TypeWrapper (T &&native) noexcept
 
constexpr TypeWrapper (const TypeWrapper &other)
 
constexpr TypeWrapper (TypeWrapper &&other) noexcept
 
- Public Member Functions inherited from opcua::TypeWrapper< UA_ByteString, UA_TYPES_BYTESTRING >
constexpr TypeWrapper () noexcept=default
 
constexpr TypeWrapper (const UA_ByteString &native)
 
constexpr TypeWrapper (UA_ByteString &&native) noexcept
 
constexpr TypeWrapper (const TypeWrapper &other)
 
constexpr TypeWrapper (TypeWrapper &&other) noexcept
 
 ~TypeWrapper ()
 
constexpr TypeWrapperoperator= (const TypeWrapper &other)
 
constexpr TypeWrapperoperator= (const UA_ByteString &native)
 
constexpr TypeWrapperoperator= (TypeWrapper &&other) noexcept
 
constexpr TypeWrapperoperator= (UA_ByteString &&native) noexcept
 
- Public Member Functions inherited from opcua::Wrapper< UA_ByteString >
constexpr Wrapper () noexcept=default
 
constexpr Wrapper (const UA_ByteString &native) noexcept
 
constexpr Wrapper (UA_ByteString &&native) noexcept
 
constexpr Wrapperoperator= (const UA_ByteString &native) noexcept
 
constexpr Wrapperoperator= (UA_ByteString &&native) noexcept
 
constexpr operator UA_ByteString & () noexcept
 
constexpr operator const UA_ByteString & () const noexcept
 
constexpr UA_ByteStringoperator-> () noexcept
 
constexpr const UA_ByteStringoperator-> () const noexcept
 
constexpr UA_ByteStringhandle () noexcept
 
constexpr const UA_ByteStringhandle () const noexcept
 
constexpr void swap (Wrapper &other) noexcept
 
constexpr void swap (UA_ByteString &native) noexcept
 

Static Public Member Functions

static ByteString fromBase64 (std::string_view encoded)
 
- Static Public Member Functions inherited from opcua::TypeWrapper< UA_ByteString, UA_TYPES_BYTESTRING >
static constexpr TypeIndex typeIndex ()
 

Related Symbols

(Note that these are not member symbols.)

bool operator== (const ByteString &lhs, std::string_view rhs) noexcept
 
bool operator!= (const ByteString &lhs, std::string_view rhs) noexcept
 
bool operator== (std::string_view lhs, const ByteString &rhs) noexcept
 
bool operator!= (std::string_view lhs, const ByteString &rhs) noexcept
 

Additional Inherited Members

- Public Types inherited from opcua::Wrapper< UA_ByteString >
using NativeType
 
- Protected Member Functions inherited from opcua::TypeWrapper< UA_ByteString, UA_TYPES_BYTESTRING >
constexpr void clear () noexcept
 
- Protected Member Functions inherited from opcua::Wrapper< UA_ByteString >
constexpr const UA_ByteStringnative () const noexcept
 
constexpr UA_ByteStringnative () noexcept
 

Constructor & Destructor Documentation

◆ ByteString() [1/4]

opcua::ByteString::ByteString ( std::string_view str)
inlineexplicit

Definition at line 535 of file types.hpp.

◆ ByteString() [2/4]

opcua::ByteString::ByteString ( const char * str)
inlineexplicit

Definition at line 538 of file types.hpp.

◆ ByteString() [3/4]

opcua::ByteString::ByteString ( Span< const uint8_t > bytes)
inlineexplicit

Definition at line 541 of file types.hpp.

◆ ByteString() [4/4]

template<typename InputIt >
opcua::ByteString::ByteString ( InputIt first,
InputIt last )
inline

Definition at line 546 of file types.hpp.

Member Function Documentation

◆ fromBase64()

static ByteString opcua::ByteString::fromBase64 ( std::string_view encoded)
static

Parse ByteString from Base64 encoded string.

Note
Supported since open62541 v1.1

◆ operator std::basic_string_view< char, Traits >()

template<typename Traits >
opcua::ByteString::operator std::basic_string_view< char, Traits > ( ) const
inlineexplicitnoexcept

Explicit conversion to std::string_view.

Definition at line 556 of file types.hpp.

◆ toBase64()

std::string opcua::ByteString::toBase64 ( ) const

Convert to Base64 encoded string.

Note
Supported since open62541 v1.1

◆ get()

std::string_view opcua::ByteString::get ( ) const
inlinenoexcept
Deprecated
Use conversion with static_cast instead

Definition at line 566 of file types.hpp.

◆ TypeWrapper() [1/5]

opcua::TypeWrapper< T, Index >::TypeWrapper ( )
constexprdefaultnoexcept

◆ TypeWrapper() [2/5]

opcua::TypeWrapper< T, Index >::TypeWrapper ( const T & native)
inlineexplicitconstexpr

Constructor with native object (deep copy).

Definition at line 31 of file typewrapper.hpp.

◆ TypeWrapper() [3/5]

opcua::TypeWrapper< T, Index >::TypeWrapper ( T && native)
inlineconstexprnoexcept

Constructor with native object (move rvalue).

Definition at line 35 of file typewrapper.hpp.

◆ TypeWrapper() [4/5]

opcua::TypeWrapper< T, Index >::TypeWrapper ( const TypeWrapper & other)
inlineconstexpr

Copy constructor (deep copy).

Definition at line 43 of file typewrapper.hpp.

◆ TypeWrapper() [5/5]

opcua::TypeWrapper< T, Index >::TypeWrapper ( TypeWrapper && other)
inlineconstexprnoexcept

Move constructor.

Definition at line 47 of file typewrapper.hpp.

Friends And Related Symbol Documentation

◆ operator==() [1/2]

bool operator== ( const ByteString & lhs,
std::string_view rhs )
related

Definition at line 572 of file types.hpp.

◆ operator!=() [1/2]

bool operator!= ( const ByteString & lhs,
std::string_view rhs )
related

Definition at line 577 of file types.hpp.

◆ operator==() [2/2]

bool operator== ( std::string_view lhs,
const ByteString & rhs )
related

Definition at line 582 of file types.hpp.

◆ operator!=() [2/2]

bool operator!= ( std::string_view lhs,
const ByteString & rhs )
related

Definition at line 587 of file types.hpp.