This class is a generator that provides a set of formatting specifications obtained by exhaustive search of all combinations of standard options. Its use allows easy and thorough testing of formatters for standard types. The generator is a state machine, each state of which corresponds to a separate specification.
Declared in <bslfmt_testspecificationgenerator.h>
template<class t_CHAR>
class TestSpecificationGenerator;
| Name | Description |
|---|---|
Alignment | Alignment option values corresponding to format alignment characters. |
FormatType | Format presentation types corresponding to standard format type chars. |
NestedVariant | Nested width or precision argument-id variants. |
Sign | Sign option values corresponding to format sign characters. |
| Name | Description |
|---|---|
TestSpecificationGenerator [constructor] | Create a generator object. Optionally specify the basicAllocator to supply memory. |
addFillCharacter | Add the specified character to the set of fill characters. Note that generated instructions will contain the character only if this function is called before the setup method invocation. |
addPrecision | Add the specified precision to the set of precision values. Note that generated instructions will contain the precision only if this function is called before the setup method invocation. |
addWidth | Add the specified width to the set of width values. Note that generated instructions will contain the width only if this function is called before the setup method invocation. |
alignment | Return the current alignment type. |
fillCharacter | Return the current fill character. |
formatSpec | Return the specification for the formatters format method based on the current state of this object. |
isAlignOptionPresent | Return true if the align option is present in the current state of this object, and false otherwise. |
isFillCharacterPresent | Return true if the value id option is present in the current state of this object, and false otherwise. |
isHashOptionPresent | Return true if the alternative form option is present in the current state of this object, and false otherwise. |
isLocaleOptionPresent | Return true if the locale option is present in the current state of this object, and false otherwise. |
isNestedPrecisionPresent | Return true if the nested precision option is present in the current state of this object, and false otherwise. |
isNestedWidthPresent | Return true if the nested width option is present in the current state of this object, and false otherwise. |
isPrecisionOptionPresent | Return true if the precision option is present in the current state of this object, and false otherwise. |
isSignOptionPresent | Return true if the sign option is present in the current state of this object, and false otherwise. |
isStateValidForFormat | Return true if the generated specification based on the current state of this object is valid for the formatters format method, and false otherwise. |
isStateValidForParse | Return true if the generated specification based on the current state of this object is valid for the formatters parse method, and false otherwise. |
isTypeOptionPresent | Return true if the presentation type option is present in the current state of this object, and false otherwise. |
isValueIdOptionPresent | Return true if the value id option is present in the current state of this object, and false otherwise. |
isWidthOptionPresent | Return true if the width option is present in the current state of this object, and false otherwise. |
isZeroOptionPresent | Return true if the zero option is present in the current state of this object, and false otherwise. |
nestedPrecisionVariant | Return the current nested precision variant. |
nestedWidthVariant | Return the current nested width variant. |
next | Switch this object to the next state and generate specification based on the new state. |
nextValidForFormat | Switch this object to the next state appropriate for generating a specification valid for formatters format method and generate specification based on the new state. |
nextValidForParse | Switch this object to the next state appropriate for generating a specification valid for formatters parse method and generate specification based on the new state. |
precision | Return the current precision value. |
setup | Setup the sequence of this object's states based on the optionally specified instruction. |
sign | Return the current sign option value. |
spec | Return the specification for the formatters parse method based on the current state of this object. |
type | Return the current presentation type value. |
width | Return the current width value. |
operator BloombergLP::bslmf::NestedTraitDeclaration<TestSpecificationGenerator, UsesBslmaAllocator> | Declare TestSpecificationGenerator as using bslma allocator. |