BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlat::FuzzUtil Class Reference

#include <bdlat_fuzzutil.h>

Detailed Description

This utility class provides a namespace for a suite of functions operating on objects of type bslim::FuzzDataView and providing the consumption of fuzz data bytes into bdlat-compatible types.

See bdlat_fuzzutil

Static Public Member Functions

template<class t_MESSAGE >
static void consumeMessage (t_MESSAGE *message, bslim::FuzzDataView *fuzzData)
 
template<class t_MESSAGE >
static void consumeMessage (t_MESSAGE *message, bslim::FuzzDataView *fuzzData, const FuzzUtilOptions &options)
 

Friends

struct FuzzUtil_Manipulator
 
struct FuzzUtil_ManipulatorWithCategory
 

Member Function Documentation

◆ consumeMessage() [1/2]

template<class t_MESSAGE >
void bdlat::FuzzUtil::consumeMessage ( t_MESSAGE *  message,
bslim::FuzzDataView fuzzData 
)
static

Load into the specified message content generated using bytes from the specified fuzzData, and update fuzzData to reflect the bytes consumed. Optionally specify an options to customize the generated values. If options is not supplied, default values for the options are used. In general, this operation uses fuzzData to load the root message element, and then recursively applies consumeMessage to any child elements. More specifically:

  • sequence types: recursively consumeMessage on each of the elements of the sequence
  • array types: use fuzzData to determine the size of the array, use consumeMessage on each of the elements in the array
  • choice types: use fuzzData to select the active element of the choice, and then recursively consumeMessage for that element
  • nullable values: use fuzzData to select whether the object contains a value, and if it is engaged, recursively consumeMessage on it.
  • customized and dynamic types: recursively consumeMessage on the underlying value.

t_MESSAGE must be a bdlat-compatible type.

◆ consumeMessage() [2/2]

template<class t_MESSAGE >
void bdlat::FuzzUtil::consumeMessage ( t_MESSAGE *  message,
bslim::FuzzDataView fuzzData,
const FuzzUtilOptions options 
)
static

Friends And Related Symbol Documentation

◆ FuzzUtil_Manipulator

friend struct FuzzUtil_Manipulator
friend

◆ FuzzUtil_ManipulatorWithCategory

friend struct FuzzUtil_ManipulatorWithCategory
friend

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