![]() |
Scanframe Modular Application 0.1.0
|
Class implements a formater like QString from Qt. More...
#include <Formatter.h>
Public Member Functions | |
| Formatter (const std::string &fmt) | |
| Constructor takes a const reference to a std::string. | |
| Formatter (const Formatter &other) | |
| Copy constructor. | |
| Formatter (Formatter &&other) noexcept | |
| Move constructor. | |
| Formatter & | operator= (const Formatter &other) |
| Assignment operator. | |
| Formatter & | operator= (Formatter &&other) noexcept |
| Move assignment operator. | |
| Formatter & | arg (const std::string &arg, int width=0) |
| Argument to string formatter. | |
| Formatter & | arg (const char *arg, int width=0) |
| Argument to string formatter. | |
| Formatter & | arg (int arg, int width=0) |
| Argument to string formatter. | |
| Formatter & | arg (unsigned int arg, int width=0) |
| Argument to string formatter. | |
| Formatter & | arg (long arg, int width=0) |
| Argument to string formatter. | |
| Formatter & | arg (unsigned long arg, int width=0) |
| Argument to string formatter. | |
| Formatter & | arg (long long arg, int width=0) |
| Argument to string formatter. | |
| Formatter & | arg (unsigned long long arg, int width=0) |
| Argument to string formatter. | |
| Formatter & | arg (float arg, int width=0, int precision=std::numeric_limits< int >::max()) |
| Argument to string formatter. | |
| Formatter & | arg (double arg, int width=0, int precision=std::numeric_limits< int >::max()) |
| Argument to string formatter. | |
| std::string | str () const |
| Gets the assembled std::string class. | |
| operator std::string () const | |
| Operator calling str() method. | |
Class implements a formater like QString from Qt.
|
explicit |
Constructor takes a const reference to a std::string.
| fmt | Format string. |
| sf::Formatter::Formatter | ( | const Formatter & | other | ) |
Copy constructor.
| other |
|
noexcept |
Move constructor.
| Formatter & sf::Formatter::arg | ( | const char * | arg, |
| int | width = 0 |
||
| ) |
Argument to string formatter.
| arg | String value. |
| width | Left align to this width. |
| Formatter & sf::Formatter::arg | ( | const std::string & | arg, |
| int | width = 0 |
||
| ) |
Argument to string formatter.
| arg | String value. |
| width | Left align to this width. |
| Formatter & sf::Formatter::arg | ( | double | arg, |
| int | width = 0, |
||
| int | precision = std::numeric_limits< int >::max() |
||
| ) |
Argument to string formatter.
| arg | Double value. |
| width | Right align to this width. |
| precision | See toStringPrecision() |
| Formatter & sf::Formatter::arg | ( | float | arg, |
| int | width = 0, |
||
| int | precision = std::numeric_limits< int >::max() |
||
| ) |
Argument to string formatter.
| arg | Float value. |
| width | Right align to this width. |
| precision | See toStringPrecision() |
| Formatter & sf::Formatter::arg | ( | int | arg, |
| int | width = 0 |
||
| ) |
Argument to string formatter.
| arg | Integer value. |
| width | Right align to this width. |
| Formatter & sf::Formatter::arg | ( | long | arg, |
| int | width = 0 |
||
| ) |
Argument to string formatter.
| arg | Integer value. |
| width | Right align to this width. |
| Formatter & sf::Formatter::arg | ( | long long | arg, |
| int | width = 0 |
||
| ) |
Argument to string formatter.
| arg | Integer value. |
| width | Right align to this width. |
| Formatter & sf::Formatter::arg | ( | unsigned int | arg, |
| int | width = 0 |
||
| ) |
Argument to string formatter.
| arg | Integer value. |
| width | Right align to this width. |
| Formatter & sf::Formatter::arg | ( | unsigned long | arg, |
| int | width = 0 |
||
| ) |
Argument to string formatter.
| arg | Integer value. |
| width | Right align to this width. |
| Formatter & sf::Formatter::arg | ( | unsigned long long | arg, |
| int | width = 0 |
||
| ) |
Argument to string formatter.
| arg | Integer value. |
| width | Right align to this width. |
| sf::Formatter::operator std::string | ( | ) | const |
Operator calling str() method.
| std::string sf::Formatter::str | ( | ) | const |
Gets the assembled std::string class.