#include <bslim_fuzzdataview.h>
This type represents a view of a buffer of bytes provided by a fuzz testing harness.
See bslim_fuzzdataview
◆ 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.
- Precondition
- The behavior is undefined unless
data || (0 == size).
◆ FuzzDataView() [2/2]
| bslim::FuzzDataView::FuzzDataView |
( |
const FuzzDataView & |
original | ) |
|
|
default |
◆ ~FuzzDataView()
| bslim::FuzzDataView::~FuzzDataView |
( |
| ) |
|
|
default |
◆ begin()
| const bsl::uint8_t * bslim::FuzzDataView::begin |
( |
| ) |
const |
|
inline |
Return a const pointer to the beginning of the buffer.
◆ data()
| const bsl::uint8_t * bslim::FuzzDataView::data |
( |
| ) |
const |
|
inline |
Return a pointer to the beginning of the buffer.
◆ end()
| const bsl::uint8_t * bslim::FuzzDataView::end |
( |
| ) |
const |
|
inline |
Return a const pointer to the end of the buffer.
◆ length()
| bsl::size_t bslim::FuzzDataView::length |
( |
| ) |
const |
|
inline |
Return the length in bytes of the buffer.
◆ 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
- 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
- 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: