open62541pp 0.18.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
Public Member Functions | Related Symbols | List of all members
opcua::String Class Reference

#include <types.hpp>

Inheritance diagram for opcua::String:
[legend]

Detailed Description

UA_String wrapper class.

Examples
custom_datatypes/client_custom_datatypes.cpp, custom_datatypes/custom_datatypes.hpp, custom_datatypes/server_custom_datatypes.cpp, events/server_events.cpp, method/client_method.cpp, method/client_method_async.cpp, and method/server_method.cpp.

Definition at line 255 of file types.hpp.

Public Member Functions

 String (std::string_view str)
 
template<typename InputIt >
 String (InputIt first, InputIt last)
 
 String (std::initializer_list< char > values)
 
Stringoperator= (const char *str)
 
template<typename Traits >
Stringoperator= (std::basic_string_view< char, Traits > str)
 
template<typename Traits >
 operator std::basic_string_view< char, Traits > () const noexcept
 
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_String, UA_TYPES_STRING >
constexpr TypeWrapper () noexcept=default
 
constexpr TypeWrapper (const UA_String &native)
 
constexpr TypeWrapper (UA_String &&native) noexcept
 
constexpr TypeWrapper (const TypeWrapper &other)
 
constexpr TypeWrapper (TypeWrapper &&other) noexcept
 
 ~TypeWrapper ()
 
constexpr TypeWrapperoperator= (const TypeWrapper &other)
 
constexpr TypeWrapperoperator= (const UA_String &native)
 
constexpr TypeWrapperoperator= (TypeWrapper &&other) noexcept
 
constexpr TypeWrapperoperator= (UA_String &&native) noexcept
 
- Public Member Functions inherited from opcua::Wrapper< T >
constexpr Wrapper () noexcept=default
 
constexpr Wrapper (const T &native) noexcept
 
constexpr Wrapper (T &&native) noexcept
 
constexpr Wrapperoperator= (const T &native) noexcept
 
constexpr Wrapperoperator= (T &&native) noexcept
 
constexpr operator T& () noexcept
 
constexpr operator const T & () const noexcept
 
constexpr T * operator-> () noexcept
 
constexpr const T * operator-> () const noexcept
 
constexpr T * handle () noexcept
 
constexpr const T * handle () const noexcept
 
constexpr void swap (Wrapper &other) noexcept
 
constexpr void swap (T &native) noexcept
 

Related Symbols

(Note that these are not member symbols.)

bool operator== (const UA_String &lhs, const UA_String &rhs) noexcept
 
bool operator!= (const UA_String &lhs, const UA_String &rhs) noexcept
 
bool operator== (const String &lhs, const String &rhs) noexcept
 
bool operator!= (const String &lhs, const String &rhs) noexcept
 
bool operator== (const String &lhs, std::string_view rhs) noexcept
 
bool operator!= (const String &lhs, std::string_view rhs) noexcept
 
bool operator== (std::string_view lhs, const String &rhs) noexcept
 
bool operator!= (std::string_view lhs, const String &rhs) noexcept
 
std::ostream & operator<< (std::ostream &os, const String &str)
 

Additional Inherited Members

- Public Types inherited from opcua::Wrapper< T >
using NativeType = T
 
- Static Public Member Functions inherited from opcua::TypeWrapper< UA_String, UA_TYPES_STRING >
static constexpr TypeIndex typeIndex ()
 
- Protected Member Functions inherited from opcua::TypeWrapper< UA_String, UA_TYPES_STRING >
constexpr void clear () noexcept
 
- Protected Member Functions inherited from opcua::Wrapper< T >
constexpr const T & native () const noexcept
 
constexpr T & native () noexcept
 

Constructor & Destructor Documentation

◆ String() [1/3]

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

Definition at line 261 of file types.hpp.

◆ String() [2/3]

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

Definition at line 265 of file types.hpp.

◆ String() [3/3]

opcua::String::String ( std::initializer_list< char >  values)
inline

Definition at line 269 of file types.hpp.

Member Function Documentation

◆ operator=() [1/2]

String & opcua::String::operator= ( const char *  str)
inline

Assign null-termined character string.

Definition at line 274 of file types.hpp.

◆ operator=() [2/2]

template<typename Traits >
String & opcua::String::operator= ( std::basic_string_view< char, Traits >  str)
inline

Assign std::string_view.

Definition at line 281 of file types.hpp.

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

template<typename Traits >
opcua::String::operator std::basic_string_view< char, Traits > ( ) const
inlinenoexcept

Implicit conversion to std::string_view.

Definition at line 288 of file types.hpp.

◆ get()

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

Definition at line 294 of file types.hpp.

◆ TypeWrapper() [1/5]

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

◆ TypeWrapper() [2/5]

constexpr 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]

constexpr 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]

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

Copy constructor (deep copy).

Definition at line 43 of file typewrapper.hpp.

◆ TypeWrapper() [5/5]

constexpr 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/4]

bool operator== ( const UA_String lhs,
const UA_String rhs 
)
related

Definition at line 300 of file types.hpp.

◆ operator!=() [1/4]

bool operator!= ( const UA_String lhs,
const UA_String rhs 
)
related

Definition at line 305 of file types.hpp.

◆ operator==() [2/4]

bool operator== ( const String lhs,
const String rhs 
)
related

Definition at line 310 of file types.hpp.

◆ operator!=() [2/4]

bool operator!= ( const String lhs,
const String rhs 
)
related

Definition at line 315 of file types.hpp.

◆ operator==() [3/4]

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

Definition at line 320 of file types.hpp.

◆ operator!=() [3/4]

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

Definition at line 325 of file types.hpp.

◆ operator==() [4/4]

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

Definition at line 330 of file types.hpp.

◆ operator!=() [4/4]

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

Definition at line 335 of file types.hpp.

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const String str 
)
related