|
libcosmos
Linux C++ System Programming Library
|
Helper to output a primitive integer as octal in the style of 0o123. More...
#include <formatting.hxx>
Inheritance diagram for cosmos::OctNum< NUM >:Public Member Functions | |
| OctNum (const NUM num, size_t width) | |
Public Member Functions inherited from cosmos::FormattedNumber< NUM > | |
| const FormattedNumber & | showBase (bool yes_no) |
| If a prefix identifier for the number's base should be shown (e.g. 0x for hex, default: yes). | |
| size_t | width () const |
| bool | showBase () const |
| auto | num () const |
| const std::string & | basePrefix () const |
| SetBaseFN | baseFN () const |
| operator std::string () const | |
Additional Inherited Members | |
Protected Types inherited from cosmos::FormattedNumber< NUM > | |
| using | SetBaseFN = std::function<void(std::ostream&)> |
| This function is supposed to apply the desired number base to the stream. | |
Protected Member Functions inherited from cosmos::FormattedNumber< NUM > | |
| FormattedNumber (const NUM num, size_t width, SetBaseFN fn, std::string base_prefix) | |
Protected Attributes inherited from cosmos::FormattedNumber< NUM > | |
| NUM | m_num |
| size_t | m_width = 0 |
| SetBaseFN | m_setbase_fn |
| std::string | m_base_prefix |
| bool | m_show_base = true |
Helper to output a primitive integer as octal in the style of 0o123.
Definition at line 142 of file formatting.hxx.
|
inline |
Definition at line 144 of file formatting.hxx.