LLVM  7.0.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
OutputStream Class Reference

#include "Demangle/Utility.h"

Collaboration diagram for OutputStream:
[legend]

Public Member Functions

 OutputStream (char *StartBuf, size_t Size)
 
 OutputStream ()=default
 
void reset (char *Buffer_, size_t BufferCapacity_)
 
OutputStream & operator+= (StringView R)
 
OutputStream & operator+= (char C)
 
OutputStream & operator<< (StringView R)
 
OutputStream & operator<< (char C)
 
OutputStream & operator<< (long long N)
 
OutputStream & operator<< (unsigned long long N)
 
OutputStream & operator<< (long N)
 
OutputStream & operator<< (unsigned long N)
 
OutputStream & operator<< (int N)
 
OutputStream & operator<< (unsigned int N)
 
size_t getCurrentPosition () const
 
void setCurrentPosition (size_t NewPos)
 
char back () const
 
bool empty () const
 
char * getBuffer ()
 
char * getBufferEnd ()
 
size_t getBufferCapacity ()
 

Static Public Member Functions

static OutputStream create (char *StartBuf, size_t *Size, size_t AllocSize)
 Create an OutputStream from a buffer and a size. More...
 

Public Attributes

unsigned CurrentPackIndex = std::numeric_limits<unsigned>::max()
 If a ParameterPackExpansion (or similar type) is encountered, the offset into the pack that we're currently printing. More...
 
unsigned CurrentPackMax = std::numeric_limits<unsigned>::max()
 

Detailed Description

Definition at line 25 of file Utility.h.

Constructor & Destructor Documentation

◆ OutputStream() [1/2]

OutputStream::OutputStream ( char *  StartBuf,
size_t  Size 
)
inline

Definition at line 64 of file Utility.h.

References OutputStream().

◆ OutputStream() [2/2]

OutputStream::OutputStream ( )
default

Referenced by OutputStream().

Member Function Documentation

◆ back()

char OutputStream::back ( ) const
inline

Definition at line 146 of file Utility.h.

Referenced by outputSpaceIfNecessary().

◆ create()

static OutputStream OutputStream::create ( char *  StartBuf,
size_t *  Size,
size_t  AllocSize 
)
inlinestatic

Create an OutputStream from a buffer and a size.

If either of these are null a buffer is allocated.

Definition at line 75 of file Utility.h.

References reset(), and Result.

Referenced by llvm::microsoftDemangle(), and outputName().

◆ empty()

bool OutputStream::empty ( ) const
inline

Definition at line 150 of file Utility.h.

Referenced by outputSpaceIfNecessary().

◆ getBuffer()

char* OutputStream::getBuffer ( )
inline

◆ getBufferCapacity()

size_t OutputStream::getBufferCapacity ( )
inline

Definition at line 154 of file Utility.h.

◆ getBufferEnd()

char* OutputStream::getBufferEnd ( )
inline

Definition at line 153 of file Utility.h.

◆ getCurrentPosition()

size_t OutputStream::getCurrentPosition ( ) const
inline

◆ operator+=() [1/2]

OutputStream& OutputStream::operator+= ( StringView  R)
inline

◆ operator+=() [2/2]

OutputStream& OutputStream::operator+= ( char  C)
inline

Definition at line 104 of file Utility.h.

References C.

◆ operator<<() [1/8]

OutputStream& OutputStream::operator<< ( StringView  R)
inline

Definition at line 110 of file Utility.h.

◆ operator<<() [2/8]

OutputStream& OutputStream::operator<< ( char  C)
inline

Definition at line 112 of file Utility.h.

◆ operator<<() [3/8]

OutputStream& OutputStream::operator<< ( long long  N)
inline

Definition at line 114 of file Utility.h.

◆ operator<<() [4/8]

OutputStream& OutputStream::operator<< ( unsigned long long  N)
inline

Definition at line 122 of file Utility.h.

◆ operator<<() [5/8]

OutputStream& OutputStream::operator<< ( long  N)
inline

Definition at line 127 of file Utility.h.

References N.

◆ operator<<() [6/8]

OutputStream& OutputStream::operator<< ( unsigned long  N)
inline

Definition at line 131 of file Utility.h.

References N.

◆ operator<<() [7/8]

OutputStream& OutputStream::operator<< ( int  N)
inline

Definition at line 135 of file Utility.h.

References N.

◆ operator<<() [8/8]

OutputStream& OutputStream::operator<< ( unsigned int  N)
inline

Definition at line 139 of file Utility.h.

References N.

◆ reset()

void OutputStream::reset ( char *  Buffer_,
size_t  BufferCapacity_ 
)
inline

Definition at line 67 of file Utility.h.

Referenced by create().

◆ setCurrentPosition()

void OutputStream::setCurrentPosition ( size_t  NewPos)
inline

Definition at line 144 of file Utility.h.

Member Data Documentation

◆ CurrentPackIndex

unsigned OutputStream::CurrentPackIndex = std::numeric_limits<unsigned>::max()

If a ParameterPackExpansion (or similar type) is encountered, the offset into the pack that we're currently printing.

Definition at line 91 of file Utility.h.

◆ CurrentPackMax

unsigned OutputStream::CurrentPackMax = std::numeric_limits<unsigned>::max()

Definition at line 92 of file Utility.h.


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