struct paramater_substitution::specifier encapsulates a parameter substitution specifier.
More...
#include <parameter_substitution.h>
|
|
| specifier () |
| | The default constructor yields the null specifier.
|
| |
|
| specifier (unsigned short param_i, handling h) |
| | Construct a specifier for the parameter indexed param_i to be handled in manner h
|
| |
|
bool | operator== (specifier const &other) const |
| | Equality.
|
| |
|
bool | operator!= (specifier const &other) const |
| | Inequality.
|
| |
|
void | append_to (std::string &s) |
| | Append the specifier to a string.
|
| |
|
void | set_param_index (unsigned short i) |
| | Set the index of the specified parameter.
|
| |
|
unsigned short | get_param_index () const |
| | Get the index of the specified parameter.
|
| |
|
void | set_handling (handling h) |
| | Set the handling of the specified parameter.
|
| |
|
handling | get_handling () const |
| | Get the handling of the specified parameter.
|
| |
|
bool | null () const |
| | Say whether the specifier is null.
|
| |
|
| operator bool () const |
| | Explicit cast to bool returns !null()
|
| |
|
std::string | legible () const |
| | Get a string legibly representing the specifier.
|
| |
|
| static specifier | read (chewer< std::string > &chew) |
| | Attempt to read a specifier from a chewer<std::string>. More...
|
| |
| static size_t | get_at (std::string const &str, size_t off, size_t &i_off, size_t &h_off) |
| | Attempt to detect a specifier from a string position. More...
|
| |
| static size_t | get_ending_at (std::string const &str, size_t off, size_t &i_off, size_t &h_off) |
| | Attempt to detect a specifier ending at a string position. More...
|
| |
|
|
static const size_t | serialized_size = 4 |
| | Serialized size of a substitution specifier.
|
| |
struct paramater_substitution::specifier encapsulates a parameter substitution specifier.
Definition at line 89 of file parameter_substitution.h.
| static size_t parameter_substitution::specifier::get_at |
( |
std::string const & |
str, |
|
|
size_t |
off, |
|
|
size_t & |
i_off, |
|
|
size_t & |
h_off |
|
) |
| |
|
inlinestatic |
Attempt to detect a specifier from a string position.
- Parameters
-
| str | The string to examine. |
| off | The offset in str at which to start. |
| i_off | If a specifier is detected at off in str, receives on return the offset of the specifier's parameter index field. |
| h_off | If a specifier is detected at off in str, receives on return the offset of the specifier's handling field. |
- Returns
off if a specifier is detected, else string::npos.
Definition at line 192 of file parameter_substitution.h.
| static size_t parameter_substitution::specifier::get_ending_at |
( |
std::string const & |
str, |
|
|
size_t |
off, |
|
|
size_t & |
i_off, |
|
|
size_t & |
h_off |
|
) |
| |
|
inlinestatic |
Attempt to detect a specifier ending at a string position.
- Parameters
-
| str | The string to examine. |
| off | The offset in str of the last byte of the presumed specifier |
| i_off | If a specifier is detected ending at off in str, receives on return the offset of the specifier's parameter index field. |
| h_off | If a specifier is detected ending at off in str, receives on return the offset of the specifier's handling field. |
- Returns
off if a specifier is detected, else string::npos.
Definition at line 222 of file parameter_substitution.h.
| static specifier parameter_substitution::specifier::read |
( |
chewer< std::string > & |
chew | ) |
|
|
inlinestatic |
Attempt to read a specifier from a chewer<std::string>.
- Parameters
-
| chew | On entry, a chewer<std::string> positioned at the offset in the associated string from which to scan. On returnchew is positioned to the first offset not consumed if a specifier is read, else is unchanged. |
- Returns
- The specifier read, if any, else the null specifier
Definition at line 166 of file parameter_substitution.h.
The documentation for this struct was generated from the following file: