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

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

#include <wpi/net/raw_uv_ostream.hpp>

Inheritance diagram for wpi::net::raw_uv_ostream:

Public Member Functions

 raw_uv_ostream (wpi::util::SmallVectorImpl< uv::Buffer > &bufs, size_t allocSize)
 Construct a new raw_uv_ostream.
 raw_uv_ostream (wpi::util::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

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

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

Constructor & Destructor Documentation

◆ raw_uv_ostream() [1/2]

wpi::net::raw_uv_ostream::raw_uv_ostream ( wpi::util::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::net::raw_uv_ostream::raw_uv_ostream ( wpi::util::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::net::raw_uv_ostream::~raw_uv_ostream ( )
overridedefault

Member Function Documentation

◆ bufs()

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

Returns an span to the buffers.

◆ flush()

void wpi::net::raw_uv_ostream::flush ( )
delete

◆ reset()

void wpi::net::raw_uv_ostream::reset ( )
inline

Resets the amount of allocated space.


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