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

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

#include <string_cfmt.hpp>

Collaboration diagram for jau::cfmt::impl::StringOutput:

Public Member Functions

 StringOutput (std::size_t maxLen, std::string &s) noexcept
 
void appendError (size_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_floating_point_v<T>
void appendFormattedFloat (const FormatOpts &opts, const T &v, nsize_t floatSize) noexcept
 
template<typename T>
requires jau::req::unsigned_integral<T> && (!jau::req::boolean<T>)
void appendFormattedInt (const FormatOpts &opts, const T &v, bool negative) 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 629 of file string_cfmt.hpp.

Constructor & Destructor Documentation

◆ StringOutput()

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

Definition at line 635 of file string_cfmt.hpp.

Member Function Documentation

◆ maxLen()

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

Definition at line 637 of file string_cfmt.hpp.

Here is the caller graph for this function:

◆ fits()

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

Definition at line 638 of file string_cfmt.hpp.

Here is the caller graph for this function:

◆ get()

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

Definition at line 640 of file string_cfmt.hpp.

◆ appendFormatted() [1/4]

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

Definition at line 644 of file string_cfmt.hpp.

◆ appendFormatted() [2/4]

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

Definition at line 655 of file string_cfmt.hpp.

◆ appendFormatted() [3/4]

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

Definition at line 670 of file string_cfmt.hpp.

◆ appendFormatted() [4/4]

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

Definition at line 681 of file string_cfmt.hpp.

◆ appendFormattedInt()

template<typename T>
requires jau::req::unsigned_integral<T> && (!jau::req::boolean<T>)
void jau::cfmt::impl::StringOutput::appendFormattedInt ( const FormatOpts & opts,
const T & v,
bool negative )
inlinenoexcept

Definition at line 697 of file string_cfmt.hpp.

◆ appendFormattedFloat()

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

Definition at line 708 of file string_cfmt.hpp.

◆ appendText()

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

Definition at line 724 of file string_cfmt.hpp.

◆ appendError()

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

Definition at line 735 of file string_cfmt.hpp.


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