My Project
CFX_FileBufferArchive Class Reference
Inheritance diagram for CFX_FileBufferArchive:
IFX_BufferArchive

Public Member Functions

 CFX_FileBufferArchive (FX_STRSIZE size=32768, IFX_Allocator *pAllocator=0)
 A constructor with size and allocator. More...
 
 ~CFX_FileBufferArchive ()
 The destructor.
 
FX_BOOL AttachFile (IFX_StreamWrite *pFile, FX_BOOL bTakeover=false)
 Attach file. More...
 
FX_BOOL AttachFile (FX_LPCWSTR filename)
 Attach file. More...
 
FX_BOOL AttachFile (FX_LPCSTR filename)
 Attach file. More...
 
virtual void Clear ()
 Clear buffer. More...
 
FX_BOOL Flush ()
 Flush internal buffer. More...
 
- Public Member Functions inherited from IFX_BufferArchive
 IFX_BufferArchive (FX_STRSIZE size, IFX_Allocator *pAllocator=0)
 Construct with buffer size and special allocator. More...
 
virtual ~IFX_BufferArchive ()
 The destructor.
 
FX_INT32 AppendBlock (const void *pBuf, size_t size)
 Append a binary buffer block. More...
 
FX_INT32 AppendByte (FX_BYTE byte)
 Append a single byte. More...
 
FX_INT32 AppendDWord (FX_DWORD i)
 Append a FX_DWORD value. More...
 
FX_INT32 AppendInt64 (FX_INT64 i)
 Append a FX_INT64 value. More...
 
FX_INT32 AppendString (FX_BSTR lpsz)
 Append a byte string value. More...
 
FX_BOOL Flush ()
 Flush internal buffer of the file. More...
 

Detailed Description

The class represents file buffer archive.

Constructor & Destructor Documentation

◆ CFX_FileBufferArchive()

CFX_FileBufferArchive::CFX_FileBufferArchive ( FX_STRSIZE  size = 32768,
IFX_Allocator pAllocator = 0 
)

A constructor with size and allocator.

Parameters
[in]sizeThe size buffer. Default value: 32768
[in]pAllocatorAn allocator. Default value: NULL.

Member Function Documentation

◆ AttachFile() [1/3]

FX_BOOL CFX_FileBufferArchive::AttachFile ( IFX_StreamWrite pFile,
FX_BOOL  bTakeover = false 
)

Attach file.

Parameters
[in]pFileA pointer to file stream.
[in]bTakeoverA boolean value to decide whether take over the file. Default value: NULL.
Returns
true means success, while false means failure.

◆ AttachFile() [2/3]

FX_BOOL CFX_FileBufferArchive::AttachFile ( FX_LPCWSTR  filename)

Attach file.

Parameters
[in]filenameunicode file name. Available only for platforms supporting CRT file access (fopen, ...).
Returns
true means success, while false means failure.

◆ AttachFile() [3/3]

FX_BOOL CFX_FileBufferArchive::AttachFile ( FX_LPCSTR  filename)

Attach file.

Parameters
[in]filenameunicode file name. Available only for platforms supporting CRT file access (fopen, ...).
Returns
true means success, while false means failure.

◆ Clear()

virtual void CFX_FileBufferArchive::Clear ( )
virtual

Clear buffer.

Returns
None.

Reimplemented from IFX_BufferArchive.

◆ Flush()

FX_BOOL CFX_FileBufferArchive::Flush ( )

Flush internal buffer.

Returns
true means success, while false means failure.

Foxit Software Corporation Logo
@2019 Foxit Software Incorporated. All rights reserved.