open62541pp 0.16.0
C++ wrapper of open62541
|
#include <span.hpp>
View to a contiguous sequence of objects, similar to std::span
in C++20.
Spans are used to pass and return open62541 arrays without copy and to use them with the standard library algorithms. The view just holds two members: the pointer to T
and the size, so it's lightweight and trivially copyable.
T | Type of the array object, use const T for an immutable view |
Public Types | |
using | element_type = T |
using | value_type = std::remove_cv_t<T> |
using | size_type = size_t |
using | difference_type = std::ptrdiff_t |
using | pointer = T* |
using | const_pointer = const T* |
using | reference = T& |
using | const_reference = const T& |
using | iterator = pointer |
using | const_iterator = const_pointer |
using | reverse_iterator = std::reverse_iterator<iterator> |
using | const_reverse_iterator = std::reverse_iterator<const_iterator> |
Public Member Functions | |
constexpr | Span () noexcept=default |
constexpr | Span (T *data, size_t size) noexcept |
template<typename Container , typename = EnableIfHasSizeAndData<Container>> | |
constexpr | Span (Container &container) noexcept |
template<typename Container , typename = EnableIfHasSizeAndData<Container>> | |
constexpr | Span (const Container &container) noexcept |
constexpr | Span (std::initializer_list< value_type > values) noexcept |
constexpr void | swap (Span &other) noexcept |
constexpr size_t | size () const noexcept |
constexpr bool | empty () const noexcept |
constexpr pointer | data () const noexcept |
constexpr reference | operator[] (size_t index) const noexcept |
constexpr reference | front () const noexcept |
constexpr reference | back () const noexcept |
constexpr iterator | begin () const noexcept |
constexpr iterator | end () const noexcept |
constexpr const_iterator | cbegin () const noexcept |
constexpr const_iterator | cend () const noexcept |
constexpr reverse_iterator | rbegin () const noexcept |
constexpr reverse_iterator | rend () const noexcept |
constexpr const_reverse_iterator | crbegin () const noexcept |
constexpr const_reverse_iterator | crend () const noexcept |
constexpr Span | subview (size_t offset, size_t count=(std::numeric_limits< std::size_t >::max)()) const noexcept |
constexpr Span | first (size_t count) const noexcept |
constexpr Span | last (size_t count) const noexcept |
using opcua::Span< T >::element_type = T |
using opcua::Span< T >::value_type = std::remove_cv_t<T> |
using opcua::Span< T >::size_type = size_t |
using opcua::Span< T >::difference_type = std::ptrdiff_t |
using opcua::Span< T >::pointer = T* |
using opcua::Span< T >::const_pointer = const T* |
using opcua::Span< T >::reference = T& |
using opcua::Span< T >::const_reference = const T& |
using opcua::Span< T >::iterator = pointer |
using opcua::Span< T >::const_iterator = const_pointer |
using opcua::Span< T >::reverse_iterator = std::reverse_iterator<iterator> |
using opcua::Span< T >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
|
constexprdefaultnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Implicit constructor from an initializer list.
Only safe to use if std::initializer_list
itself outlives the Span:
|
inlineconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
Definition at line 101 of file span.hpp.
Referenced by opcua::AddNodesRequest::AddNodesRequest(), opcua::AddReferencesRequest::AddReferencesRequest(), opcua::Span< T >::back(), opcua::BrowseNextRequest::BrowseNextRequest(), opcua::BrowseRequest::BrowseRequest(), opcua::CallMethodRequest::CallMethodRequest(), opcua::CallRequest::CallRequest(), opcua::Span< T >::cend(), opcua::services::detail::createBrowsePath(), opcua::CreateMonitoredItemsRequest::CreateMonitoredItemsRequest(), opcua::DeleteMonitoredItemsRequest::DeleteMonitoredItemsRequest(), opcua::DeleteNodesRequest::DeleteNodesRequest(), opcua::DeleteReferencesRequest::DeleteReferencesRequest(), opcua::DeleteSubscriptionsRequest::DeleteSubscriptionsRequest(), opcua::Span< T >::empty(), opcua::Span< T >::end(), opcua::EnumDefinition::EnumDefinition(), opcua::EventFilter::EventFilter(), opcua::Span< T >::first(), opcua::Span< T >::last(), opcua::ModifyMonitoredItemsRequest::ModifyMonitoredItemsRequest(), opcua::Span< T >::operator[](), opcua::ReadRequest::ReadRequest(), opcua::RegisterNodesRequest::RegisterNodesRequest(), opcua::RelativePath::RelativePath(), opcua::SetMonitoringModeRequest::SetMonitoringModeRequest(), opcua::SetPublishingModeRequest::SetPublishingModeRequest(), opcua::SetTriggeringRequest::SetTriggeringRequest(), opcua::Span< T >::subview(), opcua::detail::toNativeArray(), opcua::TranslateBrowsePathsToNodeIdsRequest::TranslateBrowsePathsToNodeIdsRequest(), opcua::UnregisterNodesRequest::UnregisterNodesRequest(), and opcua::WriteRequest::WriteRequest().
|
inlinenodiscardconstexprnoexcept |
Definition at line 105 of file span.hpp.
Referenced by opcua::Span< T >::back(), and opcua::Span< T >::front().
|
inlinenodiscardconstexprnoexcept |
Definition at line 109 of file span.hpp.
Referenced by opcua::Span< T >::back(), opcua::Span< T >::begin(), opcua::Span< T >::cbegin(), opcua::Span< T >::cend(), opcua::Span< T >::end(), opcua::Span< T >::first(), opcua::Span< T >::front(), opcua::Span< T >::last(), opcua::Span< T >::operator[](), opcua::Span< T >::subview(), and opcua::detail::toNativeArray().
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
Definition at line 128 of file span.hpp.
Referenced by opcua::services::detail::createBrowsePath(), opcua::operator==(), opcua::Span< T >::rend(), opcua::detail::VariantHandler< VariantPolicy::Copy >::setArray(), opcua::detail::VariantHandler< VariantPolicy::Copy >::setArray(), opcua::detail::VariantHandler< VariantPolicy::ReferenceIfPossible >::setArray(), and opcua::detail::VariantHandler< VariantPolicy::ReferenceIfPossible >::setArray().
|
inlinenodiscardconstexprnoexcept |
Definition at line 132 of file span.hpp.
Referenced by opcua::services::detail::createBrowsePath(), opcua::operator==(), opcua::Span< T >::rbegin(), opcua::detail::VariantHandler< VariantPolicy::Copy >::setArray(), opcua::detail::VariantHandler< VariantPolicy::Copy >::setArray(), opcua::detail::VariantHandler< VariantPolicy::ReferenceIfPossible >::setArray(), and opcua::detail::VariantHandler< VariantPolicy::ReferenceIfPossible >::setArray().
|
inlinenodiscardconstexprnoexcept |
Definition at line 136 of file span.hpp.
Referenced by opcua::Span< T >::crend().
|
inlinenodiscardconstexprnoexcept |
Definition at line 140 of file span.hpp.
Referenced by opcua::Span< T >::crbegin().
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |