Foxit PDF SDK

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

## Public Member Functions
| CFX_WideTextBuf (IFX_Allocator *pAllocator=0)
| Construct with allocator. More...
FX_BOOL | AppendChar (FX_WCHAR wch)
| Append a single wide character. More...
void | Delete (int start_index, int count)
| Delete a inter-zone buffer defining by parameters start_index and count in the wide text buffer. More...
FX_LPWSTR | GetBuffer () const
| Get a wide character pointer. More...
FX_STRSIZE | GetLength () const
| Get the length of the wide text buffer. More...
CFX_WideStringC | GetWideString () const
| Get a wide string from the wide text buffer. More...
CFX_WideTextBuf & | operator<< (const CFX_WideString &str)
| Left shifts(<<) operator overload. Output a wide string to the wide text buffer. More...
CFX_WideTextBuf & | operator<< (const CFX_WideTextBuf &buf)
| Left shifts(<<) operator overload. Output a wide text buffer to the wide text buffer. More...
CFX_WideTextBuf & | operator<< (double f)
| Left shifts(<<) operator overload. Output a double value to the wide text buffer. More...
CFX_WideTextBuf & | operator<< (FX_LPCWSTR lpsz)
| Left shifts(<<) operator overload. Output a zero-terminated wide character string to the wide text buffer. More...
CFX_WideTextBuf & | operator<< (FX_WSTR str)
| Left shifts(<<) operator overload. Output a wide string to the wide text buffer. More...
CFX_WideTextBuf & | operator<< (int i)
| Left shifts(<<) operator overload. Output a integer to the wide text buffer. More...
void | operator= (FX_LPCWSTR lpsz)
| Assignment(=) operator overload. From a zero terminated wide character string. More...
void | operator= (FX_WSTR str)
| Assignment(=) operator overload. From a wide 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 wide text buffers designed for more efficient appending.

## Constructor & Destructor Documentation

## ◆ CFX_WideTextBuf()

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

Construct with allocator.

Parameters

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

## Member Function Documentation

## ◆ AppendChar()

FX_BOOL CFX_WideTextBuf::AppendChar | ( | FX_WCHAR | wch | ) |

Append a single wide character.

Parameters

  [in] | wch | A single wide character.

Returns
  true means success, while false means failure.

## ◆ Delete()

void CFX_WideTextBuf::Delete | ( | int | start_index,
|  | int | count
| ) |  |
| inline

Delete a inter-zone buffer defining by parameters start_index and count in the wide text buffer.

Parameters

  [in] | start_index | Specifies the zero-based index of the start position to be deleted in the wide text buffer buffer.
  [in] | count | Specifies the count of wide characters to be deleted.

Returns
  None.

## ◆ GetBuffer()

FX_LPWSTR CFX_WideTextBuf::GetBuffer | ( |  | ) | const
| inline

Get a wide character pointer.

Returns
  A wide character pointer to the wide text buffer.

## ◆ GetLength()

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

Get the length of the wide text buffer.

Returns
  The count of wide characters in the wide text buffer.

## ◆ GetWideString()

CFX_WideStringC CFX_WideTextBuf::GetWideString | ( |  | ) | const

Get a wide string from the wide text buffer.

Returns
  A wide string.

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

CFX_WideTextBuf& CFX_WideTextBuf::operator<< | ( | const CFX_WideString & | str | ) |

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

Parameters

  [in] | str | The input wide string.

Returns
  A reference to the wide text buffer.

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

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

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

Parameters

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

Returns
  A reference to the wide text buffer.

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

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

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

Parameters

  [in] | f | The input double value.

Returns
  A reference to the wide text buffer.

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

CFX_WideTextBuf& CFX_WideTextBuf::operator<< | ( | FX_LPCWSTR | lpsz | ) |

Left shifts(<<) operator overload. Output a zero-terminated wide character string to the wide text buffer.

Parameters

  [in] | lpsz | The input zero-terminated wide character string.

Returns
  A reference to the wide text buffer.

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

CFX_WideTextBuf& CFX_WideTextBuf::operator<< | ( | FX_WSTR | str | ) |

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

Parameters

  [in] | str | The input wide string.

Returns
  A reference to the wide text buffer.

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

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

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

Parameters

  [in] | i | The input integer.

Returns
  A reference to the wide text buffer.

## ◆ operator=() [1/2]

void CFX_WideTextBuf::operator= | ( | FX_LPCWSTR | lpsz | ) |

Assignment(=) operator overload. From a zero terminated wide character string.

Parameters

  [in] | lpsz | A zero terminated wide character string.

Returns
  None.

## ◆ operator=() [2/2]

void CFX_WideTextBuf::operator= | ( | FX_WSTR | str | ) |

Assignment(=) operator overload. From a wide string.

Parameters

  [in] | str | A wide string.

Returns
  None.