KItinerary::BitVectorView

Search for usage in LXR

KItinerary::BitVectorView Class Reference

#include <bitvectorview.h>

Public Types

using size_type = std::string_view::size_type
 

Public Member Functions

 BitVectorView (std::string_view data)
 
uint8_t at (size_type index) const
 
template<std::size_t N>
std::bitset< N > bitsetAt (size_type index) const
 
QByteArray byteArrayAt (size_type index, size_type bytes) const
 
size_type size () const
 
template<typename T >
valueAtMSB (size_type index, size_type bits) const
 

Detailed Description

Non-owning bit-level view for working with data that isn't byte-aligned.

Definition at line 20 of file bitvectorview.h.

Member Typedef Documentation

◆ size_type

using KItinerary::BitVectorView::size_type = std::string_view::size_type

Definition at line 27 of file bitvectorview.h.

Constructor & Destructor Documentation

◆ BitVectorView()

BitVectorView::BitVectorView ( std::string_view data)
explicit

Definition at line 14 of file bitvectorview.cpp.

Member Function Documentation

◆ at()

uint8_t BitVectorView::at ( BitVectorView::size_type index) const

Returns the bit value at index.

Definition at line 26 of file bitvectorview.cpp.

◆ bitsetAt()

template<std::size_t N>
std::bitset< N > KItinerary::BitVectorView::bitsetAt ( size_type index) const
inline

Reads a std::bitset from index.

Definition at line 58 of file bitvectorview.h.

◆ byteArrayAt()

QByteArray BitVectorView::byteArrayAt ( BitVectorView::size_type index,
BitVectorView::size_type bytes ) const

Returns bytes starting at bit offset index.

Definition at line 36 of file bitvectorview.cpp.

◆ size()

BitVectorView::size_type BitVectorView::size ( ) const

Size of this vector in bits.

Definition at line 21 of file bitvectorview.cpp.

◆ valueAtMSB()

template<typename T >
T KItinerary::BitVectorView::valueAtMSB ( size_type index,
size_type bits ) const
inline

Read a big endian unsigned number at bit offset index and bits in length.

Definition at line 39 of file bitvectorview.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:28:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.