|
Open Model Railroad Network (OpenMRN)
|
Base class for all QMember types that hold data in an expandable format. More...
#include <Buffer.hxx>
Public Types | |
| typedef T | value_type |
| The type of payload this buffer contains. | |
Public Member Functions | |
| Buffer< T > * | ref () |
| Add another reference to the buffer. | |
| void | unref () |
| Decrement count. | |
| T * | data () |
| get a pointer to the start of the data. | |
Public Member Functions inherited from BufferBase | |
| 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. | |
Private Member Functions | |
| Buffer (Pool *pool) | |
| Constructor. | |
| ~Buffer () | |
| Destructor. | |
| DISALLOW_COPY_AND_ASSIGN (Buffer) | |
Private Attributes | |
| T | data_ |
| user data | |
Friends | |
| class | Pool |
| Allow Pool access to our constructor. | |
| class | DataBuffer |
| Allow DataBuffer access to our constructor. | |
Additional Inherited Members | |
Protected Member Functions inherited from BufferBase | |
| 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 inherited from BufferBase | |
| 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 | |
Base class for all QMember types that hold data in an expandable format.
Definition at line 194 of file Buffer.hxx.
| typedef T Buffer< T >::value_type |
The type of payload this buffer contains.
Definition at line 198 of file Buffer.hxx.
Destructor.
Definition at line 231 of file Buffer.hxx.
|
inline |
get a pointer to the start of the data.
Definition at line 215 of file Buffer.hxx.
Add another reference to the buffer.
Definition at line 203 of file Buffer.hxx.
|
inline |
Decrement count.
Definition at line 675 of file Buffer.hxx.
|
friend |
Allow DataBuffer access to our constructor.
Definition at line 240 of file Buffer.hxx.
|
friend |
Allow Pool access to our constructor.
Definition at line 238 of file Buffer.hxx.
|
private |
user data
Definition at line 243 of file Buffer.hxx.