BloombergLP::bdlt::Literal_SpecifierFormatter

This class does parsing and output of sequences whose corresponding output is independent of the type and value of the object being formatted.

Synopsis

Declared in <bdlt_literal_specifierformatter.h>

template<class t_CHAR>
class Literal_SpecifierFormatter;

Member Functions

NameDescription
Literal_SpecifierFormatter [constructor]Create an object with totalWidth set to 0.
formatNextSpecifier Examine the front character of the specified spec. If that character matches any of those recognized by this specifier formatter, perform the sort of output indicated by that character off of spec and return true, otherwise return false.
parseNextSpecifier Parse the front character of the specified spec. If that character matches any of those recognized by this specifier formatter, increment d_totalWidth, pop the first character off of spec and return true, otherwise return false. The behavior is undefined if *spec is empty.
totalWidth Return the total width of the output anticipated from all the previous calls to parseNextSpecifier.