|
BDE 4.39.x Production Release
|
#include <bslfmt_testspecificationgenerator.h>
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.
Public Types | |
| enum | Alignment { e_ALIGN_DEFAULT , e_ALIGN_LEFT , e_ALIGN_MIDDLE , e_ALIGN_RIGHT } |
| enum | Sign { e_SIGN_DEFAULT , e_SIGN_POSITIVE , e_SIGN_NEGATIVE , e_SIGN_SPACE } |
| enum | NestedVariant { e_NESTED_DEFAULT , e_NESTED_ARG_1 , e_NESTED_ARG_2 } |
| enum | FormatType { e_TYPE_UNSPECIFIED , e_TYPE_STRING , e_TYPE_ESCAPED , e_TYPE_BINARY , e_TYPE_BINARY_UC , e_TYPE_CHARACTER , e_TYPE_DECIMAL , e_TYPE_OCTAL , e_TYPE_INT_HEX , e_TYPE_INT_HEX_UC , e_TYPE_FLOAT_HEX , e_TYPE_FLOAT_HEX_UC , e_TYPE_SCIENTIFIC , e_TYPE_SCIENTIFIC_UC , e_TYPE_FIXED , e_TYPE_FIXED_UC , e_TYPE_GENERAL , e_TYPE_GENERAL_UC , e_TYPE_POINTER , e_TYPE_POINTER_UC } |
| enum bslfmt::TestSpecificationGenerator::Alignment |
| enum bslfmt::TestSpecificationGenerator::FormatType |
| enum bslfmt::TestSpecificationGenerator::NestedVariant |
| enum bslfmt::TestSpecificationGenerator::Sign |
| bslfmt::TestSpecificationGenerator< t_CHAR >::TestSpecificationGenerator | ( | bslma::Allocator * | basicAllocator = 0 | ) |
Create a generator object. Optionally specify the basicAllocator to supply memory.
| void bslfmt::TestSpecificationGenerator< t_CHAR >::addFillCharacter | ( | char | character | ) |
Add the specified character to the set of fill characters.
character only if this function is called before the setup method invocation. | void bslfmt::TestSpecificationGenerator< t_CHAR >::addPrecision | ( | int | precision | ) |
Add the specified precision to the set of precision values.
precision only if this function is called before the setup method invocation. | void bslfmt::TestSpecificationGenerator< t_CHAR >::addWidth | ( | int | width | ) |
Add the specified width to the set of width values.
width only if this function is called before the setup method invocation. | TestSpecificationGenerator< t_CHAR >::Alignment bslfmt::TestSpecificationGenerator< t_CHAR >::alignment | ( | ) | const |
Return the current alignment type.
| bslfmt::TestSpecificationGenerator< t_CHAR >::BSLMF_NESTED_TRAIT_DECLARATION | ( | TestSpecificationGenerator< t_CHAR > | , |
| bslma::UsesBslmaAllocator | |||
| ) |
| char bslfmt::TestSpecificationGenerator< t_CHAR >::fillCharacter | ( | ) | const |
Return the current fill character.
| const bsl::basic_string< t_CHAR > & bslfmt::TestSpecificationGenerator< t_CHAR >::formatSpec | ( | ) | const |
Return the specification for the formatters format method based on the current state of this object.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::isAlignOptionPresent | ( | ) | const |
Return true if the align option is present in the current state of this object, and false otherwise.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::isFillCharacterPresent | ( | ) | const |
Return true if the value id option is present in the current state of this object, and false otherwise.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::isHashOptionPresent | ( | ) | const |
Return true if the alternative form option is present in the current state of this object, and false otherwise.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::isLocaleOptionPresent | ( | ) | const |
Return true if the locale option is present in the current state of this object, and false otherwise.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::isNestedPrecisionPresent | ( | ) | const |
Return true if the nested precision option is present in the current state of this object, and false otherwise.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::isNestedWidthPresent | ( | ) | const |
Return true if the nested width option is present in the current state of this object, and false otherwise.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::isPrecisionOptionPresent | ( | ) | const |
Return true if the precision option is present in the current state of this object, and false otherwise.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::isSignOptionPresent | ( | ) | const |
Return true if the sign option is present in the current state of this object, and false otherwise.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::isStateValidForFormat | ( | ) | const |
Return true if the generated specification based on the current state of this object is valid for the formatters format method, and false otherwise.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::isStateValidForParse | ( | ) | const |
Return true if the generated specification based on the current state of this object is valid for the formatters parse method, and false otherwise.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::isTypeOptionPresent | ( | ) | const |
Return true if the presentation type option is present in the current state of this object, and false otherwise.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::isValueIdOptionPresent | ( | ) | const |
Return true if the value id option is present in the current state of this object, and false otherwise.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::isWidthOptionPresent | ( | ) | const |
Return true if the width option is present in the current state of this object, and false otherwise.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::isZeroOptionPresent | ( | ) | const |
Return true if the zero option is present in the current state of this object, and false otherwise.
| TestSpecificationGenerator< t_CHAR >::NestedVariant bslfmt::TestSpecificationGenerator< t_CHAR >::nestedPrecisionVariant | ( | ) | const |
Return the current nested precision variant.
| TestSpecificationGenerator< t_CHAR >::NestedVariant bslfmt::TestSpecificationGenerator< t_CHAR >::nestedWidthVariant | ( | ) | const |
Return the current nested width variant.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::next | ( | ) |
Switch this object to the next state and generate specification based on the new state.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::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.
| bool bslfmt::TestSpecificationGenerator< t_CHAR >::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.
| int bslfmt::TestSpecificationGenerator< t_CHAR >::precision | ( | ) | const |
Return the current precision value.
| void bslfmt::TestSpecificationGenerator< t_CHAR >::setup | ( | const char * | instruction = 0 | ) |
Setup the sequence of this object's states based on the optionally specified instruction.
| TestSpecificationGenerator< t_CHAR >::Sign bslfmt::TestSpecificationGenerator< t_CHAR >::sign | ( | ) | const |
Return the current sign option value.
| const bsl::basic_string< t_CHAR > & bslfmt::TestSpecificationGenerator< t_CHAR >::spec | ( | ) | const |
Return the specification for the formatters parse method based on the current state of this object.
| TestSpecificationGenerator< t_CHAR >::FormatType bslfmt::TestSpecificationGenerator< t_CHAR >::type | ( | ) | const |
Return the current presentation type value.
| int bslfmt::TestSpecificationGenerator< t_CHAR >::width | ( | ) | const |
Return the current width value.