CFX_StringBufBase Class Reference

A fixed string buffer holding up to certain number of characters. More...

Inheritance diagram for CFX_StringBufBase:
CFX_StringBufTemplate< limit >

Public Member Functions

 CFX_StringBufBase (FX_STRSIZE limit)
 A Constructor. More...
 
void Append (FX_BSTR str)
 Append a non-buffered byte string. More...
 
void Append (int i, FX_DWORD flags=0)
 Append an integer. See FXFORMAT_xxx for flags. More...
 
void Copy (FX_BSTR str)
 Copy from a non-buffered byte string. More...
 
void Empty ()
 Set this string to be empty. More...
 
FX_CHARGetPtr () const
 Get a C-style string pointer to the string buffer. More...
 
FX_STRSIZE GetSize () const
 Gets the length of the string. More...
 
CFX_ByteString GetString () const
 Get a buffered byte string. More...
 
CFX_ByteStringC GetStringC () const
 Get a non-buffered byte string. More...
 

Detailed Description

A fixed string buffer holding up to certain number of characters.

Operations are protected by buffer limit. Please do not use this class directly, use CFX_StringBufTemplate instead.

Constructor & Destructor Documentation

◆ CFX_StringBufBase()

CFX_StringBufBase::CFX_StringBufBase ( FX_STRSIZE  limit)
inlineexplicit

A Constructor.

Parameters
[in]limitbuffer limit.

Member Function Documentation

◆ Append() [1/2]

void CFX_StringBufBase::Append ( FX_BSTR  str)

Append a non-buffered byte string.

Parameters
[in]strA non-buffered byte string.
Returns
None.

◆ Append() [2/2]

void CFX_StringBufBase::Append ( int  i,
FX_DWORD  flags = 0 
)

Append an integer. See FXFORMAT_xxx for flags.

Parameters
[in]iThe input integer.
[in]flagsThe formating flags.
Returns
None.
See also
CFX_ByteString::FormatInteger

◆ Copy()

void CFX_StringBufBase::Copy ( FX_BSTR  str)

Copy from a non-buffered byte string.

Parameters
[in]strA no-buffered byte string.
Returns
None.

◆ Empty()

void CFX_StringBufBase::Empty ( )
inline

Set this string to be empty.

Returns
None.

◆ GetPtr()

FX_CHAR* CFX_StringBufBase::GetPtr ( ) const
inline

Get a C-style string pointer to the string buffer.

Returns
A C-style string pointer to the buffer.

◆ GetSize()

FX_STRSIZE CFX_StringBufBase::GetSize ( ) const
inline

Gets the length of the string.

Returns
The length of the string.

◆ GetString()

CFX_ByteString CFX_StringBufBase::GetString ( ) const
inline

Get a buffered byte string.

Returns
A buffered byte string.

◆ GetStringC()

CFX_ByteStringC CFX_StringBufBase::GetStringC ( ) const
inline

Get a non-buffered byte string.

Returns
A non-buffered byte string.

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