BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslim::FuzzDataView Class Reference

#include <bslim_fuzzdataview.h>

Public Member Functions

 FuzzDataView (const bsl::uint8_t *data, bsl::size_t size)
 
 FuzzDataView (const FuzzDataView &original)=default
 
 ~FuzzDataView ()=default
 Destroy this object.
 
FuzzDataView removePrefix (bsl::size_t numBytes)
 
FuzzDataView removeSuffix (bsl::size_t numBytes)
 
const bsl::uint8_t * begin () const
 Return a const pointer to the beginning of the buffer.
 
const bsl::uint8_t * end () const
 Return a const pointer to the end of the buffer.
 
bsl::size_t length () const
 Return the length in bytes of the buffer.
 
const bsl::uint8_t * data () const
 Return a pointer to the beginning of the buffer.
 

Detailed Description

This type represents a view of a buffer of bytes provided by a fuzz testing harness.

See bslim_fuzzdataview

Constructor & Destructor Documentation

◆ FuzzDataView() [1/2]

bslim::FuzzDataView::FuzzDataView ( const bsl::uint8_t *  data,
bsl::size_t  size 
)
inline

Create a FuzzDataView object from the specified fuzz data and size. The behavior is undefined unless data || (0 == size).

◆ FuzzDataView() [2/2]

bslim::FuzzDataView::FuzzDataView ( const FuzzDataView original)
default

Create a FuzzDataView having the value of the specified original FuzzDataView.

◆ ~FuzzDataView()

bslim::FuzzDataView::~FuzzDataView ( )
default

Member Function Documentation

◆ begin()

const bsl::uint8_t * bslim::FuzzDataView::begin ( ) const
inline

◆ data()

const bsl::uint8_t * bslim::FuzzDataView::data ( ) const
inline

◆ end()

const bsl::uint8_t * bslim::FuzzDataView::end ( ) const
inline

◆ length()

bsl::size_t bslim::FuzzDataView::length ( ) const
inline

◆ removePrefix()

FuzzDataView bslim::FuzzDataView::removePrefix ( bsl::size_t  numBytes)
inline

Assign to this FuzzDataView the value of the specified rhs FuzzDataView, and return a reference providing modifiable access to this object. Note that this trivial assignment operation is generated by the compiler. Remove the specified initial numBytes from this view if numBytes <= length() and remove length() bytes otherwise; return a view to the bytes that were removed. Note that this method will decrease the length of this view by min(numBytes, length()) bytes.

◆ removeSuffix()

FuzzDataView bslim::FuzzDataView::removeSuffix ( bsl::size_t  numBytes)
inline

Remove the specified last numBytes from this view if numBytes <= length() and remove length() bytes otherwise; return a view to the bytes that were removed. Note that this method will decrease the length of this view by min(numBytes, length()) bytes.


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