CFx SDK Documentation
2022 SP0
|
#include <MemFileStreamImpl.h>
Public Member Functions | |
OdMemFileStreamImpl (OdUInt32 nPageDataSize=0x00200000) | |
void | setAppServices (OdDbBaseHostAppServices *pHostAppServices) |
OdUInt32 | pageDataSize () const |
void | setPageDataSize (OdUInt32 nPageSize) |
void | reserve (OdUInt64 nSize) |
OdUInt64 | length () |
OdUInt64 | seek (OdInt64 offset, OdDb::FilerSeekType whence) |
OdUInt64 | tell () |
bool | isEof () |
OdUInt8 | getByte () |
void | getBytes (void *buffer, OdUInt32 nLen) |
void | putByte (OdUInt8 val) |
void | putBytes (const void *buffer, OdUInt32 nLen) |
void | rewind () |
void | truncate () |
~OdMemFileStreamImpl () | |
Protected Member Functions | |
PageSwitcher & | pageSwitcher () |
OdUInt64 | allocated () const |
OdUInt64 | curPageNo () const |
OdUInt32 | posInCurPage () const |
OdUInt32 | leftInCurPage () const |
void | addPage () |
void | seekNextPage (bool bCreateNew=false) |
void | seekPrevPage () |
OdUInt8 * | currPos () |
const OdUInt8 * | currPos () const |
Protected Attributes | |
OdUInt64 | m_nCurPos |
OdUInt64 | m_nEndPos |
OdUInt32 | m_nPageDataSize |
Friends | |
class | OdMemoryStream |
<group Other_Classes>
This class defines the interface for paged-memory file I/O objects.
Definition at line 146 of file MemFileStreamImpl.h.
|
inline |
Definition at line 508 of file MemFileStreamImpl.h.
OdMemFileStreamImpl< TBase >::~OdMemFileStreamImpl |
Destructor deletes stream object.
Definition at line 670 of file MemFileStreamImpl.h.
|
protected |
Adds new page data.
Definition at line 688 of file MemFileStreamImpl.h.
|
inlineprotected |
Returns the allocated memory size for all pages.
Definition at line 473 of file MemFileStreamImpl.h.
|
inlineprotected |
Definition at line 474 of file MemFileStreamImpl.h.
|
inlineprotected |
Definition at line 504 of file MemFileStreamImpl.h.
|
inlineprotected |
Definition at line 505 of file MemFileStreamImpl.h.
OdUInt8 OdMemFileStreamImpl< TBase >::getByte |
Returns the byte at the current position of the file pointer for this stream object and increments the pointer.
Definition at line 842 of file MemFileStreamImpl.h.
void OdMemFileStreamImpl< TBase >::getBytes | ( | void * | buffer, |
OdUInt32 | nLen | ||
) |
Returns the specified number of bytes, starting at the current position of the file pointer for this stream object, and increments the pointer on the specified number of bytes.
buffer | [in] pointer to the character buffer |
nLen | [in] number of bytes |
Definition at line 862 of file MemFileStreamImpl.h.
|
inline |
Checks whether the file pointer has reached the end of a file, and returns True if the
current position for this stream object is at the end of file.
Definition at line 579 of file MemFileStreamImpl.h.
|
inlineprotected |
Definition at line 476 of file MemFileStreamImpl.h.
|
inline |
Returns the length in bytes of the file associated with this stream object.
Definition at line 554 of file MemFileStreamImpl.h.
|
inline |
Returns the page data size.
Definition at line 529 of file MemFileStreamImpl.h.
|
inlineprotected |
Returns the page switcher.
Definition at line 468 of file MemFileStreamImpl.h.
|
inlineprotected |
Definition at line 475 of file MemFileStreamImpl.h.
void OdMemFileStreamImpl< TBase >::putByte | ( | OdUInt8 | val | ) |
Writes the byte to the current position of the file pointer for this stream object, and increments the pointer.
val | [in] byte to be wrote |
Definition at line 898 of file MemFileStreamImpl.h.
void OdMemFileStreamImpl< TBase >::putBytes | ( | const void * | buffer, |
OdUInt32 | nLen | ||
) |
Writes the specified number of bytes, starting at the current position of the file pointer for this stream object, and increments the pointer on the specified number of bytes.
buffer | [in] pointer to the character buffer |
nLen | [in] number of bytes |
Definition at line 917 of file MemFileStreamImpl.h.
|
inline |
Reserves the specified number of bytes for the file memory stream object.
Definition at line 545 of file MemFileStreamImpl.h.
|
inline |
Sets the current position of the file pointer for this stream object to zero.
Definition at line 624 of file MemFileStreamImpl.h.
OdUInt64 OdMemFileStreamImpl< TBase >::seek | ( | OdInt64 | offset, |
OdDb::FilerSeekType | whence | ||
) |
Moves the current position of the file pointer for this stream object to the specified location.
offset | [in] number of bytes |
seekType | [in] seek type |
Definition at line 741 of file MemFileStreamImpl.h.
|
protected |
Finds the next page data.
Definition at line 718 of file MemFileStreamImpl.h.
|
inlineprotected |
Finds the previous page data.
Definition at line 491 of file MemFileStreamImpl.h.
|
inline |
Definition at line 521 of file MemFileStreamImpl.h.
|
inline |
Sets the page data size and buffer size for page switcher.
nPageSize | [in] page data size. |
Definition at line 536 of file MemFileStreamImpl.h.
|
inline |
Returns the current position of the file pointer for this stream object.
Definition at line 570 of file MemFileStreamImpl.h.
|
inline |
Sets the length of the file associated with this stream object to zero.
Definition at line 637 of file MemFileStreamImpl.h.
|
friend |
Definition at line 148 of file MemFileStreamImpl.h.
|
protected |
Definition at line 461 of file MemFileStreamImpl.h.
|
protected |
Definition at line 462 of file MemFileStreamImpl.h.
|
protected |
Definition at line 463 of file MemFileStreamImpl.h.