WPILibC++ 2027.0.0-alpha-3
Loading...
Searching...
No Matches
wpi::raw_uv_ostream Class Reference

raw_ostream style output to a SmallVector of uv::Buffer buffers. More...

#include <wpinet/raw_uv_ostream.h>

Inheritance diagram for wpi::raw_uv_ostream:

Public Member Functions

 raw_uv_ostream (SmallVectorImpl< uv::Buffer > &bufs, size_t allocSize)
 Construct a new raw_uv_ostream.
 
 raw_uv_ostream (SmallVectorImpl< uv::Buffer > &bufs, std::function< uv::Buffer()> alloc)
 Construct a new raw_uv_ostream.
 
 ~raw_uv_ostream () override=default
 
std::span< uv::Bufferbufs ()
 Returns an span to the buffers.
 
void flush ()=delete
 
void reset ()
 Resets the amount of allocated space.
 

Detailed Description

raw_ostream style output to a SmallVector of uv::Buffer buffers.

Fixed-size buffers are allocated and appended as necessary to fit the data being output. The SmallVector need not be empty at start.

Constructor & Destructor Documentation

◆ raw_uv_ostream() [1/2]

wpi::raw_uv_ostream::raw_uv_ostream ( SmallVectorImpl< uv::Buffer > & bufs,
size_t allocSize )
inline

Construct a new raw_uv_ostream.

Parameters
bufsBuffers vector. NOT cleared on construction.
allocSizeSize to allocate for each buffer; allocation will be performed using Buffer::Allocate().

◆ raw_uv_ostream() [2/2]

wpi::raw_uv_ostream::raw_uv_ostream ( SmallVectorImpl< uv::Buffer > & bufs,
std::function< uv::Buffer()> alloc )
inline

Construct a new raw_uv_ostream.

Parameters
bufsBuffers vector. NOT cleared on construction.
allocAllocator.

◆ ~raw_uv_ostream()

wpi::raw_uv_ostream::~raw_uv_ostream ( )
overridedefault

Member Function Documentation

◆ bufs()

std::span< uv::Buffer > wpi::raw_uv_ostream::bufs ( )
inline

Returns an span to the buffers.

◆ flush()

void wpi::raw_uv_ostream::flush ( )
delete

◆ reset()

void wpi::raw_uv_ostream::reset ( )
inline

Resets the amount of allocated space.


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