sbepp
Loading...
Searching...
No Matches
sbepp::cursor< Byte > Class Template Reference

Represents cursor which is used in cursor-based API. Clients should not use undocumented methods. More...

#include <sbepp.hpp>

Public Types

using byte_type = Byte
 same as Byte
 

Public Member Functions

 cursor ()=default
 Construct a new cursor object initialized with nullptr
 
template<typename Byte2 , typename = detail::enable_if_convertible_t<Byte2, Byte>>
constexpr cursor (cursor< Byte2 > other) noexcept
 Construct from another cursor. Enabled only if Byte2* is convertible to Byte*.
 
template<typename Byte2 , typename = detail::enable_if_convertible_t<Byte2, Byte>>
constexpr cursoroperator= (cursor< Byte2 > other) noexcept
 Assign from another cursor. Enabled only if Byte2* is convertible to Byte
 
constexpr Byte *& pointer () noexcept
 access underlying pointer. Might be useful in rare cases to initialize cursor with a particular value.
 
constexpr Byte * pointer () const noexcept
 access underlying pointer
 

Detailed Description

template<typename Byte>
class sbepp::cursor< Byte >

Represents cursor which is used in cursor-based API. Clients should not use undocumented methods.

Template Parameters
Bytebyte type

Constructor & Destructor Documentation

◆ cursor()

template<typename Byte >
template<typename Byte2 , typename = detail::enable_if_convertible_t<Byte2, Byte>>
constexpr sbepp::cursor< Byte >::cursor ( cursor< Byte2 > other)
inlineconstexprnoexcept

Construct from another cursor. Enabled only if Byte2* is convertible to Byte*.

Template Parameters
Byte2other's byte type
Parameters
othercursor to construct from

Member Function Documentation

◆ operator=()

template<typename Byte >
template<typename Byte2 , typename = detail::enable_if_convertible_t<Byte2, Byte>>
constexpr cursor & sbepp::cursor< Byte >::operator= ( cursor< Byte2 > other)
inlineconstexprnoexcept

Assign from another cursor. Enabled only if Byte2* is convertible to Byte

Template Parameters
Byte2other's byte type
Parameters
othercursor to assign from
Returns
*this

◆ pointer() [1/2]

template<typename Byte >
constexpr Byte * sbepp::cursor< Byte >::pointer ( ) const
inlineconstexprnoexcept

access underlying pointer

Returns
underlying pointer

◆ pointer() [2/2]

template<typename Byte >
constexpr Byte *& sbepp::cursor< Byte >::pointer ( )
inlineconstexprnoexcept

access underlying pointer. Might be useful in rare cases to initialize cursor with a particular value.

Returns
a reference to underlying pointer

The documentation for this class was generated from the following file: