Foxit PDF SDK

Public Member Functions | List of all members
CFX_ByteTextBuf Class Reference
FXCRT
Inheritance diagram for CFX_ByteTextBuf:

## Public Member Functions
| CFX_ByteTextBuf (IFX_Allocator *pAllocator=0)
| Construct with allocator. More...
void | AppendChar (int ch)
| Append a single character or byte. More...
FX_STRSIZE | GetLength () const
| Get the length of the byte text buffer. More...
CFX_ByteTextBuf & | operator<< (const CFX_ByteTextBuf &buf)
| Left shifts(<<) operator overload. Output a byte text buffer to the byte text buffer. More...
CFX_ByteTextBuf & | operator<< (double f)
| Left shifts(<<) operator overload. Output a double value to the byte text buffer. More...
CFX_ByteTextBuf & | operator<< (FX_BSTR lpsz)
| Left shifts(<<) operator overload. Output a non-buffered byte string to the byte text buffer. More...
CFX_ByteTextBuf & | operator<< (FX_DWORD i)
| Left shifts(<<) operator overload. Output a FX_DWORD to the byte text buffer. More...
CFX_ByteTextBuf & | operator<< (FX_INT64 i)
| Left shifts(<<) operator overload. Output a FX_INT64 to the byte text buffer. More...
CFX_ByteTextBuf & | operator<< (int i)
| Left shifts(<<) operator overload. Output an integer to the byte text buffer. More...
void | operator= (FX_BSTR str)
| Assignment(=) operator overload. From a non-buffered byte string. More...
Public Member Functions inherited from CFX_BinaryBuf
| CFX_BinaryBuf (FX_STRSIZE size, IFX_Allocator *pAllocator=0)
| A default constructor creating an empty buffer. More...
| CFX_BinaryBuf (IFX_Allocator *pAllocator=0)
| A default constructor creating an empty buffer. More...
| ~CFX_BinaryBuf ()
| The destructor.
FX_BOOL | AppendBlock (const void *pBuf, FX_STRSIZE size)
| Append a binary buffer block. More...
FX_BOOL | AppendByte (FX_BYTE byte)
| Append a single byte. More...
FX_BOOL | AppendFill (FX_BYTE byte, FX_STRSIZE count)
| Append a byte for specified number times. Not a byte-by-byte processing, but a byte filling processing internally. More...
void | AppendString (FX_BSTR str)
| Append a non-buffered byte string. More...
void | AttachData (void *pBuf, FX_STRSIZE size)
| Attach to a buffer (this buffer will belong to this object). The buffer must be allocated by FX_Alloc. More...
void | Clear ()
| Set the binary buffer to be empty. More...
FX_BOOL | CopyData (const void *pBuf, FX_STRSIZE size)
| Copy from another buffer. More...
void | Delete (int start_index, int count)
| Delete a inter-zone buffer defining by parameters start_index and count in the binary buffer. More...
void | DetachBuffer ()
| Detach the buffer. Just set buffer pointer to NULL, and set the binary buffer size to zero. More...
FX_BOOL | EstimateSize (FX_STRSIZE size, FX_STRSIZE alloc_step=0)
| Change the allocated buffer size, and set the allocation step if alloc_step is non-zero. More...
FX_LPBYTE | GetBuffer () const
| Get a byte pointer to the binary buffer. More...
CFX_ByteStringC | GetByteString () const
| Get a byte string from the buffer. More...
void | GetByteStringL (CFX_ByteStringL &str) const
| Get a byte string from current buffer object. More...
FX_STRSIZE | GetSize () const
| Get the length of the binary buffer. More...
FX_BOOL | InsertBlock (FX_STRSIZE pos, const void *pBuf, FX_STRSIZE size)
| Insert a binary buffer block at the specified position. More...
void | TakeOver (CFX_BinaryBuf &other)
| Takeover another buffer. More...

## Additional Inherited Members
Public Attributes inherited from CFX_BinaryBuf
IFX_Allocator * | m_pAllocator
| Special allocator pointer. NULL means to use default allocator.

## Detailed Description

Dynamic byte text buffers designed for more efficient appending.

## Constructor & Destructor Documentation

## ◆ CFX_ByteTextBuf()

CFX_ByteTextBuf::CFX_ByteTextBuf | ( | IFX_Allocator * | pAllocator = `0` | ) |
| inline

Construct with allocator.

Parameters

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

## Member Function Documentation

## ◆ AppendChar()

void CFX_ByteTextBuf::AppendChar | ( | int | ch | ) |
| inline

Append a single character or byte.

Parameters

  [in] | ch | A single character or byte.

Returns
  None.

## ◆ GetLength()

FX_STRSIZE CFX_ByteTextBuf::GetLength | ( |  | ) | const
| inline

Get the length of the byte text buffer.

Returns
  The length of the byte text buffer.

## ◆ operator<<() [1/6]

CFX_ByteTextBuf& CFX_ByteTextBuf::operator<< | ( | const CFX_ByteTextBuf & | buf | ) |

Left shifts(<<) operator overload. Output a byte text buffer to the byte text buffer.

Parameters

  [in] | buf | The input byte text buffer.

Returns
  A reference to the byte text buffer.

## ◆ operator<<() [2/6]

CFX_ByteTextBuf& CFX_ByteTextBuf::operator<< | ( | double | f | ) |

Left shifts(<<) operator overload. Output a double value to the byte text buffer.

Parameters

  [in] | f | The input double value.

Returns
  A reference to the byte text buffer.

## ◆ operator<<() [3/6]

CFX_ByteTextBuf& CFX_ByteTextBuf::operator<< | ( | FX_BSTR | lpsz | ) |

Left shifts(<<) operator overload. Output a non-buffered byte string to the byte text buffer.

Parameters

  [in] | lpsz | The input non-buffered byte string.

Returns
  A reference to the byte text buffer.

## ◆ operator<<() [4/6]

CFX_ByteTextBuf& CFX_ByteTextBuf::operator<< | ( | FX_DWORD | i | ) |

Left shifts(<<) operator overload. Output a FX_DWORD to the byte text buffer.

Parameters

  [in] | i | The input value of FX_DWORD type.

Returns
  A reference to the byte text buffer.

## ◆ operator<<() [5/6]

CFX_ByteTextBuf& CFX_ByteTextBuf::operator<< | ( | FX_INT64 | i | ) |

Left shifts(<<) operator overload. Output a FX_INT64 to the byte text buffer.

Parameters

  [in] | i | The input value of FX_INT64 type.

Returns
  A reference to the byte text buffer.

## ◆ operator<<() [6/6]

CFX_ByteTextBuf& CFX_ByteTextBuf::operator<< | ( | int | i | ) |

Left shifts(<<) operator overload. Output an integer to the byte text buffer.

Parameters

  [in] | i | The input integer.

Returns
  A reference to the byte text buffer.

## ◆ operator=()

void CFX_ByteTextBuf::operator= | ( | FX_BSTR | str | ) |

Assignment(=) operator overload. From a non-buffered byte string.

Parameters

  [in] | str | A non-buffered byte string.

Returns
  None.