|
LibSWOC++ 1.5.14
Solid Wall of C++
|
#include <BufferWriter.h>


Public Member Functions | |
| LocalBufferWriter () noexcept | |
| Construct an empty writer. | |
| LocalBufferWriter (const LocalBufferWriter &that)=delete | |
| LocalBufferWriter & | operator= (const LocalBufferWriter &that)=delete |
Public Member Functions inherited from swoc::FixedBufferWriter | |
| FixedBufferWriter (char *buffer, size_t capacity) | |
| FixedBufferWriter (MemSpan< void > const &span) | |
| Construct using the memory span as the buffer. | |
| FixedBufferWriter (MemSpan< char > const &span) | |
| Construct using the memory span as the buffer. | |
| FixedBufferWriter (std::nullptr_t) | |
| FixedBufferWriter (const FixedBufferWriter &)=delete | |
| FixedBufferWriter & | operator= (const FixedBufferWriter &)=delete |
| FixedBufferWriter (FixedBufferWriter &&that) | |
| Move constructor. | |
| FixedBufferWriter & | operator= (FixedBufferWriter &&that) |
| Move assignment. | |
| self_type & | assign (MemSpan< char > const &span) |
| Reset buffer. | |
| FixedBufferWriter & | write (char c) override |
| Write a single character c to the buffer. | |
| FixedBufferWriter & | write (const void *data, size_t length) override |
| Write length bytes, starting at data, to the buffer. | |
| const char * | data () const override |
| Return the output buffer. | |
| bool | error () const override |
| char * | aux_data () override |
| size_t | capacity () const override |
| Get the total capacity of the output buffer. | |
| size_t | extent () const override |
| Get the total output sent to the writer. | |
| bool | commit (size_t n) override |
| Advance the used part of the output buffer. | |
| self_type & | discard (size_t n) override |
| Drop n characters from the end of the buffer. | |
| self_type & | restrict (size_t n) override |
| Reduce the capacity by n. | |
| self_type & | restore (size_t n) override |
| Restore n bytes of the capacity. | |
| FixedBufferWriter & | copy (size_t dst, size_t src, size_t n) override |
| Copy data in the buffer. | |
| self_type & | clear () |
| self_type & | detach () |
| swoc::TextView | view () const |
| operator std::string_view () const | |
Provide a string_view of all successfully written characters as a user conversion. | |
| operator swoc::TextView () const | |
Provide a string_view of all successfully written characters as a user conversion. | |
| std::ostream & | operator>> (std::ostream &stream) const override |
| Output the buffer contents to the stream. | |
| BufferWriter & | write (MemSpan< void const > span) |
Public Member Functions inherited from swoc::BufferWriter | |
| BufferWriter & | write (MemSpan< void const > span) |
| size_t | size () const |
| size_t | remaining () const |
| MemSpan< char > | aux_span () |
| template<typename... Args> | |
| BufferWriter & | print (const TextView &fmt, Args &&...args) |
| template<typename... Args> | |
| BufferWriter & | print_v (const TextView &fmt, const std::tuple< Args... > &args) |
| template<typename... Args> | |
| BufferWriter & | print (const bwf::Format &fmt, Args &&...args) |
| template<typename... Args> | |
| BufferWriter & | print_v (const bwf::Format &fmt, const std::tuple< Args... > &args) |
| template<typename Binding, typename Extractor> | |
| BufferWriter & | print_nfv (Binding &&names, Extractor &&ex, bwf::ArgPack const &args) |
| template<typename Binding, typename Extractor> | |
| BufferWriter & | print_nfv (Binding const &names, Extractor &&ex) |
| template<typename Binding> | |
| BufferWriter & | print_n (Binding const &names, TextView const &fmt) |
| template<typename T> | |
| BufferWriter & | format (bwf::Spec const &spec, T &&t) |
| template<typename T> | |
| BufferWriter & | format (bwf::Spec const &spec, T const &t) |
Protected Attributes | |
| char | _arr [N] |
| output buffer. | |
Protected Attributes inherited from swoc::FixedBufferWriter | |
| char *const | _buffer |
| Output buffer. | |
| size_t | _capacity |
| Size of output buffer. | |
| size_t | _attempted = 0 |
| Number of characters written, including those discarded due error condition. | |
Additional Inherited Members | |
Protected Member Functions inherited from swoc::FixedBufferWriter | |
| FixedBufferWriter (char *buffer, size_t capacity, bool noexcept_flag) noexcept | |
A BufferWriter that has an internal buffer.
| N | Number of bytes in internal buffer. |
The buffer is part of the class instance and is therefore allocated from the same memory pool as the object. E.g, if this is declared as a local variable the buffer is on the stack.
This was written to make code such as
simpler as
This also makes it possible to use inside expressions and other stream operations without concern about having to previously declare the storage. E.g.
Definition at line 440 of file BufferWriter.h.
|
noexcept |
Construct an empty writer.
Definition at line 655 of file BufferWriter.h.
|
protected |
output buffer.
Definition at line 453 of file BufferWriter.h.