|
Open Model Railroad Network (OpenMRN)
|
Abstract base class for all Buffers. More...
#include <Buffer.hxx>
Public Member Functions | |
| uint16_t | references () |
| void | set_done (BarrierNotifiable *done) |
| Specifies that a given BarrierNotifiable must be called when the Buffer is deallocated (unreffed to zero, meaning that all owners have freed it). | |
| BarrierNotifiable * | new_child () |
| Creates a new child notifiable of the current done notifiable. | |
| size_t | size () |
Public Member Functions inherited from QMember | |
| void | init () |
| Initiailize a QMember, in place of a public placement construction. | |
Protected Member Functions | |
| Pool * | pool () |
| Get a pointer to the pool that this buffer belongs to. | |
| BufferBase (size_t size, Pool *pool) | |
| Constructor. | |
| ~BufferBase () | |
| Destructor. | |
| DISALLOW_COPY_AND_ASSIGN (BufferBase) | |
Protected Member Functions inherited from QMember | |
| QMember () | |
| Constructor. | |
| ~QMember () | |
| Destructor. | |
Protected Attributes | |
| Pool * | pool_ |
| Reference to the pool from whence this buffer came. | |
| BarrierNotifiable * | done_ |
| Notifiable to call when the buffer has finished processing everywhere. | |
| uint16_t | size_ |
| size of data in bytes | |
| std::atomic_uint_least16_t | count_ |
| number of references in use | |
Protected Attributes inherited from QMember | |
| QMember * | next |
| pointer to the next member in the queue | |
Friends | |
| class | openlcb::AsyncIfTest |
| class | Pool |
| Allow Pool access to our constructor. | |
| class | DynamicPool |
| Allow DynamicPool access to our constructor. | |
| class | FixedPool |
| Allow FixedPool access to our constructor. | |
| class | LimitedPool |
| Allow LimitedPool access to our fields. | |
| class | DataBufferPool |
| Allow DataBufferPool access to our fields. | |
Abstract base class for all Buffers.
This class contains all shared components that are not template-dependent.
Definition at line 84 of file Buffer.hxx.
|
inlineprotected |
Constructor.
Initializes count to 1 and done_ to NULL.
| size | size of buffer data |
| pool | pool this buffer belong to |
Definition at line 152 of file Buffer.hxx.
|
inlineprotected |
Destructor.
Definition at line 163 of file Buffer.hxx.
|
inline |
Creates a new child notifiable of the current done notifiable.
Definition at line 108 of file Buffer.hxx.
|
inlineprotected |
Get a pointer to the pool that this buffer belongs to.
Definition at line 130 of file Buffer.hxx.
|
inline |
Definition at line 89 of file Buffer.hxx.
|
inline |
Specifies that a given BarrierNotifiable must be called when the Buffer is deallocated (unreffed to zero, meaning that all owners have freed it).
| done | is the notifiable to call. |
Definition at line 97 of file Buffer.hxx.
|
inline |
Definition at line 121 of file Buffer.hxx.
|
friend |
Allow DataBufferPool access to our fields.
Definition at line 187 of file Buffer.hxx.
|
friend |
Allow DynamicPool access to our constructor.
Definition at line 178 of file Buffer.hxx.
|
friend |
Allow FixedPool access to our constructor.
Definition at line 181 of file Buffer.hxx.
|
friend |
Allow LimitedPool access to our fields.
Definition at line 184 of file Buffer.hxx.
|
friend |
Definition at line 172 of file Buffer.hxx.
|
friend |
Allow Pool access to our constructor.
Definition at line 175 of file Buffer.hxx.
|
protected |
number of references in use
Definition at line 146 of file Buffer.hxx.
|
protected |
Notifiable to call when the buffer has finished processing everywhere.
May be nullptr.
Definition at line 140 of file Buffer.hxx.
|
protected |
Reference to the pool from whence this buffer came.
Definition at line 136 of file Buffer.hxx.
|
protected |
size of data in bytes
Definition at line 143 of file Buffer.hxx.