Quick Links:

bal | bbl | bdl | bsl

Public Member Functions

bslim::FuzzDataView Class Reference

#include <bslim_fuzzdataview.h>

List of all members.

Public Member Functions

 FuzzDataView (const bsl::uint8_t *data, bsl::size_t size)
FuzzDataView removePrefix (bsl::size_t numBytes)
FuzzDataView removeSuffix (bsl::size_t numBytes)
const bsl::uint8_t * begin () const
const bsl::uint8_t * end () const
bsl::size_t length () const
const bsl::uint8_t * data () const

Detailed Description

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

See Component bslim_fuzzdataview


Constructor & Destructor Documentation

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

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


Member Function Documentation

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

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.

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

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.

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

Return a const pointer to the beginning of the buffer.

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

Return a const pointer to the end of the buffer.

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

Return the length in bytes of the buffer.

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

Return a pointer to the beginning of the buffer.


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