|
| membuf () |
| Constructor.
|
|
virtual | ~membuf () |
| Destructor.
|
|
bool | isEmpty () const |
| Is the buffer empty?
|
|
size_t | toMemory (const char *&memory, size_t addSize=0) const |
| Write to contiguous memory. The function implies a well-defined interpretation of the input values, so it should not be called with uninitialized arguments. More...
|
|
bool | fromMemory (const char *memory) |
| Read from the contiguous memory.
|
|
size_t | getMemLen () const |
| Compute the necessary length of the contiguous memory block for a buffer.
|
|
reader & | read (reader &in) |
| Prepare read stream.
|
|
writer & | write (writer &out) const |
| Prepare write stream.
|
|
void | clean () |
| Clear the buffer. More...
|
|
virtual void | closeBuff () |
| Close the buffer.
|
|
| iobuf (uint16 clusterSize) |
| Constructor.
|
|
virtual | ~iobuf () |
| Destructor.
|
|
virtual bool | open (FileSpace &file, uint8 om, const VersionContainer &, bool fullCheck=true) |
| Open the file if it is one's own file. The flag fullCheck == false switches off excessive checks (for the sake of performance).
|
|
bool | del (FileSpace &file) |
| Free space allocated for the file.
|
|
bool | truncate (FileSpace &file, size_t from) |
| Truncate the file. More...
|
|
bool | speedOnClose () const |
| Is to be ordered while closing.
|
|
void | speedOnClose (bool s) |
| Set the flag of ordering while closing.
|
|
virtual void | free (size_t c) |
| Free the cluster.
|
|
| iobuf_Seq (uint16 clusterSize) |
| Constructor.
|
|
virtual | ~iobuf_Seq () |
| Destructor.
|
|
void | Reserve (size_t n, bool addAdditionalSpace=true) |
| < Reserve space for a given number of elements. More...
|
|
void | Flush () |
| Free the whole memory.
|
|
void | HardFlush () |
| Free the unnecessary memory.
|
|
void | Adjust () |
| Add an element to the end of the array.
|
|
Cluster * | Add () |
| Add a given element to the end of the array.
|
|
Cluster * | Add (const Cluster &e) |
| Get the number of elements in array.
|
|
Cluster & | operator[] (size_t loc) const |
| Access by index operator. More...
|
|
int | gc () |
| Get the next byte from the buffer.
|
|
size_t | getn (void *, size_t) |
| Get the next n bytes from the buffer elementwise.
|
|
size_t | getln (void *, size_t) |
| Get the next n bytes from the buffer by copying the storage area.
|
|
int | pc (uint8 c) |
| Get the next byte from the buffer but don't shift the pointer to the next one. More...
|
|
size_t | putn (const void *, size_t) |
| Put the next n bytes to the buffer elementwise.
|
|
size_t | putln (const void *, size_t) |
| Put the next n bytes to the buffer by copying the storage area.
|
|
void | advance () |
| If current buffer exhausted, advance pointer to the next one.
|
|
bool | good () const |
| Whether the buffer state is correct.
|
|
bool | eof () const |
| Is the end of file reached?
|
|
uint32 | state () const |
| Get the buffer state.
|
|
void | setState (io::state add) |
| Add the buffer state.
|
|
void | clearState (io::state sub) |
| Remove the buffer state.
|
|
io::pos | size () const |
| Calculate the current file size.
|
|
io::pos | tell () const |
| Returns the current position in the file.
|
|
void | lseek (size_t pos=SYS_MAX_T) |
| Set current position in the buffer.
|
|
bool | attach (FileSpace &file, bool check=true) |
| Attach the file to the buffer with or without checking.
|
|
bool | openSys (uint8 om) |
| Open the system file.
|
|
virtual void | close () |
| Close the file.
|
|
ClusterReference | getCurrentClusterPos () |
| Get current position in the buffer.
|
|
FileSpace & | sysFile () |
| Get access to the system file.
|
|
FileSpace * | openedFile () const |
| Get access to the open file.
|
|
virtual size_t | DOSFileLen () const |
| The storage data size (of the file on the disk).
|
|
virtual const TCHAR * | DOSFileName () const |
| Storage name (of file on the disk).
|
|
bool | fresh () const |
| Is the buffer fresh?
|
|
void | fresh (bool f) |
| Set the state of buffer freshness.
|
|
bool | modified () const |
| Is the buffer modified?
|
|
void | modified (bool m) |
| Set the state of modified buffer.
|
|
uint8 | mode () const |
| Get the buffer mode.
|
|
void | mode (uint8 m) |
| Set the buffer mode.
|
|
bool | IsInMode () const |
| Is in the reading mode?
|
|
bool | IsOutMode () const |
| Is in the writing mode?
|
|
bool | IsInOrOutMode () const |
| Is in the reading or writing mode?
|
|
bool | deleteIfEmpty () const |
| Is the empty file to be deleted?
|
|
void | deleteIfEmpty (bool s) |
| Set the flag of deleting the empty file.
|
|
bool | deleteOnClose () const |
| Is the file to be deleted while closing the buffer?
|
|
void | deleteOnClose (bool s) |
| Set the flag of deleting the file while closing the buffer.
|
|
void | SetVersionsByStorage () |
| Set the current version to be equal to the storage version.
|
|
VERSION | MathVersion () const |
| Return the main version (of the mathematical kernel).
|
|
VERSION | AppVersion (size_t ind=-1) const |
| Return the additional version (of the target application).
|
|
const VersionContainer & | GetVersionsContainer () const |
| Get the buffer versions.
|
|
VERSION | GetStorageVersion () |
| Get the storage version.
|
|
VERSION | GetFormatVersion () const |
| Get the format version.
|
|
void | SetFormatVersion (VERSION version) |
| Set the format version.
|
|
Memory stream buffer.
Memory stream buffer.
Stream memory buffer is intended for using in read and write streams. Besides the instruments needed for the buffer, it has functions for packing to a contiguous memory block, what allows to transfer files to another application via the memory.