Spicy
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
hilti::rt::stream::detail::UnsafeConstIterator Class Reference

Public Types

using Byte = stream::Byte
 
using Chain = stream::detail::Chain
 
using ConstChainPtr = stream::detail::ConstChainPtr
 
using Chunk = stream::detail::Chunk
 
using Offset = stream::Offset
 
using Size = stream::Size
 

Public Member Functions

 UnsafeConstIterator ()=default
 
 UnsafeConstIterator (const SafeConstIterator &i)
 
Offset offset () const
 
bool isFrozen () const
 
auto & operator++ ()
 
auto operator++ (int)
 
auto & operator-- ()
 
auto operator-- (int)
 
auto & operator-= (integer::safe< uint64_t > i)
 
auto operator* () const
 
auto operator+ (integer::safe< uint64_t > i) const
 
auto operator- (integer::safe< uint64_t > i) const
 
integer::safe< int64_t > operator- (const UnsafeConstIterator &other) const
 
bool operator== (const UnsafeConstIterator &other) const
 
bool operator!= (const UnsafeConstIterator &other) const
 
bool operator< (const UnsafeConstIterator &other) const
 
bool operator<= (const UnsafeConstIterator &other) const
 
bool operator> (const UnsafeConstIterator &other) const
 
bool operator>= (const UnsafeConstIterator &other) const
 
 operator bool () const
 
std::ostream & operator<< (std::ostream &out) const
 
bool isUnset () const
 
bool isExpired () const
 
bool isValid () const
 
bool isEnd () const
 
void debugPrint (std::ostream &out) const
 

Protected Member Functions

const Chunkchunk () const
 
const Chainchain () const
 

Friends

class hilti::rt::stream::View
 
class hilti::rt::stream::detail::Chain
 
class hilti::rt::stream::SafeConstIterator
 

Constructor & Destructor Documentation

◆ UnsafeConstIterator() [1/2]

hilti::rt::stream::detail::UnsafeConstIterator::UnsafeConstIterator ( )
default

Constructor.

◆ UnsafeConstIterator() [2/2]

hilti::rt::stream::detail::UnsafeConstIterator::UnsafeConstIterator ( const SafeConstIterator i)
inlineexplicit

Constructor.

Member Function Documentation

◆ debugPrint()

void UnsafeConstIterator::debugPrint ( std::ostream &  out) const

Prints out a debug rendering to the iterator's internal representation.

◆ isEnd()

bool hilti::rt::stream::detail::UnsafeConstIterator::isEnd ( ) const
inline

Returns true if the iterator is at or beyond the current end of the underlying stream instance.

◆ isExpired()

bool hilti::rt::stream::detail::UnsafeConstIterator::isExpired ( ) const
inline

Returns true if the iterator was once valid but the underlying bytes instance has by now expired.

◆ isFrozen()

bool hilti::rt::stream::detail::UnsafeConstIterator::isFrozen ( ) const
inline

Returns true if the stream instance that the iterator is bound to has been frozen.

◆ isUnset()

bool hilti::rt::stream::detail::UnsafeConstIterator::isUnset ( ) const
inline

Returns true if the iterator remains unbound.

◆ isValid()

bool hilti::rt::stream::detail::UnsafeConstIterator::isValid ( ) const
inline

Returns true if the iterator is bound to a stream object and that's not expired yet.

◆ offset()

Offset hilti::rt::stream::detail::UnsafeConstIterator::offset ( ) const
inline

Returns the offset inside the stream that the iterator represents.

◆ operator bool()

hilti::rt::stream::detail::UnsafeConstIterator::operator bool ( ) const
inlineexplicit

Returns true if the iterator is bound to a stream instance, even if expired.

◆ operator!=()

bool hilti::rt::stream::detail::UnsafeConstIterator::operator!= ( const UnsafeConstIterator other) const
inline

Returns true if another iterator bound to the same stream instance does not refer to the same location. The result is undefined if the iterators aren't referring to the same stream instance.

◆ operator*()

auto hilti::rt::stream::detail::UnsafeConstIterator::operator* ( ) const
inline

Returns the character at the iterator's position.

◆ operator+()

auto hilti::rt::stream::detail::UnsafeConstIterator::operator+ ( integer::safe< uint64_t >  i) const
inline

Return a new iterator advanced by a given number of bytes.

◆ operator++() [1/2]

auto& hilti::rt::stream::detail::UnsafeConstIterator::operator++ ( )
inline

Advances the iterator by one byte.

◆ operator++() [2/2]

auto hilti::rt::stream::detail::UnsafeConstIterator::operator++ ( int  )
inline

Advances the iterator by one byte.

◆ operator-() [1/2]

auto hilti::rt::stream::detail::UnsafeConstIterator::operator- ( integer::safe< uint64_t >  i) const
inline

Return a new iterator moved back by a given number of bytes.

◆ operator-() [2/2]

integer::safe<int64_t> hilti::rt::stream::detail::UnsafeConstIterator::operator- ( const UnsafeConstIterator other) const
inline

Return the size of the range defined by the two iterators. The result will be negative if the instance's location comes before the argument's location.

◆ operator--() [1/2]

auto& hilti::rt::stream::detail::UnsafeConstIterator::operator-- ( )
inline

Moves back the iterator by one byte.

◆ operator--() [2/2]

auto hilti::rt::stream::detail::UnsafeConstIterator::operator-- ( int  )
inline

Moves back the iterator by one byte.

◆ operator-=()

auto& hilti::rt::stream::detail::UnsafeConstIterator::operator-= ( integer::safe< uint64_t >  i)
inline

Moves back the iterator by a given number of stream.

◆ operator<()

bool hilti::rt::stream::detail::UnsafeConstIterator::operator< ( const UnsafeConstIterator other) const
inline

Compares the offset of two iterators referring to the same stream instance.

◆ operator<=()

bool hilti::rt::stream::detail::UnsafeConstIterator::operator<= ( const UnsafeConstIterator other) const
inline

Compares the offset of two iterators referring to the same stream instance.

◆ operator==()

bool hilti::rt::stream::detail::UnsafeConstIterator::operator== ( const UnsafeConstIterator other) const
inline

Returns true if another iterator bound to the same stream instance refers to the same location. The result is undefined if the iterators aren't referring to the same stream instance.

◆ operator>()

bool hilti::rt::stream::detail::UnsafeConstIterator::operator> ( const UnsafeConstIterator other) const
inline

Compares the offset of two iterators referring to the same stream instance.

◆ operator>=()

bool hilti::rt::stream::detail::UnsafeConstIterator::operator>= ( const UnsafeConstIterator other) const
inline

Compares the offset of two iterators referring to the same stream instance.


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