|
BDE 4.39.x Production Release
|
Provide a utility for configuring balber::BerEncoderOptions.
Provide a utility for configuring balber::BerEncoderOptions.
BerEncoderOptionsThis component provides a struct of utility functions, balber::BerEncoderOptionsUtil, for configuring balber::BerEncoderOptions object. In particular, this utility can be used to set the recommended options needed for encoding BER messages that are time-efficient to decode. This utility can also be used to set a balber::BerEncoderOptions object to its default state.
This utility defines the mode balber::BerEncoderOptionsUtil::e_DEFAULT that sets the attributes to the values used in balber::BerEncoderOptions().
This utility defines the mode balber::BerEncoderOptionsUtil::e_FAST_20250615 that applies the default attribute values except for the following overrides:
WARNING: It is only safe to use this mode when communicating with a balber BER decoder built after June 15, 2025.
This section illustrates intended use of this component.
Every call to one of the encode functions of balber::BerEncoder requires the user to provide a balber::BerEncoderOptions object. The setMode function of this utility provides a convenient way to set the option attributes to a combination that is deemed efficient for future decoding of the message.
First, create a balber::BerEncoderOptions object:
Now, set the option values for efficiency:
Finally, options can be adjusted to the set of default attributes: