LLVM API Documentation

llvm::format_object_base Class Reference

#include <Format.h>

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

List of all members.

Public Member Functions

 format_object_base (const char *fmt)
virtual ~format_object_base ()
unsigned print (char *Buffer, unsigned BufferSize) const

Protected Member Functions

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

Protected Attributes

const char * Fmt


Detailed Description

format_object_base - This is a helper class used for handling formatted output. It is the abstract base class of a templated derived class.

Definition at line 35 of file Format.h.


Constructor & Destructor Documentation

llvm::format_object_base::format_object_base ( const char *  fmt  )  [inline]

Definition at line 44 of file Format.h.

virtual llvm::format_object_base::~format_object_base (  )  [inline, virtual]

Definition at line 45 of file Format.h.


Member Function Documentation

void format_object_base::home (  )  [protected, virtual]

Definition at line 297 of file raw_ostream.cpp.

virtual int llvm::format_object_base::snprint ( char *  Buffer,
unsigned  BufferSize 
) const [protected, pure virtual]

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

Implemented in llvm::format_object1< T >, llvm::format_object2< T1, T2 >, and llvm::format_object3< T1, T2, T3 >.

Referenced by print().

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

print - 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 50 of file Format.h.

References snprint().

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


Member Data Documentation

const char* llvm::format_object_base::Fmt [protected]


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