|
LibSWOC++ 1.5.14
Solid Wall of C++
|
#include <bwf_base.h>

Classes | |
| struct | FormatExtractor |
| Extraction support for pre-parsed format strings. More... | |
| struct | TextViewExtractor |
| Extraction support for TextView. More... | |
Public Types | |
| using | self_type = Format |
| Self reference type. | |
| using | Container = std::vector<Spec> |
| using | iterator = Container::iterator |
| using | const_iterator = Container::const_iterator |
Public Member Functions | |
| Format ()=default | |
| Empty format. | |
| Format (TextView fmt) | |
| Construct from a format string fmt. | |
| Format (self_type &&that)=default | |
| Move constructor. | |
| Format (self_type const &)=delete | |
| No copy. | |
| FormatExtractor | bind () const |
| Wrap the format instance in an extractor. | |
| bool | is_literal () const |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
Static Public Member Functions | |
| static TextViewExtractor | bind (TextView fmt) |
| Wrap the format string in an extractor. | |
Public Attributes | |
| Container | _items |
| Items from format string. | |
Format string support.
This contains the parsing logic for format strings and also serves as the type for pre-compiled format string.
When used by the print formatting logic, there is an abstraction layer, "extraction", which performs the equivalent of the parse method. This allows the formatting to treat pre-compiled or immediately parsed format strings the same. It also enables formatted print support for any parser that can deliver literals and Spec instances.
Definition at line 140 of file bwf_base.h.
| using swoc::bwf::Format::const_iterator = Container::const_iterator |
Definition at line 212 of file bwf_base.h.
| using swoc::bwf::Format::Container = std::vector<Spec> |
Definition at line 208 of file bwf_base.h.
| using swoc::bwf::Format::iterator = Container::iterator |
Definition at line 211 of file bwf_base.h.
| using swoc::bwf::Format::self_type = Format |
Self reference type.
Definition at line 141 of file bwf_base.h.
| swoc::bwf::Format::Format | ( | TextView | fmt | ) |
Construct from a format string fmt.
Preparse format string for later use.
Definition at line 605 of file bw_format.cc.
|
inline |
Definition at line 215 of file bwf_base.h.
|
inline |
Definition at line 223 of file bwf_base.h.
|
inline |
Wrap the format instance in an extractor.
Definition at line 532 of file bwf_base.h.
|
inlinestatic |
Wrap the format string in an extractor.
Definition at line 527 of file bwf_base.h.
|
inline |
Definition at line 219 of file bwf_base.h.
|
inline |
Definition at line 227 of file bwf_base.h.
| bool swoc::bwf::Format::is_literal | ( | ) | const |
true if all specifiers are literal. Definition at line 635 of file bw_format.cc.
| Container swoc::bwf::Format::_items |
Items from format string.
Definition at line 209 of file bwf_base.h.