PByteStreamImpl Class Reference

Detailed Description

The PByteStreamImpl class is the common interface to all PByteStream.

Definition at line 21 of file PByteStreamImpl.h.

#include <PByteStreamImpl.h>

Constructor & Destructor Documentation

◆ PByteStreamImpl() [1/2]

PByteStreamImpl::PByteStreamImpl ( )
inline

Definition at line 24 of file PByteStreamImpl.h.

◆ PByteStreamImpl() [2/2]

PByteStreamImpl::PByteStreamImpl ( classid  subclassId)
inline

Definition at line 25 of file PByteStreamImpl.h.

◆ ~PByteStreamImpl()

virtual PByteStreamImpl::~PByteStreamImpl ( )
inlinevirtual

Destroys this object.

Definition at line 30 of file PByteStreamImpl.h.

Member Function Documentation

◆ CanRead()

virtual bool PByteStreamImpl::CanRead ( ) const
inlinevirtual

Returns true if this stream supports reading, false otherwise.

Definition at line 119 of file PByteStreamImpl.h.

◆ CanSeek()

virtual bool PByteStreamImpl::CanSeek ( ) const
inlinevirtual

Returns true if this stream supports seeking, false otherwise.

Definition at line 61 of file PByteStreamImpl.h.

◆ CanWrite()

virtual bool PByteStreamImpl::CanWrite ( ) const
inlinevirtual

Returns true if this stream supports writing, false otherwise.

Definition at line 146 of file PByteStreamImpl.h.

◆ Close()

virtual papillon::PResult PByteStreamImpl::Close ( )
inlinevirtual

Closes this stream and releases any resources associated with.

Definition at line 53 of file PByteStreamImpl.h.

◆ Flush()

virtual papillon::PResult PByteStreamImpl::Flush ( )
inlinevirtual

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.

Definition at line 45 of file PByteStreamImpl.h.

◆ GetPosition()

virtual papillon::uint64 PByteStreamImpl::GetPosition ( ) const
inlinevirtual

Returns the current position in this stream (if seeking is supported, 0 otherwise).

Definition at line 70 of file PByteStreamImpl.h.

◆ HasSize()

virtual bool PByteStreamImpl::HasSize ( ) const
inlinevirtual

Returns true if this stream has a predefined length, false otherwise.

Definition at line 94 of file PByteStreamImpl.h.

◆ IsOpened()

virtual papillon::PResult PByteStreamImpl::IsOpened ( ) const
inlinevirtual

Returns PResult::C_OK if the stream is ready for reading, another result otherwise.

Definition at line 36 of file PByteStreamImpl.h.

◆ ReadByte()

virtual papillon::PResult PByteStreamImpl::ReadByte ( papillon::int8 &  )
inlinevirtual

Reads a byte from this stream, if reading is supported.

Returns PResult::C_OK if success, another result otherwise.

Definition at line 128 of file PByteStreamImpl.h.

◆ ReadBytes()

virtual papillon::PResult PByteStreamImpl::ReadBytes ( void *  ,
papillon::uint64   
)
inlinevirtual

UNSAFE: Reads up to n bytes from this stream, if reading is supported, and stores them into the specified buffer.

Returns PResult::C_OK if success, another result otherwise.

Definition at line 138 of file PByteStreamImpl.h.

◆ Resize()

virtual papillon::PResult PByteStreamImpl::Resize ( papillon::uint64  )
inlinevirtual

Sets the size of this stream, is possible.

Returns PResult::C_OK if success, another result otherwise.

Definition at line 111 of file PByteStreamImpl.h.

◆ Rewind()

virtual papillon::PResult PByteStreamImpl::Rewind ( )
inlinevirtual

Resets the position within the current stream (sets position to the first byte), if seeking is supported.

Definition at line 86 of file PByteStreamImpl.h.

◆ Seek()

virtual papillon::PResult PByteStreamImpl::Seek ( papillon::uint64  )
inlinevirtual

Sets the position within the current stream if seeking is supported.

Definition at line 78 of file PByteStreamImpl.h.

◆ Size()

virtual papillon::uint64 PByteStreamImpl::Size ( ) const
inlinevirtual

Returns the size of this stream in bytes, if available.

Definition at line 102 of file PByteStreamImpl.h.

◆ ToString()

virtual papillon::PString PByteStreamImpl::ToString ( ) const
inlinevirtual

Returns a string representation of this object.

Definition at line 172 of file PByteStreamImpl.h.

◆ WriteByte()

virtual papillon::PResult PByteStreamImpl::WriteByte ( papillon::int8  )
inlinevirtual

Writes a byte to this stream, if writing is supported.

Returns PResult::C_OK if success, another result otherwise.

Definition at line 155 of file PByteStreamImpl.h.

◆ WriteBytes()

virtual papillon::PResult PByteStreamImpl::WriteBytes ( const void *  ,
papillon::uint64   
)
inlinevirtual

Writes n bytes from the specified array to this stream, if writing is supported.

Returns PResult::C_OK if success, another result otherwise.

Definition at line 164 of file PByteStreamImpl.h.