Alchemy
1.0
A framework to robustly process network messages and structured data
|
Storage Policy implementation for fixed-size memory buffers. More...
#include <static_storage_policy.h>
Inherits integral_constant< bool, IsBufferedT >.
Static Public Member Functions | |
static s_pointer | allocate (size_t size) |
Not Implemented. This is a fixed-size static storage policy;. More... | |
static void | deallocate (s_pointer &spBuffer) |
Not Implemented. This is a fixed-size static storage policy. | |
static bool | read (const_pointer pBuffer, void *pStorage, size_t size, std::ptrdiff_t offset) |
Performs a storage read operation for this policy. More... | |
static bool | write (pointer pBuffer, const void *pStorage, size_t size, std::ptrdiff_t offset) |
Performs a storage write operation for this policy. More... | |
Storage Policy implementation for fixed-size memory buffers.
IsBufferedT | Indicates if the StoragePolicy desires data to be buffered, or accessed on demand. |
Note: The policy itself is not responsible, and does not buffer the data. It is an indication to users of the policy, for how the best way to access the storage memory.
For example, storage policies developed to interface directly with hardware mapped memory access would indicate not to be buffered. However, a network packet buffer, which can vary in size between calls would indicate buffering is preferred.
Definition at line 34 of file static_storage_policy.h.
|
inlinestatic |
Not Implemented. This is a fixed-size static storage policy;.
Definition at line 50 of file static_storage_policy.h.
|
inlinestatic |
Performs a storage read operation for this policy.
sp_buffer | A shared pointer to a buffer previously allocated by this storage policies Allocate member function. |
p_storage | The source memory buffer to read from. |
size | The number of elements read from the buffer. |
offset | A starting offset from the beginning of the specified read/write buffer. |
Definition at line 78 of file static_storage_policy.h.
|
inlinestatic |
Performs a storage write operation for this policy.
sp_buffer | A shared pointer to a buffer previously allocated by this storage policies Allocate member function. |
p_storage | The source memory buffer to supply the data written into sp_buffer; |
size | The number of elements write into the buffer. |
offset | A starting offset from the beginning of the specified read/write buffer. |
Definition at line 105 of file static_storage_policy.h.