LLVM  14.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
[legend]
Collaboration diagram for llvm::formatv_object_base:
Collaboration graph
[legend]

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 Optional< ReplacementItemparseReplacementItem (StringRef Spec)
 

Protected Member Functions

 formatv_object_base (StringRef Fmt, ArrayRef< 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< detail::format_adapter * > Adapters
 

Detailed Description

Definition at line 65 of file FormatVariadic.h.

Constructor & Destructor Documentation

◆ formatv_object_base() [1/3]

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

Definition at line 76 of file FormatVariadic.h.

◆ formatv_object_base() [2/3]

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

◆ formatv_object_base() [3/3]

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

Member Function Documentation

◆ consumeFieldLayout()

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

◆ format()

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

◆ operator SmallString< N >()

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

Definition at line 122 of file FormatVariadic.h.

◆ operator std::string()

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

Definition at line 124 of file FormatVariadic.h.

References str().

◆ parseFormatString()

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

Definition at line 144 of file FormatVariadic.cpp.

References llvm::Empty, llvm::StringRef::empty(), Fmt, I, and splitLiteralAndReplacement().

Referenced by format().

◆ parseReplacementItem()

Optional< ReplacementItem > formatv_object_base::parseReplacementItem ( StringRef  Spec)
static

◆ splitLiteralAndReplacement()

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

◆ sstr()

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

Definition at line 115 of file FormatVariadic.h.

◆ str()

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

Definition at line 107 of file FormatVariadic.h.

References llvm::raw_ostream::flush().

Referenced by operator std::string().

Member Data Documentation

◆ Adapters

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

Definition at line 68 of file FormatVariadic.h.

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

◆ Fmt

StringRef llvm::formatv_object_base::Fmt
protected

Definition at line 67 of file FormatVariadic.h.

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


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