|
Open Model Railroad Network (OpenMRN)
|
#include "utils/Buffer.hxx"Go to the source code of this file.
Classes | |
| struct | RawData |
| Container for holding an arbitrary untyped data stream. More... | |
| struct | ByteChunk |
| Holds a reference to a raw buffer, with the start and size information. More... | |
Typedefs | |
| using | RawBuffer = Buffer< RawData > |
| Buffers of this type will be allocated from the rawBufferPool to hold the payloads of untyped data streams. | |
| using | RawBufferPtr = BufferPtr< RawData > |
| Holds a raw buffer. | |
| using | ByteBuffer = Buffer< ByteChunk > |
| Buffer type of references. These are enqueued for byte sinks. | |
| using | ByteBufferPtr = BufferPtr< ByteChunk > |
| Buffer pointer type for references. | |
| using | ByteSink = FlowInterface< ByteBuffer > |
| Interface for sending a stream of data from a source to a sink. | |
Variables | |
| static constexpr unsigned | RAWBUFFER_SIZE = 1024 |
| This is how many bytes we have in each raw buffer allocation. | |
| Pool * | rawBufferPool |
| Use this BufferPool to allocate raw buffers. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Specialization of the Buffer / Pool infrastructure for untyped data stream. See { } Balazs Racz 17 Apr 2022
Definition in file ByteBuffer.hxx.
| using ByteBuffer = Buffer<ByteChunk> |
Buffer type of references. These are enqueued for byte sinks.
Definition at line 186 of file ByteBuffer.hxx.
| using ByteBufferPtr = BufferPtr<ByteChunk> |
Buffer pointer type for references.
Definition at line 188 of file ByteBuffer.hxx.
| using ByteSink = FlowInterface<ByteBuffer> |
Interface for sending a stream of data from a source to a sink.
Definition at line 193 of file ByteBuffer.hxx.
Buffers of this type will be allocated from the rawBufferPool to hold the payloads of untyped data streams.
These buffers are never enqueued into Q or QList objects.
Definition at line 58 of file ByteBuffer.hxx.
| using RawBufferPtr = BufferPtr<RawData> |
Holds a raw buffer.
Definition at line 61 of file ByteBuffer.hxx.
|
staticconstexpr |
This is how many bytes we have in each raw buffer allocation.
Definition at line 42 of file ByteBuffer.hxx.
|
extern |
Use this BufferPool to allocate raw buffers.
Definition at line 38 of file Buffer.cxx.