|
blocxx
|
This is a class similar to the blocxx format, except that all arguments are bound by reference and the formatting is performed at a later point in time. More...
#include <DelayedFormat.hpp>
Public Member Functions | |
| DelayedFormat (const String &format) | |
| This constructor allows for simple text output without non-format arguments. More... | |
| template<typename A > | |
| DelayedFormat (const String &format, A &a) | |
| template<typename A , typename B > | |
| DelayedFormat (const String &format, A &a, B &b) | |
| template<typename A , typename B , typename C > | |
| DelayedFormat (const String &format, A &a, B &b, C &c) | |
| template<typename A , typename B , typename C , typename D > | |
| DelayedFormat (const String &format, A &a, B &b, C &c, D &d) | |
| template<typename A , typename B , typename C , typename D , typename E > | |
| DelayedFormat (const String &format, A &a, B &b, C &c, D &d, E &e) | |
| template<typename A , typename B , typename C , typename D , typename E , typename F > | |
| DelayedFormat (const String &format, A &a, B &b, C &c, D &d, E &e, F &f) | |
| template<typename A , typename B , typename C , typename D , typename E , typename F , typename G > | |
| DelayedFormat (const String &format, A &a, B &b, C &c, D &d, E &e, F &f, G &g) | |
| template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H > | |
| DelayedFormat (const String &format, A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h) | |
| template<typename A , typename B , typename C , typename D , typename E , typename F , typename G , typename H , typename I > | |
| DelayedFormat (const String &format, A &a, B &b, C &c, D &d, E &e, F &f, G &g, H &h, I &i) | |
| Format | format () const |
| Format the output using the stored references and initial format string. More... | |
| operator String () const | |
| Simple conversion operator. More... | |
| Format | formatWithString (const String &fs) const |
| Format the stored references using a different format string than used for initialization. More... | |
| Format | formatWithString (const char *fs) const |
Private Types | |
| typedef Reference< DelayedFormatInternals::DelayedFormatReferenceBase > | paramEntry |
Private Member Functions | |
| template<class T > | |
| void | append (T &t) |
| This is a helper function to keep the various constructors simple. More... | |
Private Attributes | |
| String | formatString |
| The format string which will be passed to Format() when formatting this object. More... | |
| Array< paramEntry > | formatParameters |
| The parameters that will be passed to format. More... | |
This is a class similar to the blocxx format, except that all arguments are bound by reference and the formatting is performed at a later point in time.
Because the references are stored, no temporary values can be passed to the delayed formatter; store them in a variable first.
For clarity and emphasis it is important to restate that NOTHING (except the format string) can be passed to this formatter whose lifetime does not exceed the instance of this formatter.
Definition at line 134 of file DelayedFormat.hpp.
|
private |
Definition at line 180 of file DelayedFormat.hpp.
| BLOCXX_NAMESPACE::DelayedFormat::DelayedFormat | ( | const String & | format | ) |
This constructor allows for simple text output without non-format arguments.
The blocxx::Format class does not allow such behavior, as such, an empty string will be used as a parameter for creation of the output Format object. That means that %1 will be a valid format conversion, but it will always be empty.
Definition at line 93 of file DelayedFormat.cpp.
| BLOCXX_NAMESPACE::DelayedFormat::DelayedFormat | ( | const String & | format, |
| A & | a | ||
| ) |
Definition at line 193 of file DelayedFormat.hpp.
References append(), and formatParameters.
| BLOCXX_NAMESPACE::DelayedFormat::DelayedFormat | ( | const String & | format, |
| A & | a, | ||
| B & | b | ||
| ) |
Definition at line 201 of file DelayedFormat.hpp.
References append(), and formatParameters.
| BLOCXX_NAMESPACE::DelayedFormat::DelayedFormat | ( | const String & | format, |
| A & | a, | ||
| B & | b, | ||
| C & | c | ||
| ) |
Definition at line 209 of file DelayedFormat.hpp.
References append(), and formatParameters.
| BLOCXX_NAMESPACE::DelayedFormat::DelayedFormat | ( | const String & | format, |
| A & | a, | ||
| B & | b, | ||
| C & | c, | ||
| D & | d | ||
| ) |
Definition at line 217 of file DelayedFormat.hpp.
References append(), and formatParameters.
| BLOCXX_NAMESPACE::DelayedFormat::DelayedFormat | ( | const String & | format, |
| A & | a, | ||
| B & | b, | ||
| C & | c, | ||
| D & | d, | ||
| E & | e | ||
| ) |
Definition at line 225 of file DelayedFormat.hpp.
References append(), formatParameters, and i.
| BLOCXX_NAMESPACE::DelayedFormat::DelayedFormat | ( | const String & | format, |
| A & | a, | ||
| B & | b, | ||
| C & | c, | ||
| D & | d, | ||
| E & | e, | ||
| F & | f | ||
| ) |
Definition at line 233 of file DelayedFormat.hpp.
| BLOCXX_NAMESPACE::DelayedFormat::DelayedFormat | ( | const String & | format, |
| A & | a, | ||
| B & | b, | ||
| C & | c, | ||
| D & | d, | ||
| E & | e, | ||
| F & | f, | ||
| G & | g | ||
| ) |
Definition at line 241 of file DelayedFormat.hpp.
| BLOCXX_NAMESPACE::DelayedFormat::DelayedFormat | ( | const String & | format, |
| A & | a, | ||
| B & | b, | ||
| C & | c, | ||
| D & | d, | ||
| E & | e, | ||
| F & | f, | ||
| G & | g, | ||
| H & | h | ||
| ) |
Definition at line 249 of file DelayedFormat.hpp.
| BLOCXX_NAMESPACE::DelayedFormat::DelayedFormat | ( | const String & | format, |
| A & | a, | ||
| B & | b, | ||
| C & | c, | ||
| D & | d, | ||
| E & | e, | ||
| F & | f, | ||
| G & | g, | ||
| H & | h, | ||
| I & | i | ||
| ) |
Definition at line 257 of file DelayedFormat.hpp.
|
private |
This is a helper function to keep the various constructors simple.
Definition at line 186 of file DelayedFormat.hpp.
References formatParameters.
Referenced by DelayedFormat().
| Format BLOCXX_NAMESPACE::DelayedFormat::format | ( | ) | const |
Format the output using the stored references and initial format string.
Definition at line 103 of file DelayedFormat.cpp.
| Format BLOCXX_NAMESPACE::DelayedFormat::formatWithString | ( | const char * | fs | ) | const |
Definition at line 113 of file DelayedFormat.cpp.
Format the stored references using a different format string than used for initialization.
Definition at line 108 of file DelayedFormat.cpp.
| BLOCXX_NAMESPACE::DelayedFormat::operator String | ( | ) | const |
Simple conversion operator.
Definition at line 98 of file DelayedFormat.cpp.
|
private |
The parameters that will be passed to format.
Definition at line 182 of file DelayedFormat.hpp.
Referenced by append(), and DelayedFormat().
|
private |
The format string which will be passed to Format() when formatting this object.
Definition at line 179 of file DelayedFormat.hpp.
1.8.18