The Pedigree Project 0.1
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
BufferView Class Reference

#include <BufferView.h>

+ Collaboration diagram for BufferView:

Public Member Functions

 BufferView (void *data, size_t size)
 
 operator bool () const
 
void * data () const
 
uintptr_t address () const
 
size_t size () const
 
bool empty () const
 
uint8_t & operator[] (size_t offset) const
 
BufferView operator+ (size_t offset) const
 
BufferViewoperator+= (size_t offset)
 
BufferView subview (size_t offset, size_t length) const
 
BufferView first (size_t length) const
 
template<typename T >
T * as (size_t offset=0) const
 

Static Public Member Functions

static BufferView fromAddress (uintptr_t address, size_t size)
 

Private Attributes

uintptr_t m_Data
 
size_t m_Size
 

Detailed Description

A mutable, non-owning view over a contiguous byte range.

Definition at line 28 of file BufferView.h.

Constructor & Destructor Documentation

◆ BufferView() [1/2]

BufferView::BufferView ( )
inline

Definition at line 30 of file BufferView.h.

◆ BufferView() [2/2]

BufferView::BufferView ( void *  data,
size_t  size 
)
inline

Definition at line 32 of file BufferView.h.

Member Function Documentation

◆ address()

uintptr_t BufferView::address ( ) const
inline

Definition at line 48 of file BufferView.h.

◆ as()

template<typename T >
T * BufferView::as ( size_t  offset = 0) const
inline

Definition at line 98 of file BufferView.h.

◆ data()

void * BufferView::data ( ) const
inline

Definition at line 44 of file BufferView.h.

◆ empty()

bool BufferView::empty ( ) const
inline

Definition at line 56 of file BufferView.h.

◆ first()

BufferView BufferView::first ( size_t  length) const
inline

Definition at line 93 of file BufferView.h.

◆ fromAddress()

static BufferView BufferView::fromAddress ( uintptr_t  address,
size_t  size 
)
inlinestatic

Definition at line 36 of file BufferView.h.

◆ operator bool()

BufferView::operator bool ( ) const
inlineexplicit

Definition at line 40 of file BufferView.h.

◆ operator+()

BufferView BufferView::operator+ ( size_t  offset) const
inline

Definition at line 65 of file BufferView.h.

◆ operator+=()

BufferView & BufferView::operator+= ( size_t  offset)
inline

Definition at line 73 of file BufferView.h.

◆ operator[]()

uint8_t & BufferView::operator[] ( size_t  offset) const
inline

Definition at line 60 of file BufferView.h.

◆ size()

size_t BufferView::size ( ) const
inline

Definition at line 52 of file BufferView.h.

◆ subview()

BufferView BufferView::subview ( size_t  offset,
size_t  length 
) const
inline

Definition at line 85 of file BufferView.h.

Member Data Documentation

◆ m_Data

uintptr_t BufferView::m_Data
private

Definition at line 112 of file BufferView.h.

◆ m_Size

size_t BufferView::m_Size
private

Definition at line 113 of file BufferView.h.


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