#include <support/MemoryStore.h>
Inheritance diagram for BMemoryStore:
This class can be used as-is on an existing pieces of memory (which is very dangerous due to reference counting), or subclasses can provide their own memory management semantics (such as BMallocStore).
Public Member Functions | |
status_t | AssertSpace (size_t newSize) |
BMemoryStore (const void *data, size_t size) | |
BMemoryStore (void *data, size_t size) | |
BMemoryStore (const BMemoryStore &) | |
BMemoryStore () | |
const void * | Buffer () const |
Direct access to the buffer. | |
size_t | BufferSize () const |
Direct access to buffer size. | |
int32_t | Compare (const BMemoryStore &) const |
status_t | Copy (const BMemoryStore &) |
virtual SValue | Inspect (const sptr< IBinder > &caller, const SValue &which, uint32_t flags=0) |
Probe binder for interface information. | |
bool | operator!= (const BMemoryStore &) const |
bool | operator< (const BMemoryStore &) const |
bool | operator<= (const BMemoryStore &) const |
BMemoryStore & | operator= (const BMemoryStore &) |
bool | operator== (const BMemoryStore &) const |
bool | operator> (const BMemoryStore &) const |
bool | operator>= (const BMemoryStore &) const |
virtual ssize_t | ReadAtV (off_t position, const struct iovec *vector, ssize_t count) |
Read the bytes described by iovec from location position in the storage. | |
void | SetBlockSize (size_t blocksize) |
virtual status_t | SetSize (off_t position) |
Set the total number of bytes in the store. | |
virtual off_t | Size () const |
Return the total number of bytes in the store. | |
virtual status_t | Sync () |
Make sure all data in the stream is written to its physical device. | |
virtual ssize_t | WriteAtV (off_t position, const struct iovec *vector, ssize_t count) |
Write the bytes described by iovec at location position in the storage. | |
Protected Member Functions | |
void | Reset () |
virtual | ~BMemoryStore () |
|
|
|
|
|
|
|
|
|
|
|
|
|
Direct access to the buffer.
|
|
Direct access to buffer size. The same as Size(), but it can be convenient when you know you are dealing with a BMemoryStore (and thus don't need a full off_t to contain the size). |
|
|
|
|
|
Probe binder for interface information. Return interfaces implemented by this binder object that are requested by which. This is a composition of all interfaces, expressed as { descriptor -> binder } mappings, which are selected through which. Much more information on Inspect() can be found at Binder Inspect() Details. Reimplemented from BByteStream. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Read the bytes described by iovec from location position in the storage. Returns the number of bytes actually read, or a negative error code. Implements IStorage. Reimplemented in BValueStorage. |
|
Reimplemented in BStringIO. |
|
Reimplemented in BMallocStore. |
|
Set the total number of bytes in the store.
Implements IStorage. Reimplemented in BValueStorage. |
|
Return the total number of bytes in the store.
Implements IStorage. |
|
Make sure all data in the stream is written to its physical device. Returns B_OK if the data is safely stored away, else an error code. Reimplemented from BByteStream. Reimplemented in BValueStorage. |
|
Write the bytes described by iovec at location position in the storage. Returns the number of bytes actually written, or a negative error code. Implements IStorage. Reimplemented in BValueStorage. |