OnixS C++ ICE Binary Order Entry Handler 1.1.2
API Documentation
Loading...
Searching...
No Matches
SbeOptional< T, Null, typename std::enable_if< std::is_same< T, typename Null::Value >::value &&isConstant< Null >::value &&!isScopedEnum< T >::value >::type > Class Template Reference

Public Types

using HeldType = T
Public Types inherited from SbeOptionalField< SbeOptional< T, Null > >
using Native

Public Member Functions

template<typename U, typename std::enable_if< std::is_constructible< T, U && >::value, void * >::type = nullptr>
 SbeOptional (U &&u) noexcept(noexcept(T(std::forward< U >(u))))
template<class U, class V, class... Rest, typename std::enable_if< std::is_constructible< T, U &&, V &&, Rest &&... >::value, void * >::type = nullptr>
 SbeOptional (U &&u, V &&v, Rest &&... rest) noexcept(noexcept(T(std::forward< U >(u), std::forward< V >(v), std::forward< Rest >(rest)...)))
constexpr SbeOptional () noexcept
constexpr SbeOptional (NullOpt) noexcept
ChooseValueKind< T > raw () const noexcept
bool hasValue () const noexcept
ChooseValueKind< T > operator* () const noexcept
const T * operator-> () const noexcept
Public Member Functions inherited from SbeOptionalField< SbeOptional< T, Null > >
ONIXS_ICEBOE_FORCEINLINE auto value () const -> decltype(*std::declval< const D & >())
 operator bool () const noexcept
auto asNative () const noexcept
 operator Native< D > () const noexcept(noexcept(asNative< D >()))

Additional Inherited Members

Static Public Member Functions inherited from SbeOptionalField< SbeOptional< T, Null > >
static ONIXS_ICEBOE_FORCEINLINE constexpr SbeOptional< T, Null > null () noexcept
Protected Member Functions inherited from SbeOptionalField< SbeOptional< T, Null > >
 ~SbeOptionalField ()=default

Detailed Description

template<class T, typename Null>
class OnixS::ICE::BOE::Messaging::SbeOptional< T, Null, typename std::enable_if< std::is_same< T, typename Null::Value >::value &&isConstant< Null >::value &&!isScopedEnum< T >::value >::type >

Definition at line 111 of file SbeOptional.h.

Member Typedef Documentation

◆ HeldType

template<class T, typename Null>
using HeldType = T

Definition at line 125 of file SbeOptional.h.

Constructor & Destructor Documentation

◆ SbeOptional() [1/4]

template<class T, typename Null>
template<typename U, typename std::enable_if< std::is_constructible< T, U && >::value, void * >::type = nullptr>
SbeOptional ( U && u)
inlinenoexcept

Definition at line 129 of file SbeOptional.h.

130 : value_(std::forward<U>(u))
131 {
132 }

◆ SbeOptional() [2/4]

template<class T, typename Null>
template<class U, class V, class... Rest, typename std::enable_if< std::is_constructible< T, U &&, V &&, Rest &&... >::value, void * >::type = nullptr>
SbeOptional ( U && u,
V && v,
Rest &&... rest )
inlineexplicitnoexcept

Definition at line 136 of file SbeOptional.h.

137 : value_(std::forward<U>(u), std::forward<V>(v), std::forward<Rest>(rest)...)
138 {
139 }

◆ SbeOptional() [3/4]

template<class T, typename Null>
SbeOptional ( )
inlineconstexprnoexcept

Definition at line 141 of file SbeOptional.h.

142 : value_(Null::value())
143 {
144 }

◆ SbeOptional() [4/4]

template<class T, typename Null>
SbeOptional ( NullOpt )
inlineconstexprnoexcept

Definition at line 146 of file SbeOptional.h.

147 : value_(Null::value())
148 {
149 }

Member Function Documentation

◆ hasValue()

template<class T, typename Null>
bool hasValue ( ) const
inlinenoexcept

Definition at line 156 of file SbeOptional.h.

157 {
158 return value_ != Null::value();
159 }

◆ operator*()

template<class T, typename Null>
ChooseValueKind< T > operator* ( ) const
inlinenoexcept

Definition at line 161 of file SbeOptional.h.

162 {
163 assert(hasValue());
164 return value_;
165 }

◆ operator->()

template<class T, typename Null>
const T * operator-> ( ) const
inlinenoexcept

Definition at line 167 of file SbeOptional.h.

168 {
169 assert(hasValue());
170 return &value_;
171 }

◆ raw()

template<class T, typename Null>
ChooseValueKind< T > raw ( ) const
inlinenoexcept

Definition at line 151 of file SbeOptional.h.

152 {
153 return value_;
154 }