Owned byte string with the QString-style helpers used for tags and diagnostics.
More...
#include <meshkit/detail/planmodel.hpp>
|
| | Text ()=default |
| |
| | Text (const std::string &v) |
| | Copy a std::string; also serves as an implicit conversion.
|
| |
| bool | isEmpty () const |
| | Return true when the string holds no characters.
|
| |
| template<class T> |
| Text | arg (const T &value) const |
| | Replace the lowest-numbered %1..%9 placeholder with a formatted value.
|
| |
| template<class T, class U> |
| Text | arg (const T &a, const U &b) const |
| | Substitute two values in turn; exactly arg(a).arg(b).
|
| |
Owned byte string with the QString-style helpers used for tags and diagnostics.
A std::string (no encoding is imposed) that adds isEmpty() and %1..%9 placeholder substitution through arg(). Functions such as validate() return an empty Text for success.
◆ Text() [1/2]
| meshkit::plan::Text::Text |
( |
| ) |
|
|
default |
◆ Text() [2/2]
| meshkit::plan::Text::Text |
( |
const std::string & | v | ) |
|
|
inline |
Copy a std::string; also serves as an implicit conversion.
- Parameters
-
◆ arg() [1/2]
template<class T, class U>
| Text meshkit::plan::Text::arg |
( |
const T & | a, |
|
|
const U & | b ) const |
|
inline |
Substitute two values in turn; exactly arg(a).arg(b).
- Parameters
-
| [in] | a | Value for the lowest-numbered placeholder. |
| [in] | b | Value for the lowest-numbered placeholder left after substituting a. |
- Returns
- The substituted copy.
◆ arg() [2/2]
template<class T>
| Text meshkit::plan::Text::arg |
( |
const T & | value | ) |
const |
|
inline |
Replace the lowest-numbered %1..%9 placeholder with a formatted value.
- Parameters
-
| [in] | value | Value written with operator<< to a default-formatted std::ostringstream (a double therefore prints with six significant digits). |
- Returns
- A copy in which every occurrence of the lowest-numbered placeholder present is replaced, or an unchanged copy when there is none. Only one digit is read, so
%10 is %1 followed by 0. Inserted text is not rescanned by this call, but a later arg() call sees any placeholder it contains.
◆ isEmpty()
| bool meshkit::plan::Text::isEmpty |
( |
| ) |
const |
|
inline |
Return true when the string holds no characters.
The documentation for this class was generated from the following file: