LLVM  8.0.1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::format_object_base Class Referenceabstract

This is a helper class used for handling formatted output. More...

#include "llvm/Support/Format.h"

Inheritance diagram for llvm::format_object_base:
Inheritance graph
[legend]
Collaboration diagram for llvm::format_object_base:
Collaboration graph
[legend]

Public Member Functions

 format_object_base (const char *fmt)
 
unsigned print (char *Buffer, unsigned BufferSize) const
 Format the object into the specified buffer. More...
 

Protected Member Functions

 ~format_object_base ()=default
 
 format_object_base (const format_object_base &)=default
 
virtual void home ()
 
virtual int snprint (char *Buffer, unsigned BufferSize) const =0
 Call snprintf() for this object, on the given buffer and size. More...
 

Protected Attributes

const charFmt
 

Detailed Description

This is a helper class used for handling formatted output.

It is the abstract base class of a templated derived class.

Definition at line 38 of file Format.h.

Constructor & Destructor Documentation

◆ ~format_object_base()

llvm::format_object_base::~format_object_base ( )
protecteddefault

◆ format_object_base() [1/2]

llvm::format_object_base::format_object_base ( const format_object_base )
protecteddefault

◆ format_object_base() [2/2]

llvm::format_object_base::format_object_base ( const char fmt)
inline

Definition at line 49 of file Format.h.

Member Function Documentation

◆ home()

void format_object_base::home ( )
protectedvirtual

Definition at line 494 of file raw_ostream.cpp.

◆ print()

unsigned llvm::format_object_base::print ( char Buffer,
unsigned  BufferSize 
) const
inline

Format the object into the specified buffer.

On success, this returns the length of the formatted string. If the buffer is too small, this returns a length to retry with, which will be larger than BufferSize.

Definition at line 54 of file Format.h.

References assert(), N, and snprint().

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

◆ snprint()

virtual int llvm::format_object_base::snprint ( char Buffer,
unsigned  BufferSize 
) const
protectedpure virtual

Call snprintf() for this object, on the given buffer and size.

Implemented in llvm::format_object< Ts >.

Referenced by print().

Member Data Documentation

◆ Fmt

const char* llvm::format_object_base::Fmt
protected

Definition at line 40 of file Format.h.

Referenced by llvm::format().


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