Foxit PDF SDK

Public Member Functions | List of all members
IFX_BufferArchive Class Referenceabstract
FXCRT
Inheritance diagram for IFX_BufferArchive:

## Public Member Functions
| 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...
virtual void | Clear ()
| Clear the text buffer. More...
FX_BOOL | Flush ()
| Flush internal buffer of the file. More...

## Detailed Description

Buffer Archive

## Constructor & Destructor Documentation

## ◆ IFX_BufferArchive()

IFX_BufferArchive::IFX_BufferArchive | ( | FX_STRSIZE | size,
|  | IFX_Allocator * | pAllocator = `0`
| ) |  |

Construct with buffer size and special allocator.

Parameters

  [in] | size | Initial buffer size.
  [in] | pAllocator | Allocator used in this class. NULL to use default allocator. Default value: NULL.

## Member Function Documentation

## ◆ AppendBlock()

FX_INT32 IFX_BufferArchive::AppendBlock | ( | const void * | pBuf,
|  | size_t | size
| ) |  |

Append a binary buffer block.

Parameters

  [in] | pBuf | A pointer to a binary buffer block.
  [in] | size | The size in bytes of the buffer block.

Returns
  Buffer size. -1 means error.

## ◆ AppendByte()

FX_INT32 IFX_BufferArchive::AppendByte | ( | FX_BYTE | byte | ) |

Append a single byte.

Parameters

  [in] | byte | A single byte.

Returns
  Buffer size. -1 means error.

## ◆ AppendDWord()

FX_INT32 IFX_BufferArchive::AppendDWord | ( | FX_DWORD | i | ) |

Append a FX_DWORD value.

Parameters

  [in] | i | A FX_DWORD value.

Returns
  Buffer size. -1 means error.

## ◆ AppendInt64()

FX_INT32 IFX_BufferArchive::AppendInt64 | ( | FX_INT64 | i | ) |

Append a FX_INT64 value.

Parameters

  [in] | i | A FX_INT64 value.

Returns
  Buffer size. -1 means error.

## ◆ AppendString()

FX_INT32 IFX_BufferArchive::AppendString | ( | FX_BSTR | lpsz | ) |

Append a byte string value.

Parameters

  [in] | lpsz | A byte string value.

Returns
  Buffer size. -1 means error.

## ◆ Clear()

virtual void IFX_BufferArchive::Clear | ( |  | ) |
| virtual

Clear the text buffer.

Returns
  None.

Reimplemented in CFX_FileBufferArchive.

## ◆ Flush()

FX_BOOL IFX_BufferArchive::Flush | ( |  | ) |

Flush internal buffer of the file.

Returns
  true means success, while false means failure.