LLVM 19.0.0git
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
llvm::formatv_object_base Class Reference

#include "llvm/Support/FormatVariadic.h"

Inheritance diagram for llvm::formatv_object_base:
Inheritance graph

Public Member Functions

void format (raw_ostream &S) const
std::string str () const
template<unsigned N>
SmallString< Nsstr () const
template<unsigned N>
 operator SmallString< N > () const
 operator std::string () const

Static Public Member Functions

static SmallVector< ReplacementItem, 2 > parseFormatString (StringRef Fmt)
static std::optional< ReplacementItemparseReplacementItem (StringRef Spec)

Protected Member Functions

 formatv_object_base (StringRef Fmt, ArrayRef< support::detail::format_adapter * > Adapters)
 formatv_object_base (formatv_object_base const &rhs)=delete
 formatv_object_base (formatv_object_base &&rhs)=default

Static Protected Member Functions

static bool consumeFieldLayout (StringRef &Spec, AlignStyle &Where, size_t &Align, char &Pad)
static std::pair< ReplacementItem, StringRefsplitLiteralAndReplacement (StringRef Fmt)

Protected Attributes

StringRef Fmt
ArrayRef< support::detail::format_adapter * > Adapters

Detailed Description

Definition at line 66 of file FormatVariadic.h.

Constructor & Destructor Documentation

◆ formatv_object_base() [1/3]

llvm::formatv_object_base::formatv_object_base ( StringRef  Fmt,
ArrayRef< support::detail::format_adapter * >  Adapters 

Definition at line 77 of file FormatVariadic.h.

◆ formatv_object_base() [2/3]

llvm::formatv_object_base::formatv_object_base ( formatv_object_base const rhs)

◆ formatv_object_base() [3/3]

llvm::formatv_object_base::formatv_object_base ( formatv_object_base &&  rhs)

Member Function Documentation

◆ consumeFieldLayout()

bool formatv_object_base::consumeFieldLayout ( StringRef Spec,
AlignStyle Where,
size_t &  Align,
char Pad 

Definition at line 28 of file FormatVariadic.cpp.

References llvm::Failed(), llvm::Right, and translateLocChar().

Referenced by parseReplacementItem().

◆ format()

void llvm::formatv_object_base::format ( raw_ostream S) const

Definition at line 85 of file FormatVariadic.h.

References Adapters, llvm::Empty, Fmt, llvm::Literal, and parseFormatString().

Referenced by llvm::raw_ostream::operator<<().

◆ operator SmallString< N >()

template<unsigned N>
llvm::formatv_object_base::operator SmallString< N > ( ) const

Definition at line 123 of file FormatVariadic.h.

◆ operator std::string()

llvm::formatv_object_base::operator std::string ( ) const

Definition at line 125 of file FormatVariadic.h.

References str().

◆ parseFormatString()

SmallVector< ReplacementItem, 2 > formatv_object_base::parseFormatString ( StringRef  Fmt)

◆ parseReplacementItem()

std::optional< ReplacementItem > formatv_object_base::parseReplacementItem ( StringRef  Spec)

◆ splitLiteralAndReplacement()

std::pair< ReplacementItem, StringRef > formatv_object_base::splitLiteralAndReplacement ( StringRef  Fmt)

◆ sstr()

template<unsigned N>
SmallString< N > llvm::formatv_object_base::sstr ( ) const

Definition at line 116 of file FormatVariadic.h.

◆ str()

std::string llvm::formatv_object_base::str ( ) const

Definition at line 108 of file FormatVariadic.h.

References llvm::raw_ostream::flush().

Referenced by operator std::string().

Member Data Documentation

◆ Adapters

ArrayRef<support::detail::format_adapter *> llvm::formatv_object_base::Adapters

Definition at line 69 of file FormatVariadic.h.

Referenced by format(), and llvm::formatv_object< Tuple >::formatv_object().

◆ Fmt

StringRef llvm::formatv_object_base::Fmt

Definition at line 68 of file FormatVariadic.h.

Referenced by format(), parseFormatString(), and splitLiteralAndReplacement().

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