jaulib v1.4.1-10-ga2c96e0
Jau Support Library (C++, Java, ..)
Loading...
Searching...
No Matches
jau::cfmt::StringOutput Class Reference

A std::string OutputType for runtime formatting into a std::string. More...

#include <string_cfmt.hpp>

Collaboration diagram for jau::cfmt::StringOutput:

Public Member Functions

 StringOutput (std::size_t maxLen, std::string &s) noexcept
 
void appendError (ssize_t argIdx, int line, const std::string_view tag) noexcept
 
template<typename T>
requires jau::req::string_literal<T> || jau::req::string_class<T>
void appendFormatted (const FormatOpts &opts, const T &v) noexcept
 
template<typename T>
requires jau::req::char_pointer<T>
void appendFormatted (const FormatOpts &opts, const T &v) noexcept
 
template<typename T>
requires jau::req::boolean<T>
void appendFormatted (const FormatOpts &opts, const T &v) noexcept
 
template<typename T>
requires jau::req::pointer<T> && (!jau::req::string_alike<T>)
void appendFormatted (const FormatOpts &opts, const T &v) noexcept
 
template<typename T>
requires std::is_integral_v<T> && (!jau::req::boolean<T>)
void appendFormatted (const FormatOpts &opts, const T &v) noexcept
 
template<typename T>
requires std::is_floating_point_v<T>
void appendFormatted (const FormatOpts &opts, const T &v) noexcept
 
void appendText (const std::string_view v) noexcept
 
constexpr bool fits (size_t n) const noexcept
 
std::string_view get () const noexcept
 
constexpr size_t maxLen () const noexcept
 

Detailed Description

A std::string OutputType for runtime formatting into a std::string.

Definition at line 1207 of file string_cfmt.hpp.

Constructor & Destructor Documentation

◆ StringOutput()

jau::cfmt::StringOutput::StringOutput ( std::size_t maxLen,
std::string & s )
inlinenoexcept

Definition at line 1213 of file string_cfmt.hpp.

Member Function Documentation

◆ maxLen()

size_t jau::cfmt::StringOutput::maxLen ( ) const
inlineconstexprnoexcept

Definition at line 1215 of file string_cfmt.hpp.

Here is the caller graph for this function:

◆ fits()

bool jau::cfmt::StringOutput::fits ( size_t n) const
inlineconstexprnoexcept

Definition at line 1216 of file string_cfmt.hpp.

Here is the caller graph for this function:

◆ get()

std::string_view jau::cfmt::StringOutput::get ( ) const
inlinenoexcept

Definition at line 1218 of file string_cfmt.hpp.

◆ appendFormatted() [1/6]

template<typename T>
requires jau::req::string_literal<T> || jau::req::string_class<T>
void jau::cfmt::StringOutput::appendFormatted ( const FormatOpts & opts,
const T & v )
inlinenoexcept

Definition at line 1222 of file string_cfmt.hpp.

◆ appendFormatted() [2/6]

template<typename T>
requires jau::req::char_pointer<T>
void jau::cfmt::StringOutput::appendFormatted ( const FormatOpts & opts,
const T & v )
inlinenoexcept

Definition at line 1233 of file string_cfmt.hpp.

◆ appendFormatted() [3/6]

template<typename T>
requires jau::req::boolean<T>
void jau::cfmt::StringOutput::appendFormatted ( const FormatOpts & opts,
const T & v )
inlinenoexcept

Definition at line 1248 of file string_cfmt.hpp.

◆ appendFormatted() [4/6]

template<typename T>
requires jau::req::pointer<T> && (!jau::req::string_alike<T>)
void jau::cfmt::StringOutput::appendFormatted ( const FormatOpts & opts,
const T & v )
inlinenoexcept

Definition at line 1259 of file string_cfmt.hpp.

◆ appendFormatted() [5/6]

template<typename T>
requires std::is_integral_v<T> && (!jau::req::boolean<T>)
void jau::cfmt::StringOutput::appendFormatted ( const FormatOpts & opts,
const T & v )
inlinenoexcept

Definition at line 1275 of file string_cfmt.hpp.

◆ appendFormatted() [6/6]

template<typename T>
requires std::is_floating_point_v<T>
void jau::cfmt::StringOutput::appendFormatted ( const FormatOpts & opts,
const T & v )
inlinenoexcept

Definition at line 1286 of file string_cfmt.hpp.

◆ appendText()

void jau::cfmt::StringOutput::appendText ( const std::string_view v)
inlinenoexcept

Definition at line 1302 of file string_cfmt.hpp.

◆ appendError()

void jau::cfmt::StringOutput::appendError ( ssize_t argIdx,
int line,
const std::string_view tag )
inlinenoexcept

Definition at line 1313 of file string_cfmt.hpp.


The documentation for this class was generated from the following file: