xentara-utils v2.0.4
The Xentara Utility Library
|
std::ios related functionality More...
Classes | |
class | Indent |
Automatic object that indents a stream. More... | |
class | ToLocalTime |
Manipulator for inserting time points into std::ostreams as local time. More... | |
Functions | |
Indenting | |
auto | indent (std::ostream &stream) -> std::ostream & |
Manipulator to add the current Indent into a stream. | |
auto | shiftIn (std::ostream &stream) -> std::ostream & |
Manipulator to increase the indent of a stream. | |
auto | shiftOut (std::ostream &stream) -> std::ostream & |
Manipulator to decrease the indent of a stream. | |
Line Parsing | |
template<typename Char , typename Traits > | |
auto | findWord (std::basic_istream< Char, Traits > &stream) -> std::basic_istream< Char, Traits > & |
Manipulator that finds the next word on the line. | |
template<typename Char , typename Traits > | |
auto | skipBlanks (std::basic_istream< Char, Traits > &stream) -> std::basic_istream< Char, Traits > & |
Manipulator that skips blanks. | |
template<typename Char , typename Traits > | |
auto | skipWord (std::basic_istream< Char, Traits > &stream) -> std::basic_istream< Char, Traits > & |
Manipulator that skips a word. | |
template<typename Char , typename Traits > | |
auto | skipLine (std::basic_istream< Char, Traits > &stream) -> std::basic_istream< Char, Traits > & |
Manipulator that skips the rest of the line. | |
Formatting Functions | |
auto | toLocalTime (std::chrono::system_clock::time_point time) -> ToLocalTime |
Creates a manipulator for inserting time points into std::ostreams as local time. | |
auto | toCompactLocalTime (std::chrono::system_clock::time_point time) -> ToLocalTime |
Creates a manipulator for inserting time points into std::ostreams as local time. | |
auto | toIsoLocalTime (std::chrono::system_clock::time_point time) -> ToLocalTime |
Creates a manipulator for inserting time points into std::ostreams as local time. | |
std::ios related functionality
This namespace contains manipulators designed to be used with std::istream and/or std::ostream.
auto xentara::utils::ios::findWord | ( | std::basic_istream< Char, Traits > & | stream | ) | -> std::basic_istream<Char, Traits> & |
Manipulator that finds the next word on the line.
This manipulator looks for the next word on the line by skipping blanks. It will set the fail bit on the stream if there are no more non-blank characters on the current line.
#include <xentara/utils/ios/LineParsing.hpp>
auto xentara::utils::ios::indent | ( | std::ostream & | stream | ) | -> std::ostream & |
Manipulator to add the current Indent into a stream.
#include <xentara/utils/ios/Indent.hpp>
auto xentara::utils::ios::shiftIn | ( | std::ostream & | stream | ) | -> std::ostream & |
Manipulator to increase the indent of a stream.
#include <xentara/utils/ios/Indent.hpp>
auto xentara::utils::ios::shiftOut | ( | std::ostream & | stream | ) | -> std::ostream & |
Manipulator to decrease the indent of a stream.
#include <xentara/utils/ios/Indent.hpp>
auto xentara::utils::ios::skipBlanks | ( | std::basic_istream< Char, Traits > & | stream | ) | -> std::basic_istream<Char, Traits> & |
Manipulator that skips blanks.
This manipulator behaves just like std::ws, but does not skip across the end of the line.
#include <xentara/utils/ios/LineParsing.hpp>
auto xentara::utils::ios::skipLine | ( | std::basic_istream< Char, Traits > & | stream | ) | -> std::basic_istream<Char, Traits> & |
Manipulator that skips the rest of the line.
#include <xentara/utils/ios/LineParsing.hpp>
auto xentara::utils::ios::skipWord | ( | std::basic_istream< Char, Traits > & | stream | ) | -> std::basic_istream<Char, Traits> & |
Manipulator that skips a word.
This manipulator skips the current word by skipping all characters that are not blanks. If no characters are skipped, the fail bit is set.
#include <xentara/utils/ios/LineParsing.hpp>
auto xentara::utils::ios::toCompactLocalTime | ( | std::chrono::system_clock::time_point | time | ) | -> ToLocalTime |
Creates a manipulator for inserting time points into std::ostreams as local time.
The returned manipulator only outputs as much of seconds and fractions of a second as necessary
#include <xentara/utils/ios/toLocalTime.hpp>
time | The time to insert |
auto xentara::utils::ios::toIsoLocalTime | ( | std::chrono::system_clock::time_point | time | ) | -> ToLocalTime |
Creates a manipulator for inserting time points into std::ostreams as local time.
The returned manipulator uses the format YYYY-MM-DDThh:mm:ss.zzzzzzzzz±HH:MM. For a utcOffset of 0, ±HH:MM is replaced with the character “Z”.
#include <xentara/utils/ios/toLocalTime.hpp>
time | The time to insert |
auto xentara::utils::ios::toLocalTime | ( | std::chrono::system_clock::time_point | time | ) | -> ToLocalTime |
Creates a manipulator for inserting time points into std::ostreams as local time.
The returned manipulator always outputs the full time with nanosecond precision
#include <xentara/utils/ios/toLocalTime.hpp>
time | The time to insert |