CFx SDK Documentation  2020SP3
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
OdMemFileStreamImpl< TBase > Class Template Reference

#include <MemFileStreamImpl.h>

Inheritance diagram for OdMemFileStreamImpl< TBase >:
OdMemFileStreamDummyBase

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 ()
 
OdUInt8currPos ()
 
const OdUInt8currPos () const
 

Protected Attributes

OdUInt64 m_nCurPos
 
OdUInt64 m_nEndPos
 
OdUInt32 m_nPageDataSize
 

Friends

class OdMemoryStream
 

Detailed Description

template<class TBase = OdMemFileStreamDummyBase>
class OdMemFileStreamImpl< TBase >

<group Other_Classes>

This class defines the interface for paged-memory file I/O objects.

Definition at line 146 of file MemFileStreamImpl.h.

Constructor & Destructor Documentation

◆ OdMemFileStreamImpl()

template<class TBase = OdMemFileStreamDummyBase>
OdMemFileStreamImpl< TBase >::OdMemFileStreamImpl ( OdUInt32  nPageDataSize = 0x00200000)
inline

Definition at line 508 of file MemFileStreamImpl.h.

◆ ~OdMemFileStreamImpl()

template<class TBase >
OdMemFileStreamImpl< TBase >::~OdMemFileStreamImpl

Destructor deletes stream object.

Definition at line 670 of file MemFileStreamImpl.h.

Member Function Documentation

◆ addPage()

template<class TBase >
void OdMemFileStreamImpl< TBase >::addPage
protected

Adds new page data.

Definition at line 688 of file MemFileStreamImpl.h.

◆ allocated()

template<class TBase = OdMemFileStreamDummyBase>
OdUInt64 OdMemFileStreamImpl< TBase >::allocated ( ) const
inlineprotected

Returns the allocated memory size for all pages.

Definition at line 473 of file MemFileStreamImpl.h.

◆ curPageNo()

template<class TBase = OdMemFileStreamDummyBase>
OdUInt64 OdMemFileStreamImpl< TBase >::curPageNo ( ) const
inlineprotected

Definition at line 474 of file MemFileStreamImpl.h.

◆ currPos() [1/2]

template<class TBase = OdMemFileStreamDummyBase>
OdUInt8* OdMemFileStreamImpl< TBase >::currPos ( )
inlineprotected

Definition at line 504 of file MemFileStreamImpl.h.

◆ currPos() [2/2]

template<class TBase = OdMemFileStreamDummyBase>
const OdUInt8* OdMemFileStreamImpl< TBase >::currPos ( ) const
inlineprotected

Definition at line 505 of file MemFileStreamImpl.h.

◆ getByte()

template<class TBase >
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.

◆ getBytes()

template<class TBase >
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.

Parameters
buffer[in] pointer to the character buffer
nLen[in] number of bytes

Definition at line 862 of file MemFileStreamImpl.h.

◆ isEof()

template<class TBase = OdMemFileStreamDummyBase>
bool OdMemFileStreamImpl< TBase >::isEof ( )
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.

◆ leftInCurPage()

template<class TBase = OdMemFileStreamDummyBase>
OdUInt32 OdMemFileStreamImpl< TBase >::leftInCurPage ( ) const
inlineprotected

Definition at line 476 of file MemFileStreamImpl.h.

◆ length()

template<class TBase = OdMemFileStreamDummyBase>
OdUInt64 OdMemFileStreamImpl< TBase >::length ( )
inline

Returns the length in bytes of the file associated with this stream object.

Definition at line 554 of file MemFileStreamImpl.h.

◆ pageDataSize()

template<class TBase = OdMemFileStreamDummyBase>
OdUInt32 OdMemFileStreamImpl< TBase >::pageDataSize ( ) const
inline

Returns the page data size.

Definition at line 529 of file MemFileStreamImpl.h.

◆ pageSwitcher()

template<class TBase = OdMemFileStreamDummyBase>
PageSwitcher& OdMemFileStreamImpl< TBase >::pageSwitcher ( )
inlineprotected

Returns the page switcher.

Definition at line 468 of file MemFileStreamImpl.h.

◆ posInCurPage()

template<class TBase = OdMemFileStreamDummyBase>
OdUInt32 OdMemFileStreamImpl< TBase >::posInCurPage ( ) const
inlineprotected

Definition at line 475 of file MemFileStreamImpl.h.

◆ putByte()

template<class TBase >
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.

Parameters
val[in] byte to be wrote

Definition at line 898 of file MemFileStreamImpl.h.

◆ putBytes()

template<class TBase >
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.

Parameters
buffer[in] pointer to the character buffer
nLen[in] number of bytes

Definition at line 917 of file MemFileStreamImpl.h.

◆ reserve()

template<class TBase = OdMemFileStreamDummyBase>
void OdMemFileStreamImpl< TBase >::reserve ( OdUInt64  nSize)
inline

Reserves the specified number of bytes for the file memory stream object.

Definition at line 545 of file MemFileStreamImpl.h.

◆ rewind()

template<class TBase = OdMemFileStreamDummyBase>
void OdMemFileStreamImpl< TBase >::rewind ( )
inline

Sets the current position of the file pointer for this stream object to zero.

Definition at line 624 of file MemFileStreamImpl.h.

◆ seek()

template<class TBase >
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.

Parameters
offset[in] number of bytes
seekType[in] seek type

Definition at line 741 of file MemFileStreamImpl.h.

◆ seekNextPage()

template<class TBase >
void OdMemFileStreamImpl< TBase >::seekNextPage ( bool  bCreateNew = false)
protected

Finds the next page data.

Definition at line 718 of file MemFileStreamImpl.h.

◆ seekPrevPage()

template<class TBase = OdMemFileStreamDummyBase>
void OdMemFileStreamImpl< TBase >::seekPrevPage ( )
inlineprotected

Finds the previous page data.

Definition at line 491 of file MemFileStreamImpl.h.

◆ setAppServices()

template<class TBase = OdMemFileStreamDummyBase>
void OdMemFileStreamImpl< TBase >::setAppServices ( OdDbBaseHostAppServices pHostAppServices)
inline

Definition at line 521 of file MemFileStreamImpl.h.

◆ setPageDataSize()

template<class TBase = OdMemFileStreamDummyBase>
void OdMemFileStreamImpl< TBase >::setPageDataSize ( OdUInt32  nPageSize)
inline

Sets the page data size and buffer size for page switcher.

Parameters
nPageSize[in] page data size.

Definition at line 536 of file MemFileStreamImpl.h.

◆ tell()

template<class TBase = OdMemFileStreamDummyBase>
OdUInt64 OdMemFileStreamImpl< TBase >::tell ( )
inline

Returns the current position of the file pointer for this stream object.

Definition at line 570 of file MemFileStreamImpl.h.

◆ truncate()

template<class TBase = OdMemFileStreamDummyBase>
void OdMemFileStreamImpl< TBase >::truncate ( )
inline

Sets the length of the file associated with this stream object to zero.

Definition at line 637 of file MemFileStreamImpl.h.

Friends And Related Function Documentation

◆ OdMemoryStream

template<class TBase = OdMemFileStreamDummyBase>
friend class OdMemoryStream
friend

Definition at line 148 of file MemFileStreamImpl.h.

Member Data Documentation

◆ m_nCurPos

template<class TBase = OdMemFileStreamDummyBase>
OdUInt64 OdMemFileStreamImpl< TBase >::m_nCurPos
protected

Definition at line 461 of file MemFileStreamImpl.h.

◆ m_nEndPos

template<class TBase = OdMemFileStreamDummyBase>
OdUInt64 OdMemFileStreamImpl< TBase >::m_nEndPos
protected

Definition at line 462 of file MemFileStreamImpl.h.

◆ m_nPageDataSize

template<class TBase = OdMemFileStreamDummyBase>
OdUInt32 OdMemFileStreamImpl< TBase >::m_nPageDataSize
protected

Definition at line 463 of file MemFileStreamImpl.h.


The documentation for this class was generated from the following file: