CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
OdStreamBuf Class Reference

#include <OdStreamBuf.h>

Inheritance diagram for OdStreamBuf:
OdRxObject OdStreamPosImpl< OdStreamBuf > OdMemoryStream OdOleItemInitStream OdMemoryStreamImpl< OdMemoryStream > OdStaticRxObject< OdMemoryStreamImpl< OdMemoryStream > > OdBlob

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdStreamBuf)
 
virtual OdString fileName ()
 
virtual bool isEof ()
 
virtual OdUInt64 tell ()
 
virtual OdUInt64 length ()
 
virtual void truncate ()
 
virtual void rewind ()
 
virtual OdUInt64 seek (OdInt64 offset, OdDb::FilerSeekType seekType)
 
virtual OdUInt8 getByte ()
 
virtual void getBytes (void *buffer, OdUInt32 numBytes)
 
virtual void putByte (OdUInt8 value)
 
virtual void putBytes (const void *buffer, OdUInt32 numBytes)
 
virtual void copyDataTo (OdStreamBuf *pDestination, OdUInt64 sourceStart=0, OdUInt64 sourceEnd=0)
 
virtual OdUInt32 getShareMode ()
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Protected Member Functions

 OdStreamBuf ()
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class is the base class for classes that provide platform-dependent I/O for the ODA Platform.

Corresponding C++ library: TD_Root <group Other_Classes>

Definition at line 63 of file OdStreamBuf.h.

Constructor & Destructor Documentation

◆ OdStreamBuf()

OdStreamBuf::OdStreamBuf ( )
protected

Member Function Documentation

◆ copyDataTo()

virtual void OdStreamBuf::copyDataTo ( OdStreamBuf pDestination,
OdUInt64  sourceStart = 0,
OdUInt64  sourceEnd = 0 
)
virtual

Copies the specified bytes from this StreamBuf object to the specified StreamBuf object.

Parameters
pDestination[in] Pointer to the StreamBuf object to receive the data.
sourceStart[in] Starting position of the file pointer of this StreamBuf object.
sourceEnd[in] Ending position of the file pointer of this StreamBuf object.
Remarks
Bytes are copied from sourceStart to sourceEnd inclusive.

◆ fileName()

virtual OdString OdStreamBuf::fileName ( )
virtual

Returns the name of the file associated with this StreamBuf object.

Reimplemented in OdMemoryStream.

◆ getByte()

virtual OdUInt8 OdStreamBuf::getByte ( )
virtual

Returns the byte at the current position of the file pointer for this StreamBuf object, and increments the pointer.

Reimplemented in OdMemoryStreamImpl< OdMemoryStream >.

◆ getBytes()

virtual void OdStreamBuf::getBytes ( void buffer,
OdUInt32  numBytes 
)
virtual

Returns the specified number of bytes, starting at the current position of the file pointer for this StreamBuf object, and increments the pointer by numBytes.

Parameters
buffer[in] Character buffer.
numBytes[in] Number of bytes.

Reimplemented in OdMemoryStreamImpl< OdMemoryStream >.

◆ getShareMode()

virtual OdUInt32 OdStreamBuf::getShareMode ( )
virtual

Returns the share mode for this StreamBuf object.

Remarks
getShareMode returns one of the following:

Value Description Oda::kShareDenyReadWrite 0x10 deny read/write mode Oda::kShareDenyWrite 0x20 deny write mode Oda::kShareDenyRead 0x30 deny read mode Oda::kShareDenyNo 0x40 deny none mode

◆ isEof()

virtual bool OdStreamBuf::isEof ( )
virtual

Returns true if and only if the current position of the file pointer for this StreamBuf object is at the end of file.

Reimplemented in OdStreamPosImpl< OdStreamBuf >, and OdMemoryStreamImpl< OdMemoryStream >.

◆ length()

virtual OdUInt64 OdStreamBuf::length ( )
virtual

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

Reimplemented in OdStreamPosImpl< OdStreamBuf >, and OdMemoryStreamImpl< OdMemoryStream >.

◆ ODRX_DECLARE_MEMBERS()

OdStreamBuf::ODRX_DECLARE_MEMBERS ( OdStreamBuf  )

◆ putByte()

virtual void OdStreamBuf::putByte ( OdUInt8  value)
virtual

Writes the byte to the current position of the file pointer for this StreamBuf object, and increments the pointer.

Parameters
value[in] Byte to write.

Reimplemented in OdMemoryStreamImpl< OdMemoryStream >.

◆ putBytes()

virtual void OdStreamBuf::putBytes ( const void buffer,
OdUInt32  numBytes 
)
virtual

Writes the specified number of bytes, starting at the current position of the file pointer for this StreamBuf object, and increments the pointer by numBytes.

Parameters
buffer[in] Character buffer.
numBytes[in] Number of bytes.

Reimplemented in OdMemoryStreamImpl< OdMemoryStream >.

◆ rewind()

virtual void OdStreamBuf::rewind ( )
virtual

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

Reimplemented in OdMemoryStreamImpl< OdMemoryStream >.

◆ seek()

virtual OdUInt64 OdStreamBuf::seek ( OdInt64  offset,
OdDb::FilerSeekType  seekType 
)
virtual

Moves the current position of the file pointer for this StreamBuf object to the specified location.

Parameters
offset[in] Number of bytes.
seekType[in] Seek type.
Remarks
seekType must be one of the following:

Value Description. OdDb::kSeekFromStart SEEK_SET Start of file. OdDb::kSeekFromCurrent SEEK_CUR Current position of file pointer. OdDb::kSeekFromEnd SEEK_END End of file.

Reimplemented in OdStreamPosImpl< OdStreamBuf >, and OdMemoryStreamImpl< OdMemoryStream >.

◆ tell()

virtual OdUInt64 OdStreamBuf::tell ( )
virtual

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

Reimplemented in OdStreamPosImpl< OdStreamBuf >, and OdMemoryStreamImpl< OdMemoryStream >.

◆ truncate()

virtual void OdStreamBuf::truncate ( )
virtual

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

Reimplemented in OdMemoryStreamImpl< OdMemoryStream >.


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