OnixS C++ ICE Binary Order Entry Handler 1.1.1
API Documentation
Loading...
Searching...
No Matches
SbeOptionalStr Class Reference

Public Types

using HeldType = StrRef
Public Types inherited from SbeOptionalField< SbeOptionalStr >
using Native

Public Member Functions

constexpr SbeOptionalStr (StrRef v) noexcept
constexpr SbeOptionalStr () noexcept
constexpr SbeOptionalStr (NullOpt) noexcept
StrRef raw () const noexcept
bool hasValue () const noexcept
StrRef operator* () const noexcept
const StrRefoperator-> () const noexcept
Public Member Functions inherited from SbeOptionalField< SbeOptionalStr >
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< SbeOptionalStr >
static ONIXS_ICEBOE_FORCEINLINE constexpr SbeOptionalStr null () noexcept
Protected Member Functions inherited from SbeOptionalField< SbeOptionalStr >
 ~SbeOptionalField ()=default

Detailed Description

Definition at line 225 of file SbeOptional.h.

Member Typedef Documentation

◆ HeldType

using HeldType = StrRef

Definition at line 229 of file SbeOptional.h.

Constructor & Destructor Documentation

◆ SbeOptionalStr() [1/3]

SbeOptionalStr ( StrRef v)
inlineconstexprnoexcept

Definition at line 231 of file SbeOptional.h.

232 : value_(v)
233 {
234 }

◆ SbeOptionalStr() [2/3]

SbeOptionalStr ( )
inlineconstexprnoexcept

Definition at line 236 of file SbeOptional.h.

237 : value_(StrRef{})
238 {
239 }

◆ SbeOptionalStr() [3/3]

SbeOptionalStr ( NullOpt )
inlineconstexprnoexcept

Definition at line 241 of file SbeOptional.h.

242 : value_(StrRef{})
243 {
244 }

Member Function Documentation

◆ hasValue()

bool hasValue ( ) const
inlinenoexcept

Definition at line 251 of file SbeOptional.h.

252 {
253 return !value_.empty();
254 }

◆ operator*()

StrRef operator* ( ) const
inlinenoexcept

Definition at line 256 of file SbeOptional.h.

257 {
258 assert(hasValue());
259 return value_;
260 }

◆ operator->()

const StrRef * operator-> ( ) const
inlinenoexcept

Definition at line 262 of file SbeOptional.h.

263 {
264 return &value_;
265 }

◆ raw()

StrRef raw ( ) const
inlinenoexcept

Definition at line 246 of file SbeOptional.h.

247 {
248 return value_;
249 }