|
VLink
2.0.0
A high-performance communication middleware
|
Allocation-light std::ostream backed by a growable string buffer.
More...
Go to the source code of this file.
Classes | |
| class | vlink::FastStream |
Logger-friendly std::ostream with a custom growable string buffer. More... | |
Namespaces | |
| vlink | |
Allocation-light std::ostream backed by a growable string buffer.
FastStream is the zero-copy log assembly buffer used inside the VLink logger. Inheriting from std::ostream means every operator<< overload and manipulator works unchanged; the difference lies in the StringBuf backing storage and in take_view, which yields a std::string_view directly into the buffer for hand-off to the active sink without an intermediate copy.
| Operation | Source | Notes |
|---|---|---|
operator<< | std::ostream interface | All integral, floating, pointer types |
| Standard manipulators | std::ios_base::fmtflags etc. | std::hex, std::setw, std::setfill, ... |
write_raw | direct buffer write | Bypasses locale and format flags |
append_to | append current contents | Does not reset the buffer |
take_view | hand-off as string_view | View invalidated by the next write |
| Stage | Capacity |
|---|---|
| Initial | kDefaultCapacity (256) |
| Doubling | until kMaxExpandSize (8192) |
| Linear increments | kMaxExpandSize step thereafter |
FastStream per thread via thread_local. Views returned by take_view become invalid on the next stream operation or reset.