Foxit PDF SDK
FXCRT

Classes

struct  FX_HFILE
 File accessing handle. More...
 
struct  FX_HTHREAD
 Type definition of mutex handle. More...
 
struct  FXMEM_FoxitMgr
 Foxit memory manager. More...
 
class  CFX_ArchiveLoader
 
class  CFX_ArchiveSaver
 
class  CFX_ArrayTemplate< TYPE >
 
class  CFX_ATemplate< baseType >
 
class  CFX_AutoRestorer< T >
 
class  CFX_BaseSegmentedArray
 
class  CFX_BasicArray
 
class  CFX_BinaryBuf
 Dynamic binary buffers designed for more efficient appending. More...
 
class  CFX_BitStream
 
class  CFX_BitWriter
 
class  CFX_ByteString
 BYTE STRING CLASS. More...
 
class  CFX_ByteStringC
 CONSTANT BYTE STRING CLASS. More...
 
class  CFX_ByteTextBuf
 
class  CFX_CachedFileRead
 Cached file read interface. More...
 
struct  CFX_CharMap
 
class  CFX_CMapByteStringToPtr
 
class  CFX_CMapDWordToDWord
 
class  CFX_CountRef< ObjClass >
 
class  CFX_DataFilter
 
class  CFX_ETemplate< baseType >
 
class  CFX_ExceptionErrorContext
 
class  CFX_FileBufferArchive
 
class  CFX_FixedBufGrow< DataType, FixedSize >
 
class  CFX_FloatRect
 
class  CFX_JmpStack
 
class  CFX_ListArrayTemplate< T1, T2 >
 
class  CFX_MapByteStringToPtr
 
class  CFX_MapPtrTemplate< KeyType, ValueType >
 
class  CFX_MapPtrToPtr
 
class  CFX_Matrix
 
class  CFX_ObjectArray< ObjectClass >
 
class  CFX_ObjectStack< TYPE >
 
class  CFX_PrivateData
 
class  CFX_PRLTemplate< baseType >
 
class  CFX_PSVTemplate< BaseType >
 
class  CFX_PtrList
 
class  CFX_RRTemplate< baseType >
 
class  CFX_RTemplate< baseType >
 
class  CFX_RWLock
 Under non-threading mode, defines as empty implementation. More...
 
class  CFX_SegmentedArray< ElementType >
 
class  CFX_SmartPointer< T >
 
class  CFX_SortListArray< unit >
 
class  CFX_SpinLock
 Under non-threading mode, defines as empty implementation. More...
 
class  CFX_Stack< TYPE >
 
class  CFX_Stack< CFX_ByteString >
 
class  CFX_StringBufBase
 A fixed string buffer holding up to certain number of characters. More...
 
class  CFX_StringBufTemplate< limit >
 A fixed string buffer template. More...
 
struct  CFX_StringData
 This class represents the data of a byte string object. More...
 
struct  CFX_StringDataW
 This class represents the data of a wide string object. More...
 
class  CFX_TempBuf< DataType >
 
class  CFX_UTF8Decoder
 
class  CFX_UTF8Encoder
 
class  CFX_VTemplate< baseType >
 
class  CFX_WideString
 WIDE STRING CLASS. More...
 
class  CFX_WideStringC
 CONSTANT WIDE STRING CLASS. More...
 
class  CFX_WideTextBuf
 
struct  FX_MEMCONFIG
 Structure of fixed memory configuration. More...
 
struct  FX_PRIVATEDATA
 
struct  FX_RECT
 
struct  FX_SMALL_RECT
 
struct  FX_SYSTEMTIME
 Structure of system time. More...
 
struct  FX_THREADHANDLER
 Thread handler for application extension. More...
 
struct  FXCRT_DATETIMEZONE
 Structure for date and time. More...
 
struct  FXMEM_Debugger
 Memory debugger interface. All functions must be implemented. More...
 
struct  FXMEM_SystemMgr
 System level memory manager. Application can implement their own system memory manager. More...
 
struct  FXMEM_SystemMgr2
 Fixed memory manager. More...
 
struct  IFX_Allocator
 Foxit allocator interface. More...
 
class  IFX_BufferArchive
 
class  IFX_BufferRead
 IFX_BufferRead stream provides an optimized approach to read stream data. Usually, one stream maintains an internal buffer for data access, this buffer can be used directly to caller, and avoids data-copy. More...
 
class  IFX_ChunkFileStream
 Chunk-based File stream interface, reading & writing. More...
 
class  IFX_FileAccess
 File access interface, open file. More...
 
class  IFX_FileRead
 File reading interface. More...
 
class  IFX_FileStream
 File stream interface, reading & writing. More...
 
class  IFX_FileWrite
 File writing interface. More...
 
class  IFX_MemoryStream
 Memory stream interface. More...
 
class  IFX_Pause
 
class  IFX_StreamRead
 Stream reading interface. More...
 
class  IFX_StreamWrite
 Stream writing interface. More...
 
class  IFX_Unknown
 

Macros

#define _FX_LARGEFILE_USED_
 Preprocessor for large file support.
 
#define FX_BSTRC(str)   CFX_ByteStringC(str, sizeof str-1)
 All application should use the following macro when specifying a string constant. "str" must be a character string constant. More...
 
#define FX_FILESIZE   FX_INT64
 Support large file directly.
 
#define FX_IsOdd(a)   ((a) & 1)
 Judge whether an integer is odd or even.
 
#define FXBSTR_ID(c1, c2, c3, c4)   ((c1 << 24) | (c2 << 16) | (c3 << 8) | (c4))
 Construct a ID from four integer values.
 
#define FXFORMAT_CAPITAL   4
 For formating integer: using with FXFORMAT_HEX to produce capital hexadecimal letters.
 
#define FXFORMAT_HEX   2
 For formating integer: using hexadecimal format.
 
#define FXFORMAT_SIGNED   1
 For formating integer: the value is signed.
 
#define FXMEM_DISCARDABLE   4
 Flag for allocate discardable memory.
 
#define FXMEM_MOVABLE   2
 Flag for allocate movable memory.
 
#define FXMEM_NONLEAVE   1
 Flag for no calling OOM-handler when memory allocation failed.
 

Typedefs

typedef CFX_ATemplate< FX_INT32CFX_Arc
 Type definition for arc class for integer.
 
typedef CFX_ATemplate< FX_FLOATCFX_ArcF
 Type definition for arc class for float.
 
typedef CFX_ArrayTemplate< FX_BYTECFX_ByteArray
 Type definition for a byte array type.
 
typedef CFX_ObjectArray< CFX_ByteStringCFX_ByteStringArray
 Type definition for a CFX_ByteString array type.
 
typedef CFX_ArrayTemplate< FX_DWORDCFX_DWordArray
 Type definition for a double-word array type.
 
typedef CFX_ListArrayTemplate< CFX_SortListArray< sizeof(FX_DWORD)>, FX_DWORDCFX_DWordListArray
 Type definition for FX_DWORD list array.
 
typedef CFX_ETemplate< FX_INT32CFX_Ellipse
 Type definition for ellipse class for integer.
 
typedef CFX_ETemplate< FX_FLOATCFX_EllipseF
 Type definition for ellipse class for float.
 
typedef CFX_ArrayTemplate< FX_INT64 > CFX_FileSizeArray
 Type definition for file size array type.
 
typedef CFX_ListArrayTemplate< CFX_SortListArray< sizeof(FX_INT64)>, FX_INT64 > CFX_FileSizeListArray
 Type definition for file size list array.
 
typedef CFX_ArrayTemplate< FX_FLOATCFX_FloatArray
 Type definition for float array.
 
typedef CFX_ArrayTemplate< FX_INT32CFX_Int32Array
 Type definition for INT32 array.
 
typedef CFX_PRLTemplate< FX_INT32CFX_Parallelogram
 Type definition for parallelogram class for integer.
 
typedef CFX_PRLTemplate< FX_FLOATCFX_ParallelogramF
 Type definition for parallelogram class for float.
 
typedef CFX_PSVTemplate< FX_INT32CFX_Point
 Type definition for point class for integer.
 
typedef CFX_PSVTemplate< FX_FLOATCFX_PointF
 Type definition for point class for float.
 
typedef CFX_ArrayTemplate< CFX_PointCFX_Points
 Type definition for integer point array.
 
typedef CFX_ArrayTemplate< CFX_PointFCFX_PointsF
 Type definition for float point array.
 
typedef CFX_ArrayTemplate< void * > CFX_PtrArray
 Type definition for: a typeless pointer array type.
 
typedef CFX_RTemplate< FX_INT32CFX_Rect
 Type definition for rectangle class for integer.
 
typedef CFX_ArrayTemplate< CFX_FloatRectCFX_RectArray
 Rectangle array.
 
typedef CFX_RTemplate< FX_FLOATCFX_RectF
 Type definition for rectangle class for float.
 
typedef CFX_ArrayTemplate< CFX_RectFCFX_RectFArray
 Type definition for rect array.
 
typedef CFX_RRTemplate< FX_INT32CFX_RoundRect
 Type definition for round-corner rectangle class for integer.
 
typedef CFX_RRTemplate< FX_FLOATCFX_RoundRectF
 Type definition for round-corner rectangle class for float.
 
typedef CFX_PSVTemplate< FX_INT32CFX_Size
 Type definition for size class for integer.
 
typedef CFX_PSVTemplate< FX_FLOATCFX_SizeF
 Type definition for size class for float.
 
typedef CFX_VTemplate< FX_INT32CFX_Vector
 Vector class for integer.
 
typedef CFX_VTemplate< FX_FLOATCFX_VectorF
 Vector class for float.
 
typedef CFX_ArrayTemplate< FX_WCHARCFX_WCHARArray
 Type definition for FX_WHAR array.
 
typedef CFX_ObjectArray< CFX_WideStringCFX_WideStringArray
 Type definition for a CFX_WideString array type.
 
typedef CFX_ArrayTemplate< FX_WORDCFX_WordArray
 Type definition for a word array type.
 
typedef const CFX_PSVTemplate< FX_INT32 > * FX_LPCPOINT
 Type definition for constant pointer to integer point.
 
typedef const CFX_PSVTemplate< FX_FLOAT > * FX_LPCPOINTF
 Type definition for constant pointer to float point.
 
typedef const CFX_RTemplate< FX_INT32 > * FX_LPCRECT
 Type definition for constant pointer to integer rectangle.
 
typedef const CFX_RTemplate< FX_FLOAT > * FX_LPCRECTF
 Type definition for constant pointer to float rectangle.
 
typedef CFX_PSVTemplate< FX_INT32 > * FX_LPPOINT
 Type definition for pointer to integer point.
 
typedef CFX_PSVTemplate< FX_FLOAT > * FX_LPPOINTF
 Type definition for pointer to float point.
 
typedef CFX_RTemplate< FX_INT32 > * FX_LPRECT
 Type definition for pointer to integer rectangle.
 
typedef CFX_RTemplate< FX_FLOAT > * FX_LPRECTF
 Type definition for pointer to float rectangle.
 
typedef int FX_STRSIZE
 String size is limited to 2^31-1.
 
typedef void(* PD_CALLBACK_FREEDATA) (FX_LPVOID pData)
 

Enumerations

enum  FX_ProgressiveStatus {
  Ready, ToBeContinued, Found, NotFound,
  Failed, Done
}
 Enumeration for progressive status. More...
 

Functions

 CFX_ByteString::CFX_ByteString ()
 Construct a null byte string.
 
 CFX_ByteString::CFX_ByteString (char ch)
 Construct from a single character. More...
 
 CFX_ByteString::CFX_ByteString (const CFX_ByteString &str)
 Copy constructor. More...
 
 CFX_ByteString::CFX_ByteString (FX_BSTR bstrc)
 Construct from a constant ref to a CFX_ByteStringC object. More...
 
 CFX_ByteString::CFX_ByteString (FX_BSTR bstrc1, FX_BSTR bstrc2)
 Concatenate constructor. More...
 
 CFX_ByteString::CFX_ByteString (FX_LPCBYTE ptr, FX_STRSIZE len)
 Construct from a byte string. More...
 
 CFX_ByteString::CFX_ByteString (FX_LPCSTR ptr, FX_STRSIZE len=-1)
 Construct from a character string. More...
 
 CFX_ByteStringC::CFX_ByteStringC ()
 Constructs a null constant string.
 
 CFX_ByteStringC::CFX_ByteStringC (const CFX_ByteString &src)
 Construct from a byte string. More...
 
 CFX_ByteStringC::CFX_ByteStringC (const CFX_ByteStringC &src)
 Copy constructor. More...
 
 CFX_ByteStringC::CFX_ByteStringC (const FX_CHAR &ch)
 Construct from a single character. More...
 
 CFX_ByteStringC::CFX_ByteStringC (FX_LPCBYTE ptr, FX_STRSIZE size)
 Constructs from a byte string. More...
 
 CFX_ByteStringC::CFX_ByteStringC (FX_LPCSTR ptr)
 Construct from a character string. More...
 
 CFX_ByteStringC::CFX_ByteStringC (FX_LPCSTR ptr, FX_STRSIZE len)
 Construct from a character string. More...
 
 CFX_CachedFileRead::CFX_CachedFileRead ()
 Constructor.
 
 CFX_ChunkFileStreamsManager::CFX_ChunkFileStreamsManager (IFX_FileStream *pFileStream, size_t nChunkSize=1024)
 Construct the Chunk-Based file stream manager. More...
 
 CFX_StringBufBase::CFX_StringBufBase (FX_STRSIZE limit)
 A Constructor. More...
 
 CFX_StringBufTemplate< limit >::CFX_StringBufTemplate ()
 A constructor.
 
 CFX_WideString::CFX_WideString ()
 Construct a null wide string.
 
 CFX_WideString::CFX_WideString (const CFX_WideString &str)
 Copy constructor. More...
 
 CFX_WideString::CFX_WideString (const CFX_WideStringC &str)
 Construct from a constant ref to a CFX_WideStringC object. More...
 
 CFX_WideString::CFX_WideString (const CFX_WideStringC &str1, const CFX_WideStringC &str2)
 Concatenate constructor. More...
 
 CFX_WideString::CFX_WideString (FX_LPCWSTR ptr, FX_STRSIZE len=-1)
 Construct from a wide character string. More...
 
 CFX_WideString::CFX_WideString (FX_WCHAR ch)
 Construct from a single wide character. More...
 
 CFX_WideStringC::CFX_WideStringC ()
 Constructs a null constant string.
 
 CFX_WideStringC::CFX_WideStringC (const CFX_WideStringC &src)
 Copy constructor. More...
 
 CFX_WideStringC::CFX_WideStringC (FX_LPCWSTR ptr)
 Construct from a character string. More...
 
 CFX_WideStringC::CFX_WideStringC (FX_LPCWSTR ptr, FX_STRSIZE len)
 Construct from a character string. More...
 
 CFX_WideStringC::CFX_WideStringC (FX_WCHAR &ch)
 Construct from a single character. More...
 
 CFX_ByteString::~CFX_ByteString ()
 
virtual CFX_CachedFileRead::~CFX_CachedFileRead ()
 Destructor.

 
 CFX_ChunkFileStreamsManager::~CFX_ChunkFileStreamsManager ()
 Destructor. More...
 
 CFX_WideString::~CFX_WideString ()
 The Destructor.
 
void CFX_StringBufBase::Append (FX_BSTR str)
 Append a non-buffered byte string. More...
 
void CFX_StringBufBase::Append (int i, FX_DWORD flags=0)
 Append an integer. See FXFORMAT_xxx for flags. More...
 
virtual void IFX_MemoryStream::AttachBuffer (FX_LPBYTE pBuffer, size_t nSize, FX_BOOL bTakeOver=false)=0
 Attach a memory buffer. More...
 
FX_BOOL CFX_CachedFileRead::AttachFile (IFX_FileRead *pFile, FX_BOOL bTakeOver)
 Attach a file read. More...
 
virtual void IFX_FileRead::ClearRange ()
 Clear accessing range set by function IFX_FileRead::SetRange. More...
 
int CFX_WideString::Compare (const CFX_WideString &str) const
 Compare the the string with another. Case-sensitive. More...
 
int CFX_ByteString::Compare (FX_BSTR str) const
 Compare the the string with another. Case-sensitive. More...
 
int CFX_WideString::Compare (FX_LPCWSTR str) const
 Compare current string with a wide character string. Case-sensitive. More...
 
int CFX_WideString::CompareNoCase (FX_LPCWSTR str) const
 Compare the the string with a wide character string. No case-insensitive. More...
 
void CFX_WideString::ConvertFrom (const CFX_ByteString &str, CFX_CharMap *pCharMap=NULL)
 Load MBCS data into this wide string, using specified character mapper. More...
 
void CFX_ByteString::ConvertFrom (const CFX_WideString &str, CFX_CharMap *pCharMap=NULL)
 Load unicode data into this byte string, using specified character mapper. If no character mapper specified, the system default mapper will be used. More...
 
void CFX_StringBufBase::Copy (FX_BSTR str)
 Copy from a non-buffered byte string. More...
 
IFX_ChunkFileStreamCFX_ChunkFileStreamsManager::CreateChunkFileStream ()
 Create a Chunk-Based file stream. More...
 
virtual IFX_FileStreamIFX_FileAccess::CreateFileStream (FX_DWORD dwModes)=0
 Create IFX_FileStream to operate file. More...
 
FX_STRSIZE CFX_ByteString::Delete (FX_STRSIZE index, FX_STRSIZE count=1)
 Delete one or more characters starting from specific position. More...
 
FX_STRSIZE CFX_WideString::Delete (FX_STRSIZE index, FX_STRSIZE count=1)
 Delete one or more wide characters starting from specific position. More...
 
virtual void IFX_MemoryStream::DetachBuffer ()=0
 Detach the current memory buffer. More...
 
void CFX_ByteString::Empty ()
 Set this string to be empty. More...
 
void CFX_StringBufBase::Empty ()
 Set this string to be empty. More...
 
void CFX_WideString::Empty ()
 Set this string to be empty. More...
 
bool CFX_WideString::Equal (const CFX_WideStringC &str) const
 Check if current string is equal to another. More...
 
bool CFX_ByteString::Equal (FX_BSTR str) const
 Check if current string is equal to another one. Case-sensitive. More...
 
bool CFX_ByteString::EqualNoCase (FX_BSTR str) const
 Check if current string is equal to another one, not considering case. More...
 
virtual void IFX_MemoryStream::EstimateSize (size_t nInitSize, size_t nGrowSize)=0
 Change initialize size and grow size. More...
 
FX_STRSIZE CFX_ByteString::Find (FX_BSTR lpszSub, FX_STRSIZE start=0) const
 Find a sub-string, from specific position. Only first occurrence is found. More...
 
FX_STRSIZE CFX_ByteString::Find (FX_CHAR ch, FX_STRSIZE start=0) const
 Find a character, from specific position. Only first occurrence is found. More...
 
FX_STRSIZE CFX_WideString::Find (FX_LPCWSTR lpszSub, FX_STRSIZE start=0) const
 Find a sub-string, from specific position. Only first occurrence is found. More...
 
FX_STRSIZE CFX_WideString::Find (FX_WCHAR ch, FX_STRSIZE start=0) const
 Find a character, from specific position. Only first occurrence is found. More...
 
virtual FX_BOOL IFX_StreamWrite::Flush ()
 Flush stream data. More...
 
virtual FX_BOOL CFX_CachedFileRead::Flush ()
 Flush internal buffer. Unsupported for reading mode, return false directly.
 
virtual FX_BOOL IFX_FileWrite::Flush ()=0
 Flush internal buffer of the file. More...
 
virtual FX_BOOL IFX_FileStream::Flush ()=0
 Flush internal buffer. More...
 
virtual FX_BOOL IFX_ChunkFileStream::Flush ()=0
 Flush internal buffer. More...
 
void CFX_ByteString::Format (FX_LPCSTR lpszFormat,...)
 Format a number of parameters into this byte string. More...
 
void CFX_WideString::Format (FX_LPCWSTR lpszFormat,...)
 Format a number of parameters into this wide string. More...
 
static CFX_ByteString CFX_ByteString::FormatFloat (FX_FLOAT f, int precision=0)
 Convert from floating-point number. More...
 
static CFX_ByteString CFX_ByteString::FormatInteger (FX_INT32 i, FX_DWORD flags=0)
 Convert from Integer. More...
 
void CFX_ByteString::FormatV (FX_LPCSTR lpszFormat, va_list argList)
 Format a number of parameters into this byte string, using va_list. More...
 
void CFX_WideString::FormatV (FX_LPCWSTR lpszFormat, va_list argList)
 Format a number of parameters into this wide string. using va_list. More...
 
static CFX_WideString CFX_WideString::FromLocal (const char *str, FX_STRSIZE len=-1)
 Create a wide string from system multi-byte charset. More...
 
static CFX_ByteString CFX_ByteString::FromUnicode (const CFX_WideString &str)
 Create a CFX_ByteString object from a CFX_WideString object. More...
 
static CFX_ByteString CFX_ByteString::FromUnicode (FX_LPCWSTR ptr, FX_STRSIZE len=-1)
 Create a CFX_ByteString object from a Unicode string. Convert from Unicode to system multi-byte charset. More...
 
static CFX_WideString CFX_WideString::FromUTF16BE (const unsigned short *str, FX_STRSIZE len=-1)
 Create a wide string from UTF16BE encoded string. More...
 
static CFX_WideString CFX_WideString::FromUTF16LE (const unsigned short *str, FX_STRSIZE len=-1)
 Create a wide string from UTF16LE encoded string. More...
 
static CFX_WideString CFX_WideString::FromUTF8 (const char *str, FX_STRSIZE len=-1)
 Create a wide string from UTF-8 string (ASCII string compatible). More...
 
void FX_CloseFolder (void *handle)
 Close folder handle. More...
 
FX_BOOL FX_CreateFolder (FX_LPCSTR path)
 Create new folder. More...
 
FX_BOOL FX_CreateFolder (FX_LPCWSTR path)
 Create new folder. More...
 
CFX_WideString FX_DecodeURI (const CFX_ByteString &bsURI)
 A simple URI Decode. More...
 
CFX_ByteString FX_EncodeURI (const CFX_WideString &wsURI)
 A simple URI encode. More...
 
FX_WCHAR FX_GetFolderSeparator ()
 Get folder separator for the system. Most likely it's either /' or '\'. More...
 
FX_BOOL FX_GetNextFile (void *handle, CFX_ByteString &filename, FX_BOOL &bFolder, FX_LPCSTR absPath=0)
 Read next entry in the folder. More...
 
FX_BOOL FX_GetNextFile (void *handle, CFX_WideString &filename, FX_BOOL &bFolder, FX_LPCSTR absPath=0)
 Read next entry in the folder. More...
 
FX_BOOL FX_IsFilePathExist (FX_LPCWSTR path)
 Check if the path exists, including file path and folder path. More...
 
FX_BOOL FX_IsRectAdjacent (const CFX_FloatRect &rect1, const CFX_FloatRect &rect2, FX_FLOAT alignmentTolerance, FX_FLOAT distanceTolerance, int direction)
 Check if a rectangle is adjacent to the other rectangle in the horizontal or vertical direction. More...
 
void * FX_OpenFolder (FX_LPCSTR path)
 Open a folder for reading. More...
 
void * FX_OpenFolder (FX_LPCWSTR path)
 Open a folder for reading. More...
 
CFX_WideString FX_UrlDecode (const CFX_ByteString &bsUrl)
 A simple URL decode. More...
 
CFX_ByteString FX_UrlEncode (const CFX_WideString &wsUrl)
 A simple URL encode. More...
 
FXMEM_FoxitMgr * FXMEM_CreateFixedMgr (void *pMemory, size_t size, FXMEM_SystemMgr2 *pExtender)
 Create a Foxit manager from a pre-allocated, fixed memory buffer. More...
 
FXMEM_FoxitMgr * FXMEM_CreateFoxitMgr (FXMEM_SystemMgr *pSystemMgr)
 Create a Foxit manager. A system manager must be provided for actual allocation. More...
 
FXMEM_FoxitMgr * FXMEM_CreateMemoryMgr (size_t size, FX_BOOL extensible)
 Create a fixed memory manager as default implementation. More...
 
FXMEM_FoxitMgr * FXMEM_CreatePyMgr ()
 Create a Python manager. A fast, special-purpose memory allocator for small blocks, to be used on top of a general-purpose malloc – heavily based on previous art. More...
 
void FXMEM_DestroyFoxitMgr (FXMEM_FoxitMgr *pFoxitMgr)
 Destroy a Foxit manager instance. If the platform supports auto-collection, then all allocated memory blocks will be released. More...
 
size_t FXMEM_GetBlockSizeInFixedMgr (FXMEM_FoxitMgr *pFoxitMgr, void *ptr)
 Get the size of a memory block to which ptr points. More...
 
FXMEM_FoxitMgr * FXMEM_GetDefaultMgr ()
 Get default memory manager for current module. More...
 
void FXMEM_ResetSystemMgr ()
 Reset Foxit system memory manager for current module. More...
 
void FXMEM_SetDefaultMgr (FXMEM_FoxitMgr *pFoxitMgr)
 Set default Foxit manager for current compile module (EXE, DLL, etc.). More...
 
int FXMEM_SetPyConfig (size_t lowByteRange, size_t highByteRange)
 Set configuration of Python memory. More...
 
FX_BYTE CFX_ByteStringC::GetAt (FX_STRSIZE index) const
 This method retrieves a single byte specified by an index number. More...
 
FX_WCHAR CFX_WideStringC::GetAt (FX_STRSIZE index) const
 Retrieves a single byte specified by an index number. More...
 
FX_BYTE CFX_ByteString::GetAt (FX_STRSIZE nIndex) const
 Get a single byte specified by an index number. More...
 
FX_WCHAR CFX_WideString::GetAt (FX_STRSIZE nIndex) const
 Retrieves a single wide character specified by an index number. More...
 
virtual FX_LPCBYTE IFX_BufferRead::GetBlockBuffer ()=0
 Get internal buffer of block data. More...
 
virtual FX_INT64 IFX_BufferRead::GetBlockOffset ()=0
 Get the offset of data in internal buffer. More...
 
virtual size_t IFX_BufferRead::GetBlockSize ()=0
 Get the size of data in internal buffer. More...
 
virtual FX_LPBYTE IFX_MemoryStream::GetBuffer () const =0
 Get the current memory buffer. More...
 
FX_LPSTR CFX_ByteString::GetBuffer (FX_STRSIZE len)
 Get a buffer with specific number of bytes allocated. More...
 
FX_LPWSTR CFX_WideString::GetBuffer (FX_STRSIZE len)
 Get a buffer with specific number of characters allocated. More...
 
FX_LPCSTR CFX_ByteStringC::GetCStr () const
 Get a constant character string pointer to the byte string. More...
 
FX_FLOAT CFX_WideString::GetFloat () const
 Convert to other data type. More...
 
FX_DWORD CFX_ByteStringC::GetID (FX_STRSIZE start_pos=0) const
 Get a DWORD identifier of the string, from a particular position. More...
 
FX_DWORD CFX_ByteString::GetID (FX_STRSIZE start_pos=0) const
 Get a DWORD identifier of the string. See function CFX_ByteStringC::GetID for details. More...
 
int CFX_WideString::GetInteger () const
 Convert to other data type. More...
 
FX_STRSIZE CFX_ByteStringC::GetLength () const
 Get the length of the byte string. More...
 
FX_STRSIZE CFX_ByteString::GetLength () const
 Get number of bytes in the byte string (not counting any possible terminator). More...
 
FX_STRSIZE CFX_WideStringC::GetLength () const
 Get the length of the byte string. More...
 
FX_STRSIZE CFX_WideString::GetLength () const
 Get number of characters, not bytes. Trailing zero not counted. More...
 
virtual void IFX_FileAccess::GetPath (CFX_WideString &wsPath)=0
 Get current path string. More...
 
virtual FX_INT64 IFX_FileRead::GetPosition ()
 Get the current reading position in stream. More...
 
virtual FX_INT64 CFX_CachedFileRead::GetPosition ()
 Get the current reading position in stream. More...
 
virtual FX_INT64 IFX_StreamRead::GetPosition ()=0
 Get the current reading position in stream. More...
 
virtual FX_INT64 IFX_FileStream::GetPosition ()=0
 Get the current reading position in stream. More...
 
virtual FX_INT64 IFX_ChunkFileStream::GetPosition ()=0
 Get the current reading position in stream. More...
 
virtual FX_INT64 IFX_BufferRead::GetPosition ()=0
 Get the current reading position in stream. More...
 
FX_LPCBYTE CFX_ByteStringC::GetPtr () const
 Get a constant byte string pointer to the byte string. More...
 
FX_CHARCFX_StringBufBase::GetPtr () const
 Get a C-style string pointer to the string buffer. More...
 
FX_LPCWSTR CFX_WideStringC::GetPtr () const
 Get a constant wide string pointer to the wide string. More...
 
virtual FX_INT64 CFX_CachedFileRead::GetSize ()
 Get total size of the file. More...
 
FX_STRSIZE CFX_StringBufBase::GetSize () const
 Gets the length of the string. More...
 
virtual FX_INT64 IFX_FileWrite::GetSize ()=0
 Get total size of the file. More...
 
virtual FX_INT64 IFX_FileRead::GetSize ()=0
 Get total size of the file. More...
 
virtual FX_INT64 IFX_FileStream::GetSize ()=0
 Get the current stream size, in bytes. More...
 
virtual FX_INT64 IFX_ChunkFileStream::GetSize ()=0
 Get the current stream size, in bytes. More...
 
CFX_ByteString CFX_StringBufBase::GetString () const
 Get a buffered byte string. More...
 
CFX_ByteStringC CFX_StringBufBase::GetStringC () const
 Get a non-buffered byte string. More...
 
FX_BOOL CFX_CachedFileRead::Init (FX_INT32 nChunkSize, FX_INT32 nChunkCount, FX_LPVOID pBuffer, IFX_Allocator *pAllocator=0)
 Initialize the chunk size and chunk count. More...
 
FX_STRSIZE CFX_ByteString::Insert (FX_STRSIZE index, FX_CHAR ch)
 Insert a character before specific position. More...
 
FX_STRSIZE CFX_WideString::Insert (FX_STRSIZE index, FX_WCHAR ch)
 Insert a wide character before specific position. More...
 
virtual FX_BOOL IFX_MemoryStream::IsConsecutive () const =0
 Determine whether the current mode is consecutive or not. More...
 
bool CFX_ByteStringC::IsEmpty () const
 Check whether current string object is empty. More...
 
bool CFX_ByteString::IsEmpty () const
 Check whether current string object is empty. More...
 
bool CFX_WideStringC::IsEmpty () const
 Determines whether current string object is empty. More...
 
FX_BOOL CFX_WideString::IsEmpty () const
 Check whether current string object is empty. More...
 
virtual FX_BOOL IFX_FileRead::IsEOF ()
 Determine whether reach the end of stream. More...
 
virtual FX_BOOL CFX_CachedFileRead::IsEOF ()
 Determine whether reach the end of stream. More...
 
virtual FX_BOOL IFX_StreamRead::IsEOF ()=0
 Determine whether reach the end of stream. More...
 
virtual FX_BOOL IFX_FileStream::IsEOF ()=0
 Determine whether reach the end of stream. More...
 
virtual FX_BOOL IFX_ChunkFileStream::IsEOF ()=0
 Determine whether reach the end of stream. More...
 
virtual FX_BOOL IFX_BufferRead::IsEOF ()=0
 Determine whether reach the end of stream. More...
 
CFX_ByteString CFX_ByteString::Left (FX_STRSIZE count) const
 Extracts the first (leftmost) count bytes from this CFX_ByteString object as a sub-string. More...
 
CFX_WideStringC CFX_WideStringC::Left (FX_STRSIZE count) const
 Extracts the first (leftmost) count wide characters from this CFX_WideStringC object as a sub-string. More...
 
CFX_WideString CFX_WideString::Left (FX_STRSIZE count) const
 Extracts the first (leftmost) count wide characters from this CFX_WideString object as a sub-string. More...
 
void CFX_ByteString::Load (FX_LPCBYTE str, FX_STRSIZE len)
 Load from a byte string. More...
 
static CFX_ByteString CFX_ByteString::LoadFromFile (FX_BSTR file_path)
 Load the whole content of a file. More...
 
FX_LPSTR CFX_ByteString::LockBuffer ()
 Lock and get the current string buffer, so the caller can modify the returned buffer. More...
 
FX_LPWSTR CFX_WideString::LockBuffer ()
 Lock and get the current string buffer, so the caller can modify the returned buffer. Caller can modified the returned buffer, and should call CFX_WideString::ReleaseBuffer after modification done. More...
 
void CFX_ByteString::MakeLower ()
 Change case of English letters to lower. More...
 
void CFX_WideString::MakeLower ()
 Change case of English letters to lower. More...
 
void CFX_ByteString::MakeUpper ()
 Change case of English letters to upper. More...
 
void CFX_WideString::MakeUpper ()
 Change case of English letters to upper. More...
 
CFX_ByteString CFX_ByteString::Mid (FX_STRSIZE first) const
 Extracts a substring from this CFX_ByteString object, starting at position nFirst (zero-based) to last. More...
 
CFX_WideString CFX_WideString::Mid (FX_STRSIZE first) const
 Extracts a substring from this CFX_WideString object, starting at position nFirst (zero-based) to last. More...
 
CFX_ByteString CFX_ByteString::Mid (FX_STRSIZE first, FX_STRSIZE count) const
 Extracts a substring of count bytes from this CFX_ByteString object, starting at position nFirst (zero-based) to last. More...
 
CFX_WideString CFX_WideString::Mid (FX_STRSIZE first, FX_STRSIZE count) const
 Extracts a substring of count wide character from this CFX_WideString object, starting at position nFirst (zero-based) to last. More...
 
CFX_ByteStringC CFX_ByteStringC::Mid (FX_STRSIZE index, FX_STRSIZE count=-1) const
 This method extracts a substring of length count bytes from this CFX_ByteStringC object, starting at position index (zero-based). More...
 
CFX_WideStringC CFX_WideStringC::Mid (FX_STRSIZE index, FX_STRSIZE count=-1) const
 Extracts a substring of length count bytes from this CFX_WideStringC object, starting at position index (zero-based). More...
 
 CFX_ByteStringC::operator FX_LPCBYTE () const
 This casting operator accesses the byte string referred in a CFX_ByteStringC object. More...
 
 CFX_ByteString::operator FX_LPCBYTE () const
 FX_LPCBYTE type conversion operator. CFX_ByteString can be used in places where FX_LPCSTR or FX_LPCBYTE is needed.
 
 CFX_ByteString::operator FX_LPCSTR () const
 FX_LPCSTR type conversion operator. CFX_ByteString can be used in places where FX_LPCSTR or FX_LPCBYTE is needed.
 
 CFX_WideString::operator FX_LPCWSTR () const
 FX_LPCWSTR type conversion operator.
 
bool CFX_ByteString::operator!= (const CFX_ByteString &str) const
 Comparison(!=) operator overload. case-sensitive. More...
 
bool CFX_ByteStringC::operator!= (const CFX_ByteStringC &str) const
 Comparison(!=) operator overload. case-sensitive. More...
 
bool CFX_WideStringC::operator!= (const CFX_WideStringC &str) const
 Comparison(!=) operator overload. Case-sensitive. More...
 
bool CFX_ByteString::operator!= (FX_BSTR str) const
 Comparison(!=) operator overload. case-sensitive. More...
 
bool CFX_ByteString::operator!= (FX_LPCSTR str) const
 Comparison(!=) operator overload. case-sensitive. More...
 
const CFX_ByteStringCFX_ByteString::operator+= (const CFX_ByteString &str)
 Concatenation(+=) operator overload. Concatenate a CFX_ByteString object. More...
 
const CFX_WideStringCFX_WideString::operator+= (const CFX_WideString &str)
 Concatenation(+=) operator overload. Concatenate a wide string. More...
 
const CFX_WideStringCFX_WideString::operator+= (const CFX_WideStringC &str)
 Concatenation(+=) operator overload. Concatenate a constant wide string. More...
 
const CFX_ByteStringCFX_ByteString::operator+= (FX_BSTR bstrc)
 Concatenation(+=) operator overload. Concatenate a constant CFX_ByteStringC object. More...
 
const CFX_ByteStringCFX_ByteString::operator+= (FX_CHAR ch)
 Concatenation(+=) operator overload. Concatenate a single character. More...
 
const CFX_ByteStringCFX_ByteString::operator+= (FX_LPCSTR str)
 Concatenation(+=) operator overload. Concatenate a null-terminated character string. More...
 
const CFX_WideStringCFX_WideString::operator+= (FX_LPCWSTR str)
 Concatenation(+=) operator overload. Concatenate a wide character string. More...
 
const CFX_WideStringCFX_WideString::operator+= (FX_WCHAR ch)
 Concatenation(+=) operator overload. Concatenate a single wide character. More...
 
bool CFX_ByteString::operator< (const CFX_ByteString &rhs) const
 Comparison(<) operator overload. case-sensitive. More...
 
const CFX_ByteStringCFX_ByteString::operator= (const CFX_BinaryBuf &buf)
 Assignment(=) operator overload. From a CFX_BinaryBuf object. More...
 
CFX_ByteStringCCFX_ByteStringC::operator= (const CFX_ByteString &src)
 Assignment(=) operator overload. From a CFX_ByteString object. More...
 
const CFX_ByteStringCFX_ByteString::operator= (const CFX_ByteString &stringSrc)
 Assignment(=) operator overload. From a CFX_ByteString object. More...
 
CFX_ByteStringCCFX_ByteStringC::operator= (const CFX_ByteStringC &src)
 Assignment(=) operator overload. From a CFX_ByteStringC object. More...
 
const CFX_WideStringCFX_WideString::operator= (const CFX_WideString &stringSrc)
 Assignment(=) operator overload. From a wide string. More...
 
CFX_WideStringCCFX_WideStringC::operator= (const CFX_WideStringC &src)
 Assignment(=) operator overload. From a CFX_WideStringC object. More...
 
const CFX_WideStringCFX_WideString::operator= (const CFX_WideStringC &stringSrc)
 Assignment(=) operator overload. From a const wide string. More...
 
const CFX_ByteStringCFX_ByteString::operator= (FX_BSTR bstrc)
 Assignment(=) operator overload. From a constant byte string. More...
 
CFX_ByteStringCCFX_ByteStringC::operator= (FX_LPCSTR src)
 Assignment(=) operator overload. From a character string. More...
 
const CFX_ByteStringCFX_ByteString::operator= (FX_LPCSTR str)
 Assignment(=) operator overload. From a character string. More...
 
CFX_WideStringCCFX_WideStringC::operator= (FX_LPCWSTR src)
 Assignment(=) operator overload. From a character string. More...
 
const CFX_WideStringCFX_WideString::operator= (FX_LPCWSTR str)
 Assignment(=) operator overload. From a wide character string. More...
 
bool CFX_ByteString::operator== (const CFX_ByteString &str) const
 Comparison(==) operator overload. case-sensitive. More...
 
bool CFX_ByteStringC::operator== (const CFX_ByteStringC &str) const
 Comparison(==) operator overload. case-sensitive. More...
 
bool CFX_WideStringC::operator== (const CFX_WideStringC &str) const
 Comparison(==) operator overload. Case-sensitive. More...
 
bool CFX_ByteString::operator== (FX_BSTR str) const
 Comparison(==) operator overload. case-sensitive. More...
 
bool CFX_ByteString::operator== (FX_LPCSTR str) const
 Comparison(==) operator overload. case-sensitive. More...
 
FX_BYTE CFX_ByteString::operator[] (FX_STRSIZE nIndex) const
 Subscript([]) operator overload. It retrieves a single byte specified by the zero-based index in nIndex. More...
 
FX_WCHAR CFX_WideString::operator[] (FX_STRSIZE nIndex) const
 Subscript([]) operator overload. It retrieves a wide character specified by the zero-based index in nIndex. More...
 
FX_BOOL CFX_CachedFileRead::PreCache (FX_INT64 offset, FX_INT32 nCacheCount)
 Attach a file read. More...
 
virtual FX_BOOL CFX_CachedFileRead::ReadBlock (void *buffer, FX_INT64 offset, size_t size)
 Read a data block from the file. More...
 
virtual FX_BOOL IFX_FileRead::ReadBlock (void *buffer, FX_INT64 offset, size_t size)=0
 Read a data block from the file. More...
 
virtual FX_BOOL IFX_FileStream::ReadBlock (void *buffer, FX_INT64 offset, size_t size)=0
 Read a data block from stream. More...
 
virtual FX_BOOL IFX_ChunkFileStream::ReadBlock (void *buffer, FX_INT64 offset, size_t size)=0
 Read a data block from stream. More...
 
virtual size_t IFX_FileRead::ReadBlock (void *buffer, size_t size)
 Read data block from stream. More...
 
virtual size_t CFX_CachedFileRead::ReadBlock (void *buffer, size_t size)
 Read data block from stream. More...
 
virtual size_t IFX_StreamRead::ReadBlock (void *buffer, size_t size)=0
 Read data block from sequential stream. More...
 
virtual size_t IFX_FileStream::ReadBlock (void *buffer, size_t size)=0
 Read data block from stream. More...
 
virtual size_t IFX_ChunkFileStream::ReadBlock (void *buffer, size_t size)=0
 Read data block from stream. More...
 
virtual size_t IFX_BufferRead::ReadBlock (void *buffer, size_t size)=0
 Read data block from sequential stream. More...
 
virtual FX_BOOL IFX_BufferRead::ReadNextBlock (FX_BOOL bRestart=false)=0
 Read the next block in sequential stream. More...
 
virtual void CFX_CachedFileRead::Release ()
 Destroy the current instance. More...
 
virtual void IFX_StreamWrite::Release ()=0
 Called when to release everything.
 
virtual void IFX_FileWrite::Release ()=0
 Called when to release everything.
 
virtual void IFX_StreamRead::Release ()=0
 Called when to release everything. More...
 
virtual void IFX_FileRead::Release ()=0
 Called when to release everything. More...
 
virtual void IFX_FileStream::Release ()=0
 Destroy the current instance. More...
 
virtual void IFX_ChunkFileStream::Release ()=0
 Destroy the current instance. More...
 
virtual void IFX_FileAccess::Release ()=0
 Destroy the current instance. More...
 
virtual void IFX_BufferRead::Release ()=0
 Called when to release the current instance. More...
 
void CFX_ByteString::ReleaseBuffer (FX_STRSIZE len=-1)
 Release the buffer fetched by function CFX_ByteString::GetBuffer or CFX_ByteString::LockBuffer, and set the length of modified string. More...
 
void CFX_WideString::ReleaseBuffer (FX_STRSIZE len=-1)
 Release the buffer fetched by function CFX_WideString::GetBuffer or CFX_WideString::LockBuffer, and set the length of modified string. More...
 
FX_STRSIZE CFX_ByteString::Remove (FX_CHAR ch)
 Remove all occurrence of a particular character. More...
 
FX_STRSIZE CFX_WideString::Remove (FX_WCHAR ch)
 Remove all occurrence of a particular character. More...
 
FX_STRSIZE CFX_ByteString::Replace (FX_BSTR lpszOld, FX_BSTR lpszNew)
 Replace all patterns in the string with a new sub-string. More...
 
FX_STRSIZE CFX_WideString::Replace (FX_LPCWSTR lpszOld, FX_LPCWSTR lpszNew)
 Replace all patterns in the string with a new sub-string. More...
 
void CFX_ByteString::Reserve (FX_STRSIZE len)
 Reserve a buffer that can hold specific number of bytes. More...
 
void CFX_WideString::Reserve (FX_STRSIZE len)
 Reserve a buffer that can hold specific number of characters. More...
 
virtual IFX_FileStreamCFX_CachedFileRead::Retain ()
 Create a shared instance. More...
 
virtual IFX_FileStreamIFX_FileStream::Retain ()=0
 Create a shared instance. More...
 
virtual IFX_FileStreamIFX_ChunkFileStream::Retain ()=0
 Create a shared instance. More...
 
virtual IFX_FileAccessIFX_FileAccess::Retain ()=0
 Create a shared instance. More...
 
FX_STRSIZE CFX_ByteString::ReverseFind (FX_CHAR ch) const
 Find a character from end of the string. More...
 
CFX_ByteString CFX_ByteString::Right (FX_STRSIZE count) const
 Extracts the last (rightmost) count bytes from this CFX_ByteString object as a sub-string. More...
 
CFX_WideStringC CFX_WideStringC::Right (FX_STRSIZE count) const
 Extracts the last (rightmost) count wide characters from this CFX_WideStringC object as a sub-string. More...
 
CFX_WideString CFX_WideString::Right (FX_STRSIZE count) const
 Extracts the last (rightmost) count wide characters from this CFX_WideString object as a sub-string. More...
 
void CFX_ByteString::SetAt (FX_STRSIZE nIndex, FX_CHAR ch)
 Overwrites a single byte specified by an index number. More...
 
void CFX_WideString::SetAt (FX_STRSIZE nIndex, FX_WCHAR ch)
 Overwrites a single wide character specified by an index number. More...
 
virtual FX_INT64 IFX_StreamRead::SetPosition (FX_INT64 pos)
 Set the current file accessing position. More...
 
virtual FX_INT64 IFX_FileRead::SetPosition (FX_INT64 pos)
 Set the current file accessing position. More...
 
virtual FX_BOOL IFX_FileRead::SetRange (FX_INT64 offset, FX_INT64 size)
 Set accessing range. More...
 
void CFX_ByteString::TrimLeft ()
 Trim white spaces from the left side of the byte string. More...
 
void CFX_WideString::TrimLeft ()
 Trim white spaces from the left side of the wide string. More...
 
void CFX_ByteString::TrimLeft (FX_BSTR lpszTargets)
 Trim continuous occurrences of specified characters from left side of the byte string. More...
 
void CFX_ByteString::TrimLeft (FX_CHAR chTarget)
 Trim continuous occurrences of specified characters from left side of the byte string. More...
 
void CFX_WideString::TrimLeft (FX_LPCWSTR lpszTargets)
 Trim continuous occurrences of specified characters from left side of the wide string. More...
 
void CFX_WideString::TrimLeft (FX_WCHAR chTarget)
 Trim continuous occurrences of specified character from left side of the wide string. More...
 
void CFX_ByteString::TrimRight ()
 Trim white spaces from the right side of the byte string. More...
 
void CFX_WideString::TrimRight ()
 Trim white spaces from the right side of the wide string. More...
 
void CFX_ByteString::TrimRight (FX_BSTR lpszTargets)
 Trim continuous occurrences of specified characters from right side of the byte string. More...
 
void CFX_ByteString::TrimRight (FX_CHAR chTarget)
 Trim continuous occurrences of specified character from right side of the byte string. More...
 
void CFX_WideString::TrimRight (FX_LPCWSTR lpszTargets)
 Trim continuous occurrences of specified characters from right side of the wide string. More...
 
void CFX_WideString::TrimRight (FX_WCHAR chTarget)
 Trim continuous occurrences of specified character from right side of the wide string. More...
 
CFX_ByteString CFX_WideString::UTF16LE_Encode (FX_BOOL bTerminate=true) const
 Do UTF16LE encoding. More...
 
CFX_WideString CFX_ByteString::UTF8Decode () const
 Decode a UTF-8 unicode string (assume this byte string is UTF-8 encoded). More...
 
CFX_ByteString CFX_WideString::UTF8Encode () const
 Do UTF8 encoding. More...
 
virtual FX_BOOL CFX_CachedFileRead::WriteBlock (const void *buffer, FX_INT64 offset, size_t size)
 Write a block data into stream. Unsupported for reading mode, return false directly.
 
virtual FX_BOOL IFX_FileStream::WriteBlock (const void *buffer, FX_INT64 offset, size_t size)=0
 Write a block data into stream. More...
 
virtual FX_BOOL IFX_ChunkFileStream::WriteBlock (const void *buffer, FX_INT64 offset, size_t size)=0
 Write a block data into stream. More...
 
virtual FX_BOOL IFX_FileStream::WriteBlock (const void *buffer, size_t size)
 Write a block data to the end of current stream. More...
 
virtual FX_BOOL IFX_ChunkFileStream::WriteBlock (const void *buffer, size_t size)
 Write a block data to the end of current stream. More...
 
virtual FX_BOOL IFX_FileWrite::WriteBlock (const void *pData, FX_INT64 offset, size_t size)=0
 Write a block data. More...
 
virtual FX_BOOL IFX_FileWrite::WriteBlock (const void *pData, size_t size)
 Write a block data to the end. More...
 
virtual FX_BOOL IFX_StreamWrite::WriteBlock (const void *pData, size_t size)=0
 Write a block data. More...
 
static FX_STRSIZE CFX_WideString::WStringLength (const unsigned short *str)
 Length of string. More...
 

Variables

void *(* FXMEM_SystemMgr::Alloc )(struct _FXMEM_SystemMgr *pMgr, size_t size, int flags)
 A pointer type to an allocation function. More...
 
void *(* FXMEM_SystemMgr::AllocDebug )(struct _FXMEM_SystemMgr *pMgr, size_t size, int flags, FX_LPCSTR file, int line)
 A pointer type to a debug-mode allocation function. More...
 
void(* FXMEM_SystemMgr::CollectAll )(struct _FXMEM_SystemMgr *pMgr)
 A pointer type to a memory-collection function. More...
 
FX_HTHREAD(* FX_THREADHANDLER::CreateThread )(FX_LPVOID pUserData, FX_INT32 nPriority, size_t szStack, FX_CALLBACK_ThreadProc lpfThreadProc, FX_LPVOID param)
 Callback function to create a thread. More...
 
FX_WORD FXCRT_DATETIMEZONE::day
 Day of month, from 1 to 31.
 
FX_WORD FXCRT_DATETIMEZONE::dayOfWeek
 Day of week, from 0 to 6. PDF standard doesn't support now, you can omit this field if it is not applicable.
 
FX_BOOL(* FX_THREADHANDLER::ExitThread )(FX_LPVOID pUserData)
 Callback function to exit from the current thread. More...
 
void(* FXMEM_SystemMgr::Free )(struct _FXMEM_SystemMgr *pMgr, void *pointer, int flags)
 A pointer type to a free function. More...
 
void(* FXMEM_SystemMgr2::Free )(struct _FXMEM_SystemMgr2 *pMgr, void *memory)
 Called when an addition memory pool becomes empty. More...
 
const typedef CFX_ByteStringCFX_BSTR
 A reference to a constant CFX_ByteStringC object.
 
FX_HTHREAD(* FX_THREADHANDLER::GetCurrentThread )(FX_LPVOID pUserData)
 Callback function to get handle of the current thread. More...
 
FX_INT32(* FX_THREADHANDLER::GetThreadPriority )(FX_LPVOID pUserData, FX_HTHREAD hThread)
 Callback function to get thread priority. More...
 
FX_WORD FXCRT_DATETIMEZONE::hour
 Hour, from 0 to 23.
 
void *(* FXMEM_SystemMgr::Lock )(struct _FXMEM_SystemMgr *pMgr, void *handle)
 A pointer type to a lock function. More...
 
void *(* IFX_Allocator::m_Alloc )(struct _IFX_Allocator *pAllocator, size_t size)
 A pointer type to an allocation function. More...
 
void *(* IFX_Allocator::m_AllocDebug )(struct _IFX_Allocator *pAllocator, size_t size, FX_LPCSTR file, int line)
 A pointer type to a debug-mode allocation function. More...
 
FX_CHAR CFX_StringBufTemplate< limit >::m_Buffer [limit]
 The fixed string buffer. More...
 
void(* IFX_Allocator::m_Free )(struct _IFX_Allocator *pAllocator, void *p)
 A pointer type to a free function. More...
 
FX_STRSIZE CFX_StringData::m_nAllocLength
 Length of allocation.
 
FX_STRSIZE CFX_StringDataW::m_nAllocLength
 Length of allocation.
 
FX_STRSIZE CFX_StringData::m_nDataLength
 Length of data (excluding terminator).
 
FX_STRSIZE CFX_StringDataW::m_nDataLength
 Length of data (excluding terminator).
 
long CFX_StringData::m_nRefs
 Reference count.
 
long CFX_StringDataW::m_nRefs
 Reference count.
 
void *(* IFX_Allocator::m_Realloc )(struct _IFX_Allocator *pAllocator, void *p, size_t size)
 A pointer type to a re-allocation function. More...
 
void *(* IFX_Allocator::m_ReallocDebug )(struct _IFX_Allocator *pAllocator, void *p, size_t size, FX_LPCSTR file, int line)
 A pointer type to a debug-mode re-allocation function. More...
 
FX_CHAR CFX_StringData::m_String [1]
 Real data (actually a variable-sized array).
 
FX_WCHAR CFX_StringDataW::m_String [1]
 Real data (actually a variable-sized array).
 
FX_WORD FXCRT_DATETIMEZONE::milliseconds
 Millisecond, from 0 to 999. PDF standard doesn't support now, you can omit this field if it is not applicable.
 
FX_WORD FXCRT_DATETIMEZONE::minute
 Minute, from 0 to 59.
 
FX_WORD FXCRT_DATETIMEZONE::month
 Month, from 1 to 12.
 
FX_BOOL(* FXMEM_SystemMgr2::More )(struct _FXMEM_SystemMgr2 *pMgr, size_t alloc_size, void **new_memory, size_t *new_size)
 Called when fixed memory manager needs more memory. More...
 
size_t FX_MEMCONFIG::nPageNum_Init16
 Initial number of memory pages for 16-bytes fixed data size. 8 for desktop platforms, 5 for limited memory environments.
 
size_t FX_MEMCONFIG::nPageNum_Init32
 Initial number of memory pages for 32-bytes fixed data size. 24 for desktop platforms, 8 for limited memory environments.
 
size_t FX_MEMCONFIG::nPageNum_Init8
 Initial number of memory pages for 8-bytes fixed data size. 1 for desktop platforms, 1 for limited memory environments.
 
size_t FX_MEMCONFIG::nPageNum_InitMid
 Initial number of memory pages for middle data range. 2 for desktop platforms, 2 for limited memory environments.
 
size_t FX_MEMCONFIG::nPageNum_More16
 More number of memory pages for 16-bytes fixed data size. 8 for desktop platforms, 4 for limited memory environments.
 
size_t FX_MEMCONFIG::nPageNum_More32
 More number of memry pages for 32-bytes fixed data size. 24 for desktop platforms, 12 for limited memory environments.
 
size_t FX_MEMCONFIG::nPageNum_MoreMid
 More number of memory pages for middle data range. 4 for desktop platforms, 4 for limited memory environments.
 
size_t FX_MEMCONFIG::nPageSize_Alone
 Minimum size of alone memory page for large data. 64 for desktop platforms, 64 for limited memory environments.
 
size_t FX_MEMCONFIG::nPageSize_Large
 Minimum size of memory page for large data (> FX_FIXEDMEM_MIDBLOCKSIZE). 128 for desktop platforms, 32 for limited memory environments.
 
size_t FX_MEMCONFIG::nPageSize_Mid
 Size of memory pages for middle data range (> 32-bytes & <= FX_FIXEDMEM_MIDBLOCKSIZE). 32 for desktop platforms, 8 for limited memory environments.
 
void(* FXMEM_Debugger::OnAlloc )(FXMEM_FoxitMgr *pMgr, void *p, size_t size, int flags)
 A pointer type to an allocation-callback function. More...
 
void(* FXMEM_Debugger::OnAllocDebug )(FXMEM_FoxitMgr *pMgr, void *p, size_t size, int flags, FX_LPCSTR file, int line)
 A pointer type to a debug-mode allocation-callback function. More...
 
void(* FXMEM_Debugger::OnFree )(FXMEM_FoxitMgr *pMgr, void *p, int flags)
 A pointer type to a free-callback function. More...
 
void(* FXMEM_Debugger::OnRealloc )(FXMEM_FoxitMgr *pMgr, void *old_p, void *new_p, size_t size, int flags)
 A pointer type to a reallocation-callback function. More...
 
void(* FXMEM_Debugger::OnReallocDebug )(FXMEM_FoxitMgr *pMgr, void *old_p, void *new_p, size_t size, int flags, FX_LPCSTR file, int line)
 A pointer type to a debug-mode reallocation-callback function. More...
 
void(* FXMEM_Debugger::OnTag )(FXMEM_FoxitMgr *pMgr, FX_LPCSTR tag)
 A pointer type to a tag-callback function. More...
 
void(* FXMEM_SystemMgr::Purge )(struct _FXMEM_SystemMgr *pMgr)
 A pointer type to a purge function, which can be used to purge excessive memory without touching any used memory. More...
 
FX_LPVOID FX_THREADHANDLER::pUserData
 Pointer to user data.
 
void *(* FXMEM_SystemMgr::Realloc )(struct _FXMEM_SystemMgr *pMgr, void *pointer, size_t size, int flags)
 A pointer type to a reallocation function. More...
 
void *(* FXMEM_SystemMgr::ReallocDebug )(struct _FXMEM_SystemMgr *pMgr, void *pointer, size_t size, int flags, FX_LPCSTR file, int line)
 A pointer type to a debug-mode reallocation function. More...
 
FX_WORD FXCRT_DATETIMEZONE::second
 Second, from 0 to 60. 60 for leap second.
 
void(* FX_THREADHANDLER::SetThreadPriority )(FX_LPVOID pUserData, FX_HTHREAD hThread, FX_INT32 nPriority)
 Callback function to set thread priority. More...
 
FX_INT32 FXCRT_DATETIMEZONE::tzHour
 Hour of time zone, from -12 to 12. More...
 
FX_WORD FXCRT_DATETIMEZONE::tzMinute
 Minute of time zone, from 0 to 59.
 
void(* FXMEM_SystemMgr::Unlock )(struct _FXMEM_SystemMgr *pMgr, void *handle)
 A pointer type to a unlock function. More...
 
void * FXMEM_SystemMgr::user
 A generic typeless pointer for user data.
 
FX_INT32(* FX_THREADHANDLER::WaitForMultipleThreads )(FX_LPVOID pUserData, const FX_HTHREAD *pThreads, FX_INT32 nCount)
 Wait for termination of multiple threads. More...
 
FX_INT32(* FX_THREADHANDLER::WaitForSingleThread )(FX_LPVOID pUserData, FX_HTHREAD hThread)
 Wait for termination of a single thread. More...
 
FX_WORD FXCRT_DATETIMEZONE::year
 Year, a four-digit number, such as 2014.
 
void(* FX_THREADHANDLER::Yield )(FX_LPVOID pUserData)
 Callback function to change CPU time to another thread. More...
 

Basic memory operations

typedef void(* FPDF_OOM_Handler) (FXMEM_FoxitMgr *pFoxitMgr, void *param)
 the prototype of the Out-Of-Memory handler. More...
 
void * FXMEM_Alloc (FXMEM_FoxitMgr *pFoxitMgr, size_t size, int flags)
 Foxit basic memory allocation function. More...
 
void * FXMEM_AllocDebug (FXMEM_FoxitMgr *pFoxitMgr, size_t size, int flags, FX_LPCSTR file, int line)
 Foxit basic memory allocation function in debug-mode. More...
 
void * FXMEM_Realloc (FXMEM_FoxitMgr *pFoxitMgr, void *pointer, size_t new_size, int flags)
 Foxit basic memory reallocation function. More...
 
void * FXMEM_ReallocDebug (FXMEM_FoxitMgr *pFoxitMgr, void *pointer, size_t new_size, int flags, FX_LPCSTR file, int line)
 Foxit basic memory reallocation function in debug-mode. More...
 
void FXMEM_Free (FXMEM_FoxitMgr *pFoxitMgr, void *pointer, int flags)
 Foxit basic memory free function. More...
 
void FXMEM_CollectAll (FXMEM_FoxitMgr *pFoxitMgr)
 Release all memory blocks allocated by a Foxit manager. This function is only supported on embedded systems. More...
 
void FXMEM_PurgeMgr (FXMEM_FoxitMgr *pFoxitMgr)
 Release all excessive memory without touching any used memory. This is useful for extensible fixed memory manager (FXMEM_SystemMgr2), because we never free those additional memory pool until the memory manager destroyed. More...
 
void FXMEM_ReportOOM (FXMEM_FoxitMgr *pFoxitMgr)
 Report Out-of-memory (OOM). More...
 
void FXMEM_UseDebugger (FXMEM_FoxitMgr *pFoxitMgr, FXMEM_Debugger *pDebugger)
 Use a memory debugger which capturing all memory activities. Use NULL for parameter pDebugger to stop debugging. More...
 
void FXMEM_OutputDebugTag (FXMEM_FoxitMgr *pFoxitMgr, FX_LPCSTR tag)
 Output a memory debug tag. More...
 
void FXMEM_SetOOMHandler (FXMEM_FoxitMgr *pFoxitMgr, FPDF_OOM_Handler pOOMReportFunc, void *param)
 Setup A Out-Of-Memory handler for a Foxit memory manager. More...
 

Following base memory functions use default Foxit manager for current module

void * FXMEM_DefaultAlloc (size_t byte_size, int flags)
 Default allocation function using default Foxit memory manager for current module. More...
 
void * FXMEM_DefaultAlloc2 (size_t units, size_t unit_size, int flags)
 Default allocation function using default Foxit memory manager for current module. More...
 
void * FXMEM_DefaultAllocDebug (size_t size, int flags, FX_LPCSTR file, int line)
 Default debug-mode allocation function using default Foxit memory manager for current module. More...
 
void * FXMEM_DefaultAllocDebug2 (size_t units, size_t unit_size, int flags, FX_LPCSTR file, int line)
 Default debug-mode allocation function using default Foxit memory manager for current module. More...
 
void * FXMEM_DefaultRealloc (void *pointer, size_t new_size, int flags)
 Default reallocation function using default Foxit memory manager for current module. More...
 
void * FXMEM_DefaultRealloc2 (void *pointer, size_t units, size_t unit_size, int flags)
 Default reallocation function using default Foxit memory manager for current module. More...
 
void * FXMEM_DefaultReallocDebug (void *pointer, size_t new_size, int flags, FX_LPCSTR file, int line)
 Default debug-mode reallocation function using default Foxit memory manager for current module. More...
 
void * FXMEM_DefaultReallocDebug2 (void *pointer, size_t units, size_t unit_size, int flags, FX_LPCSTR file, int line)
 Default debug-mode reallocation function using default Foxit memory manager for current module. More...
 
void FXMEM_DefaultFree (void *pointer, int flags)
 Default free function using default Foxit memory manager for current module. More...
 
IFX_AllocatorFXMEM_GetDefAllocator ()
 Get default allocator used by the library. More...
 
void FXMEM_SetConfig (const FX_MEMCONFIG *memConfig)
 Set configuration of fixed memory. More...
 
#define FX_Alloc(type, size)
 A macro for Foxit memory allocation operation.
 
#define FX_Realloc(type, ptr, size)
 A macro for Foxit memory reallocation operation.
 
#define FX_AllocNL(type, size)
 A macro for Foxit memory allocation operation with non-leaving (return NULL if OOM).
 
#define FX_ReallocNL(type, ptr, size)
 A macro for Foxit memory reallocation operation with non-leaving (return NULL if OOM).
 
#define FX_Free(pointer)   FXMEM_DefaultFree(pointer, 0)
 A macro for Foxit memory free operation.
 
#define FX_Allocator_Alloc(fxAllocator, type, size)   ((fxAllocator) ? (type*)(fxAllocator)->m_Alloc((fxAllocator), (size) * sizeof(type)) : (FX_Alloc(type, size)))
 Release-mode allocation on an allocator.
 
#define FX_Allocator_Realloc(fxAllocator, type, ptr, new_size)   ((fxAllocator) ? (type*)(fxAllocator)->m_Realloc((fxAllocator), (ptr), (new_size) * sizeof(type)) : (FX_Realloc(type, ptr, new_size)))
 Release-mode re-allocation on an allocator.
 
#define FX_Allocator_Free(fxAllocator, ptr)   ((fxAllocator) ? (fxAllocator)->m_Free((fxAllocator), (ptr)) : (FX_Free(ptr)))
 Free memory block on an allocator.
 
#define _FXMEM_NO64_
 
#define FX_FIXEDMEM_PAGESIZE   (4096 * 16)
 Size of memory page, 64KB.
 
#define FX_FIXEDMEM_MIDBLOCKSIZE   (4096)
 Size of middle data block, 4KB.
 

Time

void FX_Time_GetSystemTime (FX_SYSTEMTIME *pSystemTime)
 Retrieve the current system date and time. More...
 
void FX_Time_GetLocalTime (FX_SYSTEMTIME *pSystemTime)
 Retrieve the current local date and time. More...
 
FX_DWORD FX_Time_GetClock ()
 Get the clock ticks elapsed by calling process. More...
 
FX_DWORD FX_Time_Sleep (FX_DWORD dwMilliseconds)
 Delay the current running for specified milliseconds. More...
 
void FXCRT_GetCurrentSystemTime (FXCRT_DATETIMEZONE &dt)
 Get current system date,time and timezone information. More...
 

Type for process ID

typedef FX_DWORD FX_PROCESSID
 Process ID.
 

Process management

void FX_Process_Initialize ()
 Initialize process. More...
 
void FX_Process_Finalize ()
 Finalize process. More...
 
FX_PROCESSID FX_Process_GetID ()
 Get the current process ID. More...
 
FX_LPVOID FX_Process_GetPrivateData (FX_LPVOID key)
 Get private data in the current process. More...
 
void FX_Process_SetPrivateData (FX_LPVOID key, FX_LPVOID data, PD_CALLBACK_FREEDATA callback)
 Set private data in the current process. More...
 
void FX_Process_RemovePrivateData (FX_LPVOID key)
 Remove private data in the current process. More...
 
CFX_ProcessContext * FX_Process_GetContext ()
 Retrieve process context. More...
 

Flags for thread priorities

typedef DWORD FX_ThreadResult
 
typedef FX_ThreadResult(WINAPI * FX_CALLBACK_ThreadProc) (FX_LPVOID param)
 Callback function of thread procedure. More...
 
typedef FX_ThreadResult(WINAPI * FX_CALLBACK_ThreadProxyProc) (FX_CALLBACK_ThreadProc threadProc, FX_LPVOID param)
 Callback function of thread proxy procedure. More...
 
#define FX_THREADPRIORITY_Lowest   -2
 Lowest priority.
 
#define FX_THREADPRIORITY_Lower   -1
 Lower priority.
 
#define FX_THREADPRIORITY_Normal   0
 Normal priority.
 
#define FX_THREADPRIORITY_Higher   1
 Higher priority.
 
#define FX_THREADPRIORITY_Highest   2
 Highest priority.
 
#define THREAD_CALL_CONVENTION   WINAPI
 

Thread handler

FX_THREADHANDLERFX_Thread_GetHandler ()
 Get the current thread handler. More...
 
void FX_Thread_SetHandler (FX_THREADHANDLER *pThreadHandler)
 Set the current thread handler. More...
 

Thread functions

FX_HTHREAD FX_Thread_Create (FX_INT32 nPriority, size_t szStack, FX_CALLBACK_ThreadProc threadProc, FX_LPVOID param)
 Create a new thread. More...
 
void FX_Thread_Exit ()
 Exit from the current thread. More...
 
FX_HTHREAD FX_Thread_GetHandle ()
 Get the current thread handle. More...
 
void FX_Thread_Yield ()
 Yield the processor to another thread. More...
 
FX_INT32 FX_Thread_GetLastError ()
 Get the last error code in the current thread. More...
 
void FX_Thread_SetLastError (FX_INT32 nErr)
 Set the last error code in the current thread. More...
 
FX_LPVOID FX_Thread_GetPrivateData (FX_LPVOID key)
 Get private data in the current thread. More...
 
void FX_Thread_SetPrivateData (FX_LPVOID key, FX_LPVOID data, PD_CALLBACK_FREEDATA callback)
 Set private data in the current thread. More...
 
void FX_Thread_RemovePrivateData (FX_LPVOID key)
 Remove private data in the current thread. More...
 
FX_INT32 FX_Thread_GetPriority (FX_HTHREAD hThread)
 Get thread priority. More...
 
void FX_Thread_SetPriority (FX_HTHREAD hThread, FX_INT32 nPriority)
 Set thread priority. More...
 
FX_INT32 FX_Thread_WaitForSingleThread (FX_HTHREAD hThread)
 Wait for termination of a single thread. More...
 
FX_INT32 FX_Thread_WaitForMultipleThreads (const FX_HTHREAD *pThreads, FX_INT32 nCount)
 Wait for termination of multiple threads. More...
 

Context access

CFX_ThreadContext * FX_Thread_GetContext ()
 Get the current thread context. More...
 
CFX_ExceptionContext * FX_Thread_GetExceptionContext ()
 Get the current thread exception context. More...
 

Mutex

Note
Mutex is disabled under single-thread mode or FPDFAPI_MT isn't defined, do not call the following functions under this condition. Mutex supports recursive calls in same thread.
FX_BOOL FX_Mutex_Initialize (FX_MUTEX *pMutex)
 Initialize a mutex. More...
 
void FX_Mutex_Destroy (FX_MUTEX *pMutex)
 Destroy a mutex. More...
 
FX_BOOL FX_Mutex_TryLock (FX_MUTEX *pMutex)
 Try to lock a mutex. More...
 
void FX_Mutex_Lock (FX_MUTEX *pMutex)
 Lock a mutex. More...
 
void FX_Mutex_Unlock (FX_MUTEX *pMutex)
 Unlock a mutex. More...
 

Spin Lock

Note
Spin Lock is disabled under single-thread mode or FPDFAPI_MT isn't defined, do not call the following functions under this condition. Spin Lock is a light-weight cocurrency mechanism for synchronizing access. Spin Lock doesn't support recursive calls in same thread.
FX_BOOL FX_SpinLock_Initialize (FX_SPINLOCK *pSpinLock)
 Initialize a spin lock. More...
 
void FX_SpinLock_Destroy (FX_SPINLOCK *pSpinLock)
 Destroy a spin lock. More...
 
FX_BOOL FX_SpinLock_TryLock (FX_SPINLOCK *pSpinLock)
 Try to lock a spin lock. More...
 
void FX_SpinLock_Lock (FX_SPINLOCK *pSpinLock)
 Lock a spin lock. More...
 
void FX_SpinLock_Unlock (FX_SPINLOCK *pSpinLock)
 Unlock a spin lock. More...
 
FX_BOOL FX_SpinLock_IsLocked (FX_SPINLOCK *pSpinLock)
 Determine whether specified spin lock is locked or not. More...
 
#define FXMT_SPLOCK_THIS
 
#define FXMT_SPLOCK_OBJ(lock)
 

Read-Write lock

Note
Read-Write Lock is disabled under single-thread mode or FPDFAPI_MT isn't defined, do not call the following functions under this condition.
FX_BOOL FX_RWLock_Initialize (FX_RWLOCK *pRWLock)
 Initialize a read-write lock. More...
 
void FX_RWLock_Destroy (FX_RWLOCK *pRWLock)
 Destroy a read-write lock. More...
 
FX_BOOL FX_RWLock_TryReadLock (FX_RWLOCK *pRWLock)
 Try to lock for share read. More...
 
void FX_RWLock_ReadLock (FX_RWLOCK *pRWLock)
 Lock for share read. More...
 
void FX_RWLock_ReadUnlock (FX_RWLOCK *pRWLock)
 Unlock for share read. More...
 
FX_BOOL FX_RWLock_TryWriteLock (FX_RWLOCK *pRWLock)
 Try to lock for exclusive write. More...
 
void FX_RWLock_WriteLock (FX_RWLOCK *pRWLock)
 Lock for exclusive write. More...
 
void FX_RWLock_WriteUnlock (FX_RWLOCK *pRWLock)
 Unlock for exclusive write. More...
 
#define FXMT_RWLOCK_THIS
 
#define FXMT_RWLOCK_OBJ(lock, s)
 
#define FXMT_RWLOCK_DEFINEOBJ(rwLock, lock, s)
 
#define FXMT_RWLOCKOBJECT_DEFINE(rwLockObj)
 
#define FXMT_RWLOCKOBJECT_TRYREADLOCK(lockObj)
 
#define FXMT_RWLOCKOBJECT_TRYREADLOCK_IF(lockObj)
 
#define FXMT_RWLOCKOBJECT_READLOCK(lockObj)
 
#define FXMT_RWLOCKOBJECT_READUNLOCK(lockObj)
 
#define FXMT_RWLOCKOBJECT_TRYWRITELOCK(lockObj)
 
#define FXMT_RWLOCKOBJECT_TRYWRITELOCK_IF(lockObj)
 
#define FXMT_RWLOCKOBJECT_WRITELOCK(lockObj)
 
#define FXMT_RWLOCKOBJECT_WRITEUNLOCK(lockObj)
 

Atomic Count

Note
Atomic Count provides an atomic mechanism to access integer value between multiple threads. Following functions also work under single-thread mode.
FX_INT32 FX_Atom_Add32 (volatile FX_INT32 *pAddend, FX_INT32 nIncrement)
 Increase 32-bits integer value. More...
 
FX_INT32 FX_Atom_Subtract32 (volatile FX_INT32 *pAddend, FX_INT32 nDecrement)
 Decrease 32-bits integer value. More...
 
FX_INT64 FX_Atom_Add64 (volatile FX_INT64 *pAddend, FX_INT64 nIncrement)
 Increase 64-bits integer value. More...
 
FX_INT64 FX_Atom_Subtract64 (volatile FX_INT64 *pAddend, FX_INT64 nDecrement)
 Decrease 64-bits integer value. More...
 

Macro definitions for File accessing modes

FX_HFILE FX_File_Open (FX_BSTR fileName, FX_DWORD dwMode, IFX_Allocator *pAllocator=0)
 Open file with specified accessing mode. More...
 
FX_HFILE FX_File_Open (FX_WSTR fileName, FX_DWORD dwMode, IFX_Allocator *pAllocator=0)
 Open file with specified accessing mode. More...
 
void FX_File_Close (FX_HFILE hFile, IFX_Allocator *pAllocator=0)
 Close file. More...
 
FX_INT64 FX_File_GetSize (FX_HFILE hFile)
 Get file size. More...
 
FX_INT64 FX_File_GetPosition (FX_HFILE hFile)
 Get the current file accessing position. More...
 
FX_INT64 FX_File_SetPosition (FX_HFILE hFile, FX_INT64 pos)
 Set the current file accessing position. More...
 
size_t FX_File_Read (FX_HFILE hFile, void *pBuffer, size_t szBuffer)
 Read data from the current file accessing position. More...
 
size_t FX_File_ReadPos (FX_HFILE hFile, void *pBuffer, size_t szBuffer, FX_INT64 pos)
 Read data from specified position. More...
 
size_t FX_File_Write (FX_HFILE hFile, const void *pBuffer, size_t szBuffer)
 Write data from the current file accessing position. More...
 
size_t FX_File_WritePos (FX_HFILE hFile, const void *pBuffer, size_t szBuffer, FX_INT64 pos)
 Write data at specified position. More...
 
FX_BOOL FX_File_Flush (FX_HFILE hFile)
 Flush internal buffer if need. More...
 
FX_BOOL FX_File_Truncate (FX_HFILE hFile, FX_INT64 szFile)
 Truncate file size. More...
 
FX_BOOL FX_File_Exist (FX_BSTR fileName)
 Determine whether a file exists or not. More...
 
FX_BOOL FX_File_Exist (FX_WSTR fileName)
 Determine whether a file exists or not. More...
 
FX_BOOL FX_File_Delete (FX_BSTR fileName)
 Delete file. More...
 
FX_BOOL FX_File_Delete (FX_WSTR fileName)
 Delete file. More...
 
FX_BOOL FX_File_Copy (FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
 Copy file. More...
 
FX_BOOL FX_File_Copy (FX_WSTR fileNameSrc, FX_WSTR fileNameDst)
 Copy file. More...
 
FX_BOOL FX_File_Move (FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
 Move file. More...
 
FX_BOOL FX_File_Move (FX_WSTR fileNameSrc, FX_WSTR fileNameDst)
 Move file. More...
 
IFX_FileWriteFX_CreateFileWrite (FX_LPCSTR filename, IFX_Allocator *pAllocator=0)
 (Available only for platforms supporting CRT file access (fopen, ...)) Create a CRT based file writing interface. More...
 
IFX_FileWriteFX_CreateFileWrite (FX_LPCWSTR filename, IFX_Allocator *pAllocator=0)
 (Available only for platforms supporting CRT file access (fopen, ...)) Create a CRT based file writing interface. More...
 
IFX_FileReadFX_CreateFileRead (FX_LPCSTR filename, IFX_Allocator *pAllocator=0)
 (Available only for platforms supporting CRT file access) Create a CRT based file reading interface. More...
 
IFX_FileReadFX_CreateFileRead (FX_LPCWSTR filename, IFX_Allocator *pAllocator=0)
 (Available only for platforms supporting CRT file access) Create a CRT based file reading interface. More...
 
IFX_FileStreamFX_CreateFileStream (FX_LPCSTR filename, FX_DWORD dwModes, IFX_Allocator *pAllocator=0)
 (Available only for platforms supporting CRT file access) Create a CRT based file I/O interface. More...
 
IFX_FileStreamFX_CreateFileStream (FX_LPCWSTR filename, FX_DWORD dwModes, IFX_Allocator *pAllocator=0)
 (Available only for platforms supporting CRT file access) Create a CRT based file I/O interface. More...
 
IFX_FileAccessFX_CreateDefaultFileAccess (FX_WSTR wsPath, IFX_Allocator *pAllocator=0)
 Create a CRT based file I/O interface. More...
 
IFX_MemoryStreamFX_CreateMemoryStream (FX_LPBYTE pBuffer, size_t nSize, FX_BOOL bTakeOver=false, IFX_Allocator *pAllocator=0)
 Creates a stream object by a given memory buffer. This function creates a consecutive memory stream object. More...
 
IFX_MemoryStreamFX_CreateMemoryStream (FX_BOOL bConsecutive=false, IFX_Allocator *pAllocator=0)
 Create a memory stream object. Memory buffer will be created internally, and the size will increase when need more space. More...
 
#define FX_FILEMODE_Write   0
 Write mode. To create automatically if the file doesn't exist.
 
#define FX_FILEMODE_ReadOnly   1
 Read-only mode.
 
#define FX_FILEMODE_Truncate   2
 Clear existing contents, and size of file is to be 0. For writing mode only.
 
#define FX_FILECACHE_CHUNKSIZE   32768
 
#define FX_FILECACHE_CHUNKCOUNT   64
 

Byte string concatenation operation

Both side of the concatenation operator (+) can be:

  • A buffered byte string (const CFX_ByteString&);
  • A non-buffered byte string (const CFX_ByteStringC&, a.k.a FX_BSTR);
  • A zero-terminated C-style string (FX_LPCSTR);
  • A single character or byte (FX_CHAR);
typedef CFX_StringBufTemplate< 256 > CFX_StringBuf256
 A fixed 256-byte string buffer.
 
const typedef CFX_WideStringCFX_WSTR
 Type definition for a reference to a constant CFX_WideStringC object.
 
CFX_ByteString operator+ (FX_BSTR str1, FX_BSTR str2)
 Concatenate a non-buffered byte string and a non-buffered byte string. More...
 
CFX_ByteString operator+ (FX_BSTR str1, FX_LPCSTR str2)
 Concatenate a non-buffered byte string and a zero-terminated C-style string. More...
 
CFX_ByteString operator+ (FX_LPCSTR str1, FX_BSTR str2)
 Concatenate a zero-terminated C-style string and a non-buffered byte string. More...
 
CFX_ByteString operator+ (FX_BSTR str1, FX_CHAR ch)
 Concatenate a non-buffered byte string and a single character or byte. More...
 
CFX_ByteString operator+ (FX_CHAR ch, FX_BSTR str2)
 Concatenate a single character or byte and a non-buffered byte string. More...
 
CFX_ByteString operator+ (const CFX_ByteString &str1, const CFX_ByteString &str2)
 Concatenate a buffered byte string and a buffered byte string. More...
 
CFX_ByteString operator+ (const CFX_ByteString &str1, FX_CHAR ch)
 Concatenate a buffered byte string and a single character or byte. More...
 
CFX_ByteString operator+ (FX_CHAR ch, const CFX_ByteString &str2)
 Concatenate a single character or byte and a buffered byte string. More...
 
CFX_ByteString operator+ (const CFX_ByteString &str1, FX_LPCSTR str2)
 Concatenate a buffered byte string and a zero-terminated C-style string. More...
 
CFX_ByteString operator+ (FX_LPCSTR str1, const CFX_ByteString &str2)
 Concatenate a zero-terminated C-style string and a buffered byte string. More...
 
CFX_ByteString operator+ (const CFX_ByteString &str1, FX_BSTR str2)
 Concatenate a buffered byte string and a non-buffered byte string. More...
 
CFX_ByteString operator+ (FX_BSTR str1, const CFX_ByteString &str2)
 Concatenate a non-buffered byte string and a buffered byte string. More...
 
 CFX_WideStringC::CFX_WideStringC (const CFX_WideString &src)
 Construct from a wide string. More...
 
CFX_WideStringCCFX_WideStringC::operator= (const CFX_WideString &src)
 Assignment(=) operator overload. From a CFX_ByteString object. More...
 
#define FX_WSTRC(wstr)   CFX_WideStringC((FX_LPCWSTR)wstr, sizeof(wstr) / sizeof(FX_WCHAR) - 1)
 All application should use the following macro when specifying a wide string constant. "wstr" must be a wide string constant. More...
 

Wide string concatenation operation

Both side of the concatenation operator (+) can be:

  • A buffered wide string (const CFX_WideString&);
  • A non-buffered wide string (const CFX_WideStringC&);
  • A zero-terminated C-style wide string (FX_LPCWSTR);
  • A single character (FX_WCHAR);

But you must have at least one CFX_WideString or CFX_WideStringC on one side.

CFX_WideString operator+ (const CFX_WideStringC &str1, const CFX_WideStringC &str2)
 Concatenate a non-buffered wide string and a non-buffered wide string. More...
 
CFX_WideString operator+ (const CFX_WideStringC &str1, FX_LPCWSTR str2)
 Concatenate a non-buffered byte string and a zero-terminated C-style string. More...
 
CFX_WideString operator+ (FX_LPCWSTR str1, const CFX_WideStringC &str2)
 Concatenate a zero-terminated C-style string and a non-buffered byte string. More...
 
CFX_WideString operator+ (const CFX_WideStringC &str1, FX_WCHAR ch)
 Concatenate a non-buffered byte string and a single character or byte. More...
 
CFX_WideString operator+ (FX_WCHAR ch, const CFX_WideStringC &str2)
 Concatenate a single character or byte and a non-buffered byte string. More...
 
CFX_WideString operator+ (const CFX_WideString &str1, const CFX_WideString &str2)
 Concatenate a buffered byte string and a buffered byte string. More...
 
CFX_WideString operator+ (const CFX_WideString &str1, FX_WCHAR ch)
 Concatenate a buffered byte string and a single character or byte. More...
 
CFX_WideString operator+ (FX_WCHAR ch, const CFX_WideString &str2)
 Concatenate a single character or byte and a buffered byte string. More...
 
CFX_WideString operator+ (const CFX_WideString &str1, FX_LPCWSTR str2)
 Concatenate a buffered wide string and a zero-terminated C-style string. More...
 
CFX_WideString operator+ (FX_LPCWSTR str1, const CFX_WideString &str2)
 Concatenate a zero-terminated C-style string and a buffered byte string. More...
 
CFX_WideString operator+ (const CFX_WideString &str1, const CFX_WideStringC &str2)
 Concatenate a buffered byte string and a non-buffered byte string. More...
 
CFX_WideString operator+ (const CFX_WideStringC &str1, const CFX_WideString &str2)
 Concatenate a non-buffered byte string and a buffered byte string. More...
 

Wide string compare operation

bool operator== (const CFX_WideString &s1, const CFX_WideString &s2)
 Comparison(==) operator overload. Case-sensitive. More...
 
bool operator== (const CFX_WideString &s1, const CFX_WideStringC &s2)
 Comparison(==) operator overload. Case-sensitive. More...
 
bool operator== (const CFX_WideStringC &s1, const CFX_WideString &s2)
 Comparison(==) operator overload. Case-sensitive. More...
 
bool operator== (const CFX_WideString &s1, FX_LPCWSTR s2)
 Comparison(==) operator overload. Case-sensitive. More...
 
bool operator== (FX_LPCWSTR s1, const CFX_WideString &s2)
 Comparison(==) operator overload. Case-sensitive. More...
 
bool operator!= (const CFX_WideString &s1, const CFX_WideString &s2)
 Comparison(!=) operator overload. Case-sensitive. More...
 
bool operator!= (const CFX_WideString &s1, const CFX_WideStringC &s2)
 Comparison(!=) operator overload. Case-sensitive. More...
 
bool operator!= (const CFX_WideStringC &s1, const CFX_WideString &s2)
 Comparison(!=) operator overload. Case-sensitive. More...
 
bool operator!= (const CFX_WideString &s1, FX_LPCWSTR s2)
 Comparison(!=) operator overload. Case-sensitive. More...
 
bool operator!= (FX_LPCWSTR s1, const CFX_WideString &s2)
 Comparison(!=) operator overload. Case-sensitive. More...
 
bool operator< (const CFX_WideString &lhs, const CFX_WideString &rhs)
 Comparison(<) operator overload. Case-sensitive. More...
 
FX_FLOAT FX_atof (FX_BSTR str)
 Convert a non-buffered byte string to a floating-point number. More...
 
void FX_atonum (FX_BSTR str, FX_BOOL &bInteger, void *pData, int sizeOfData=4)
 Convert a non-buffered byte string to a number. More...
 
FX_STRSIZE FX_ftoa (FX_FLOAT f, FX_LPSTR buf, int precision=0)
 Convert float to byte string. More...
 

Basic Unicode character attribute routines

FX_WCHAR FXWCHAR_GetUpper (FX_WCHAR wchar)
 Convert to upper-case letter. More...
 
FX_WCHAR FXWCHAR_GetLower (FX_WCHAR wchar)
 Convert to lower-case letter. More...
 
FX_BOOL FXWCHAR_IsWordBreak (FX_WCHAR wchar)
 Check if the unicode can break a word. More...
 
FX_BOOL FXWCHAR_IsSpace (FX_WCHAR wchar)
 Check if the unicode is space. More...
 

text direction defines

int FXWCHAR_GetDirection (FX_WCHAR wchar)
 Get text direction. More...
 
#define FXWCHAR_LTR   0
 Left to right order.
 
#define FXWCHAR_RTL   1
 Right to left order.
 
#define FXWCHAR_UNKNOWN   2
 Not sure about the order or don't care.
 

Encode wide string into UTF-8 byte string

CFX_ByteString FX_UTF8Encode (FX_LPCWSTR pwsStr, FX_STRSIZE len)
 Encode a wide string into a UTF-8 string. More...
 
CFX_ByteString FX_UTF8Encode (FX_WSTR wsStr)
 Encode a wide string into a UTF-8 string. More...
 
CFX_ByteString FX_UTF8Encode (const CFX_WideString &wsStr)
 Encode a wide string into a UTF-8 string. More...
 
FX_BOOL FX_IsUtf16SurrogatePair (FX_WCHAR first, FX_WCHAR second)
 Determines if the arguments constitute UTF-16 surrogate pair. More...
 
FX_DWORD FX_CreateCodePointFromUtf16SurrogatePair (FX_WCHAR first, FX_WCHAR second)
 Creates a Unicode code point from UTF16 surrogate pair. More...
 
FX_BOOL FX_CreateUtf16SurrogatePairFromCodePoint (FX_DWORD unicode, FX_WCHAR &first, FX_WCHAR &second)
 Creates UTF16 surrogate pair from a Unicode code point. More...
 
void FX_UTF8Encode (FX_LPCWSTR pwsStr, FX_STRSIZE len, CFX_ByteStringL &utf8Str, IFX_Allocator *pAllocator=NULL)
 

OS Defines

#define _FX_WIN32_DESKTOP_   1
 Windows desktop OS (from Windows 95)
 
#define _FX_WIN32_MOBILE_   2
 Windows Mobile OS (from Windows CE 4.0)
 
#define _FX_WIN64_   3
 Windows 64 bit.
 
#define _FX_LINUX_DESKTOP_   4
 Linux Desktop OS.
 
#define _FX_LINUX_EMBEDDED_   5
 Embedded Linux OS.
 
#define _FX_SYMBIAN_   6
 Symbian OS (from 7.0)
 
#define _FX_MACOSX_   7
 MAC OS X.
 
#define _FX_EMBEDDED_   8
 Embedded OS.
 
#define _FX_SOLARIS_   9
 Solaris 8 or later.
 
#define _FX_PALMOS_   10
 PalmOS (5.0 or later)
 
#define _FX_NETBSD_   11
 NetBSD.
 
#define _FX_ANDROID_   12
 Android.
 
#define _FX_VXWORKS_   13
 VxWorks.
 
#define _FX_MTK_   14
 Media Tech.
 
#define _FX_IOS_   15
 IOS.
 
#define _FXM_PLATFORM_WINDOWS_   1
 Windows OS platformas.
 
#define _FXM_PLATFORM_LINUX_   2
 Linux OS platformas.
 
#define _FXM_PLATFORM_APPLE_   3
 Apple OS platformas.
 
#define _FXM_PLATFORM_ANDROID_   4
 Android OS platformas.
 
#define _FXM_PLATFORM_   _FXM_PLATFORM_WINDOWS_
 
#define _CRT_SECURE_NO_WARNINGS
 Disable the security enhancements in the CRT.
 
#define NOMINMAX
 
#define _FX_WINAPI_PARTITION_DESKTOP_
 

Compiler Defines

#define _FX_VC6_   1
 Microsoft Visual C++ 6.0.
 
#define _FX_VC7_   2
 Microsoft Visual Studio.Net 2003.
 
#define _FX_VC8_   3
 Microsoft Visual Studio.Net 2005.
 
#define _FX_GCC_   4
 GNU C++ Compiler.
 
#define _FX_ADS_   5
 ADS 1.2 Compiler.
 
#define _FX_RVCT_   6
 RVCT 2.1 Compiler.
 
#define _FX_IARCC_   7
 IAR C/C++ Compiler.
 
#define _FX_NOKIA_X86_   8
 Nokia X86 Compiler.
 
#define _FX_METROWERKS_   9
 Metrowerks C/C++ Compiler (with MSL)
 
#define _FX_PACC_   10
 Protein C/C++ Compiler (used by PalmOS)
 
#define _FX_TMS470_   11
 TMS470.
 
#define _FX_MIPS_SDE_   12
 MIPS SDE.
 

CPU Defines

#define _FX_X86_   1
 32-bit x86 CPU
 
#define _FX_ARM_   2
 ARM.
 
#define _FX_POWERPC_   3
 Power PCPower PC.
 
#define _FX_SPARC_   4
 Sparc.
 
#define _FX_IA64_   5
 IA64.
 
#define _FX_MIPS_   6
 MIPS.
 
#define _FX_X64_   7
 64-bit x86 CPU
 
#define _FX_ARM64_   8
 ARM64.
 
#define _FX_MIPS64_   9
 MIPS64.
 

Word Size Defines

#define _FX_W32_   1
 32-bit instruct
 
#define _FX_W64_   2
 64-bit instruct
 
#define _FX_WORDSIZE_   _FX_W32_
 

Byte Order Defines

#define _FX_BIG_ENDIAN_   1
 big endian
 
#define _FX_LITTLE_ENDIAN_   2
 little endian
 
#define _FX_ENDIAN_
 Current Byte Order. More...
 
#define GetObject
 Get object information. GetObjectW defined for unicode-mode, GetObjectA for ansi-mode.
 
#define GetModuleFileName
 Get the fully-qualified path for specified module. GetModuleFileNameW defined for unicode-mode, GetModuleFileNameA for ansi-mode.
 
#define GetFullPathName
 Get the full path and file name of a specified file. GetFullPathNameW defined for unicode-mode, GetFullPathNameA for ansi-mode.
 

Target Defines

#define _FX_DEFAULT_TARGET_   0
 The default sdk information.
 
#define _FX_BREW_   1
 Brew SDK.
 
#define _FXM_SIMD_
 
#define _FX_NO_OPENSSL_
 
#define _FX_JPEG_TURBO_
 
#define _FX_LARGEFILE_SUPPORT_
 
#define WITH_SIMD
 
#define _FPDF_STREAM_RENDER_
 
#define _FX_ENABLE_OVERPRINT_
 

BASIC DATA TYPES

typedef void * FX_LPVOID
 Pointer to any type.
 
typedef void const * FX_LPCVOID
 Pointer to any constant type.
 
typedef void * FX_POSITION
 A value used to denote the position of an element in a collection.
 
typedef signed char FX_INT8
 Signed 8bits integer.
 
typedef unsigned char FX_UINT8
 Unsigned 8bits integer.
 
typedef unsigned char FX_BYTE
 Byte (8 bits).
 
typedef unsigned char * FX_LPBYTE
 Pointer to a FX_BYTE.
 
typedef unsigned char const * FX_LPCBYTE
 Pointer to a constant FX_BYTE.
 
typedef short FX_INT16
 Signed 16bits integer.
 
typedef unsigned short FX_UINT16
 Unsigned 16bits integer.
 
typedef short FX_SHORT
 Short integer (16 bits).
 
typedef unsigned short FX_WORD
 16-bit unsigned integer.
 
typedef unsigned short * FX_LPWORD
 Pointer to a WORD.
 
typedef unsigned short const * FX_LPCWORD
 Pointer to a WORD.
 
typedef int FX_INT32
 32-bit signed integer.
 
typedef float FX_FLOAT
 32-bit floating-point number.
 
typedef int FX_BOOL
 Boolean variable (should be TRUE or FALSE).
 
typedef int FX_ERR
 Error indicator.
 
typedef char FX_CHAR
 8-bit Windows (ANSI) character.
 
typedef char * FX_LPSTR
 Pointer to 8-bit Windows (ANSI) characters.
 
typedef char const * FX_LPCSTR
 Pointer to constant 8-bit Windows (ANSI) characters.
 
typedef unsigned long FX_DWORD
 32-bit unsigned integer. More...
 
typedef unsigned long * FX_LPDWORD
 Pointer to a DWORD.
 
typedef wchar_t FX_WCHAR
 Compiler dependant Unicode character (16-bit for Microsoft Compiler, 32-bit for gcc).
 
typedef wchar_t * FX_LPWSTR
 Pointer to Unicode characters.
 
typedef wchar_t const * FX_LPCWSTR
 Pointer to constant Unicode characters.
 
typedef long long int FX_INT64
 
typedef unsigned long long FX_UINT64
 
typedef INT_PTR FX_INTPTR
 Signed integral type for pointer precision.
 
typedef UINT_PTR FX_UINTPTR
 Unsigned integral type for pointer precision.
 
typedef FX_DWORD FX_UINT32
 unsigned 32bits integer.
 
typedef FX_UINT64 FX_QWORD
 unsigned quad-word integer.
 
#define FX_SUCCEEDED(Status)   ((FX_ERR)(Status) >= 0)
 Determine whether a status is successful.
 
#define FX_FAILED(Status)   ((FX_ERR)(Status) < 0)
 Determine whether a status is failure.
 
#define FX_DEFINEHANDLE(name)   typedef struct _##name {FX_LPVOID pData;} * name;
 Macro to define a handle type.
 
#define TRUE   1
 Keyword which value is 1.
 
#define FALSE   0
 Keyword which value is 0.
 
#define NULL   0
 The null-pointer value.
 
#define FXSYS_assert
 Assertion.
 
#define ASSERT(a)
 Assertion for debug mode, do nothing for release mode.
 
#define FX_MAX(a, b)   (((a) > (b)) ? (a) : (b))
 A macro that returns the maximum of a and b.
 
#define FX_MIN(a, b)   (((a) < (b)) ? (a) : (b))
 A macro that returns the minimum of a and b.
 
#define FX_PI   3.1415926535897932384626433832795f
 A macro to PI.
 
#define _FX_CRT_MALLOC_LIMIT_   0x7fffffffL
 A macrio to malloc size limit.
 

Byte string operations

#define FXSYS_sprintf
 Write formatted data to a ANSIC string.
 
#define FXSYS_snprintf
 Write formatted data to a ANSIC string, with max length.
 
#define FXSYS_vsnprintf   vsnprintf
 
#define FXSYS_vsprintf
 Write formatted output using a pointer to a list of arguments.
 
#define FXSYS_strchr
 Find a character in a ANSIC string.
 
#define FXSYS_strlen
 Get the length of a ANSIC string.
 
#define FXSYS_strncmp
 Compare characters of two ANSIC strings.
 
#define FXSYS_strcmp
 Compare ANSIC strings.
 
#define FXSYS_strcpy
 Copy an ANSIC string.
 
#define FXSYS_strncpy
 Copy an ANSIC string with length limitation.
 
#define FXSYS_strstr
 Find a substring.
 

File operations

#define FXSYS_FILE
 File structure.
 
#define FXSYS_fopen
 Open a file.
 
#define FXSYS_fclose
 Close a file.
 
#define FXSYS_SEEK_END
 End of file.
 
#define FXSYS_SEEK_SET
 Beginning of file.
 
#define FXSYS_fseek
 Moves the file pointer to a specified location.
 
#define FXSYS_ftell
 Gets the current position of a file pointer.
 
#define FXSYS_fread
 Reads data from a file.
 
#define FXSYS_fwrite
 Writes data to a file.
 
#define FXSYS_fprintf
 Print formatted data to a file.
 
#define FXSYS_fflush
 Flush file.
 
#define FXSYS_wfopen
 Open a file using wide-string parameters. Only supported on Windows platforms now.
 

Wide string operations

#define FXSYS_wcslen
 Get the length of a wide-character string.
 
#define FXSYS_wcscmp
 Compare wide-character strings.
 
#define FXSYS_wcschr
 Find a wide-character in a wide-character string.
 
#define FXSYS_wcsstr
 Find a sub-wide-character-string.
 
#define FXSYS_wcsncmp
 Compare characters of two wide-character strings.
 
#define FXSYS_vswprintf
 Write formatted output wide character string using a pointer to a list of arguments.
 
#define FXSYS_mbstowcs
 Converts a sequence of multi-byte characters to a corresponding sequence of wide characters.
 
#define FXSYS_wcstombs
 Converts a sequence of wide characters to a corresponding sequence of multi-byte characters.
 

Memory block operations

#define FXSYS_memcmp
 Compares two buffers.
 
#define FXSYS_memcpy
 Copy from one buffer to another.
 
#define FXSYS_memmove
 Moves one buffer to another. If some regions of the source area and the destination overlap, ::FXSYS_memmove ensures that the original source bytes in the overlapping region are copied before being overwritten.
 
#define FXSYS_memset
 Use given character to initialize the buffer.
 
#define FXSYS_memchr
 Search for a byte in a memory block.
 
#define FXSYS_qsort
 Performs a quick sort. A generic algorithm.
 
#define FXSYS_bsearch
 Performs a binary search of a sorted array. A generic algorithm.
 
#define FXSYS_itoa
 Convert an integer to a ANSIC string.
 
#define FXSYS_strlwr
 Convert a ANSIC string to lowercase.
 
#define FXSYS_strupr
 Convert a ANSIC string to uppercase.
 
#define FXSYS_stricmp
 Compare two ANSIC strings. case-insensitive.
 
#define FXSYS_wcsicmp
 Compare two wide character strings. case-insensitive.
 
#define FXSYS_WideCharToMultiByte
 Maps a wide-character string to a character string.
 
#define FXSYS_MultiByteToWideChar
 Maps a character string to a wide-character string.
 
#define FXSYS_wcslwr
 Convert a wide-character string to lowercase.
 
#define FXSYS_wcsupr
 Convert a wide-character string to uppercase.
 
#define FXSYS_GetFullPathName
 Get the full path and file name of a specified file.
 
#define FXSYS_GetModuleFileName
 Get the fully-qualified path for specified module.
 
#define FXSYS_GetACP
 Retrieve the current ANSI code-page identifier for the system.
 

Memory utilities

void * FXSYS_memcpy32 (void *dst, const void *src, size_t size)
 Copy buffer data from source to destination. More...
 
FX_INT32 FXSYS_memcmp32 (const void *buf1, const void *buf2, size_t size)
 Compare data in two buffers. More...
 
void * FXSYS_memset32 (void *dst, FX_INT32 v, size_t size)
 Set buffer data to specified value. More...
 
void * FXSYS_memset8 (void *dst, FX_BYTE v, size_t size)
 Set buffer data to specified value. More...
 
void * FXSYS_memmove32 (void *dst, const void *src, size_t size)
 Move source buffer data into destination. More...
 

Math functions

typedef CRITICAL_SECTION FX_MUTEX
 Definition for mutex/critical section and read-write lock.
 
typedef void * FX_SPINLOCK
 Definition for spinlock.
 
FX_INT32 FXSYS_atoi (FX_LPCSTR str)
 Convert an ANSI string to an integer. More...
 
FX_INT32 FXSYS_wtoi (FX_LPCWSTR str)
 Convert a wide string to an integer. More...
 
FX_INT64 FXSYS_atoi64 (FX_LPCSTR str)
 Convert an ANSI string to an integer. More...
 
FX_INT64 FXSYS_wtoi64 (FX_LPCWSTR str)
 Convert a wide string to an integer. More...
 
FX_LPCSTR FXSYS_i64toa (FX_INT64 value, FX_LPSTR str, int radix)
 Convert an integer to an ANSI string. More...
 
FX_LPCWSTR FXSYS_i64tow (FX_INT64 value, FX_LPWSTR str, int radix)
 Convert an integer to an wide string. More...
 
int FXSYS_round (FX_FLOAT f)
 Get nearest integer. More...
 
#define FXSYS_pow
 Calculate the power. FXSYS_pow(x,y) means x^y.
 
#define FXSYS_sqrt
 Calculate the square root. FXSYS_sqrt(x) means sqrt(x).
 
#define FXSYS_fabs
 Calculate the absolute. FXSYS_fabs(x) means |x|.
 
#define FXSYS_atan2
 Calculate the arctangent. FXSYS_atan2(y,x) means atan(y/x).
 
#define FXSYS_ceil
 Calculate the ceiling of a value.
 
#define FXSYS_floor
 Calculate the floor of a value.
 
#define FXSYS_cos
 Calculate the cosine of a floating-point number from a radian argument.
 
#define FXSYS_acos
 Calculate the arccosine of a floating-point number, in radians.
 
#define FXSYS_sin
 Calculate the sine of a floating-point number from a radian argument.
 
#define FXSYS_log
 Calculate the natural logarithm (base e) of a floating-point number.
 
#define FXSYS_log10
 Calculate the common logarithm (base 10) of a floating-point number.
 
#define FXSYS_fmod
 Calculate the floating-point remainder.
 
#define FXSYS_abs
 A macro that return the absolute value.
 
#define _FX_LSB_FIRST_
 
#define FXDWORD_FROM_LSBFIRST(i)   (i)
 
#define FXDWORD_FROM_MSBFIRST(i)   ( ((FX_BYTE)(i) << 24) | ((FX_BYTE)((i) >> 8) << 16) | ((FX_BYTE)((i) >> 16) << 8) | (FX_BYTE)((i) >> 24) )
 
#define FXDWORD_GET_LSBFIRST(p)   ((((FX_LPBYTE)(p))[3] << 24) | (((FX_LPBYTE)(p))[2] << 16) | (((FX_LPBYTE)(p))[1] << 8) | (((FX_LPBYTE)(p))[0]))
 
#define FXDWORD_GET_MSBFIRST(p)   ((((FX_LPBYTE)(p))[0] << 24) | (((FX_LPBYTE)(p))[1] << 16) | (((FX_LPBYTE)(p))[2] << 8) | (((FX_LPBYTE)(p))[3]))
 
#define FXSYS_HIBYTE(word)   ((FX_BYTE)((word) >> 8))
 
#define FXSYS_LOBYTE(word)   ((FX_BYTE)(word))
 
#define FXSYS_HIWORD(dword)   ((FX_WORD)((dword) >> 16))
 
#define FXSYS_LOWORD(dword)   ((FX_WORD)(dword))
 
#define FXSYS_strtol   strtol
 Convert string to long integer.
 
#define FXSYS_Mul(a, b)   ((a) * (b))
 Multiply two numbers.
 
#define FXSYS_Div(a, b)   ((a) / (b))
 Division between two numbers.
 
#define FXSYS_MulDiv(a, b, c)   ((a) * (b) / (c))
 Fist do multiplication, then do division.
 
#define FXSYS_sqrt2(a, b)   (FX_FLOAT)FXSYS_sqrt((a)*(a) + (b)*(b))
 sqrt(a^2 + b^2).
 
#define FX_CRITICAL_SECTION   FX_MUTEX
 
#define FX_InitializeCriticalSection(a)   FX_Mutex_Initialize(a)
 
#define FX_DeleteCriticalSection(a)   FX_Mutex_Destroy(a)
 
#define FX_TryEnterCriticalSection(a)   FX_Mutex_TryLock(a)
 
#define FX_EnterCriticalSection(a)   FX_Mutex_Lock(a)
 
#define FX_LeaveCriticalSection(a)   FX_Mutex_Unlock(a)
 

Detailed Description

Macro Definition Documentation

◆ _FX_ENDIAN_

#define _FX_ENDIAN_

Current Byte Order.

Now it can be:

  • _FX_BIG_ENDIAN_
  • _FX_LITTLE_ENDIAN_

◆ FX_BSTRC

#define FX_BSTRC (   str)    CFX_ByteStringC(str, sizeof str-1)

All application should use the following macro when specifying a string constant. "str" must be a character string constant.

Note
For example:
FX_BSTRC("abc").

◆ FX_WSTRC

#define FX_WSTRC (   wstr)    CFX_WideStringC((FX_LPCWSTR)wstr, sizeof(wstr) / sizeof(FX_WCHAR) - 1)

All application should use the following macro when specifying a wide string constant. "wstr" must be a wide string constant.

For example:

FX_WSTRC(L"abc").

Typedef Documentation

◆ FPDF_OOM_Handler

typedef void(* FPDF_OOM_Handler) (FXMEM_FoxitMgr *pFoxitMgr, void *param)

the prototype of the Out-Of-Memory handler.

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object.
[in]paramA generic typeless pointer for user data.
Returns
None.

◆ FX_CALLBACK_ThreadProc

typedef FX_ThreadResult( WINAPI * FX_CALLBACK_ThreadProc) (FX_LPVOID param)

Callback function of thread procedure.

param[in] param Thread parameter transfered when create thread.

Returns
None.

◆ FX_CALLBACK_ThreadProxyProc

typedef FX_ThreadResult( WINAPI * FX_CALLBACK_ThreadProxyProc) (FX_CALLBACK_ThreadProc threadProc, FX_LPVOID param)

Callback function of thread proxy procedure.

param[in] param Thread parameter transfered when create thread.

Returns
None.

◆ FX_DWORD

typedef unsigned long FX_DWORD

32-bit unsigned integer.

TYPE LP32 ILP32 LP64 ILP64 LLP64 CHAR 8 8 8 8 8 SHORT 16 16 16 16 16 INT 16 32 32 64 32 LONG 32 32 64 64 32 LONG LONG 64 64 64 64 64 POINTER 32 32 64 64 64

◆ PD_CALLBACK_FREEDATA

typedef void(* PD_CALLBACK_FREEDATA) (FX_LPVOID pData)

Prototype of callback function provided by custom module for deallocating private data.

Enumeration Type Documentation

◆ FX_ProgressiveStatus

Enumeration for progressive status.

Values of this enumeration should be used alone.

Enumerator
Ready 

Ready.

ToBeContinued 

To be continued.

Found 

Found.

NotFound 

Not Found.

Failed 

Failed.

Done 

Done.

Function Documentation

◆ CFX_ByteString() [1/6]

CFX_ByteString::CFX_ByteString ( char  ch)
explicit

Construct from a single character.

Parameters
[in]chA single character.

◆ CFX_ByteString() [2/6]

CFX_ByteString::CFX_ByteString ( const CFX_ByteString str)

Copy constructor.

Parameters
[in]strA constant ref to a CFX_ByteString object.

◆ CFX_ByteString() [3/6]

CFX_ByteString::CFX_ByteString ( FX_BSTR  bstrc)

Construct from a constant ref to a CFX_ByteStringC object.

Parameters
[in]bstrcA constant ref to a CFX_ByteStringC object.

◆ CFX_ByteString() [4/6]

CFX_ByteString::CFX_ByteString ( FX_BSTR  bstrc1,
FX_BSTR  bstrc2 
)

Concatenate constructor.

Parameters
[in]bstrc1Fist constant ref to a CFX_ByteStringC object.
[in]bstrc2Second constant ref to a CFX_ByteStringC object.

◆ CFX_ByteString() [5/6]

CFX_ByteString::CFX_ByteString ( FX_LPCBYTE  ptr,
FX_STRSIZE  len 
)

Construct from a byte string.

Parameters
[in]ptrPointer to a constant byte string.
[in]lenThe length of the byte string.

◆ CFX_ByteString() [6/6]

CFX_ByteString::CFX_ByteString ( FX_LPCSTR  ptr,
FX_STRSIZE  len = -1 
)

Construct from a character string.

Parameters
[in]ptrPointer to a constant character string.
[in]lenThe length of the character string. len can be -1 for zero terminated string.

◆ CFX_ByteStringC() [1/6]

CFX_ByteStringC::CFX_ByteStringC ( const CFX_ByteString src)
inline

Construct from a byte string.

Parameters
[in]srcconstant ref to a CFX_ByteString object.

◆ CFX_ByteStringC() [2/6]

CFX_ByteStringC::CFX_ByteStringC ( const CFX_ByteStringC src)
inline

Copy constructor.

Parameters
[in]srcconstant ref to a CFX_ByteStringC object.

◆ CFX_ByteStringC() [3/6]

CFX_ByteStringC::CFX_ByteStringC ( const FX_CHAR ch)
inlineexplicit

Construct from a single character.

Parameters
[in]chA single character.

◆ CFX_ByteStringC() [4/6]

CFX_ByteStringC::CFX_ByteStringC ( FX_LPCBYTE  ptr,
FX_STRSIZE  size 
)
inline

Constructs from a byte string.

Parameters
[in]ptrPointer to a constant byte string.
[in]sizeThe length of the byte string.

◆ CFX_ByteStringC() [5/6]

CFX_ByteStringC::CFX_ByteStringC ( FX_LPCSTR  ptr)
inline

Construct from a character string.

Parameters
[in]ptrPointer to a constant character string, the string must be null-terminated.

◆ CFX_ByteStringC() [6/6]

CFX_ByteStringC::CFX_ByteStringC ( FX_LPCSTR  ptr,
FX_STRSIZE  len 
)
inline

Construct from a character string.

Parameters
[in]ptrPointer to a constant character string.
[in]lenThe length of the character string. This can be -1 for null-terminated string.

◆ CFX_ChunkFileStreamsManager()

CFX_ChunkFileStreamsManager::CFX_ChunkFileStreamsManager ( IFX_FileStream pFileStream,
size_t  nChunkSize = 1024 
)

Construct the Chunk-Based file stream manager.

Parameters
[in]pFileStreamPointer to the file stream on which this manager manages the chunked reads and writes.
[in]nChunkSizeThe chunk size.

◆ CFX_StringBufBase()

CFX_StringBufBase::CFX_StringBufBase ( FX_STRSIZE  limit)
inlineexplicit

A Constructor.

Parameters
[in]limitbuffer limit.

◆ CFX_WideString() [1/5]

CFX_WideString::CFX_WideString ( const CFX_WideString str)

Copy constructor.

Parameters
[in]strA constant ref to a CFX_WideString object.

◆ CFX_WideString() [2/5]

CFX_WideString::CFX_WideString ( const CFX_WideStringC str)

Construct from a constant ref to a CFX_WideStringC object.

Parameters
[in]strA constant ref to a CFX_WideStringC object.

◆ CFX_WideString() [3/5]

CFX_WideString::CFX_WideString ( const CFX_WideStringC str1,
const CFX_WideStringC str2 
)

Concatenate constructor.

Parameters
[in]str1Fist constant ref to a CFX_WideStringC object.
[in]str2Second constant ref to a CFX_WideStringC object.

◆ CFX_WideString() [4/5]

CFX_WideString::CFX_WideString ( FX_LPCWSTR  ptr,
FX_STRSIZE  len = -1 
)
inline

Construct from a wide character string.

Parameters
[in]ptrPointer to a constant wide character string.
[in]lenThe length of the wide character string. This can be -1 for zero terminated wide character string.

◆ CFX_WideString() [5/5]

CFX_WideString::CFX_WideString ( FX_WCHAR  ch)

Construct from a single wide character.

Parameters
[in]chA single wide character.

◆ CFX_WideStringC() [1/5]

CFX_WideStringC::CFX_WideStringC ( const CFX_WideString src)
inline

Construct from a wide string.

Parameters
[in]srcconstant ref to a CFX_ByteString object.

◆ CFX_WideStringC() [2/5]

CFX_WideStringC::CFX_WideStringC ( const CFX_WideStringC src)
inline

Copy constructor.

Parameters
[in]srcconstant ref to a CFX_WideStringC object.

◆ CFX_WideStringC() [3/5]

CFX_WideStringC::CFX_WideStringC ( FX_LPCWSTR  ptr)
inline

Construct from a character string.

Parameters
[in]ptrPointer to a constant character string, the string must be null-terminated.

◆ CFX_WideStringC() [4/5]

CFX_WideStringC::CFX_WideStringC ( FX_LPCWSTR  ptr,
FX_STRSIZE  len 
)
inline

Construct from a character string.

Parameters
[in]ptrPointer to a constant character string.
[in]lenThe length of the character string. This can be -1 for null-terminated string.

◆ CFX_WideStringC() [5/5]

CFX_WideStringC::CFX_WideStringC ( FX_WCHAR ch)
inline

Construct from a single character.

Parameters
[in]chA single character.

◆ ~CFX_ByteString()

CFX_ByteString::~CFX_ByteString ( )

Destructor.

◆ ~CFX_ChunkFileStreamsManager()

CFX_ChunkFileStreamsManager::~CFX_ChunkFileStreamsManager ( )

Destructor.

Note
Make sure that all the |IFX_ChunkFileStream|s created by this manager have been released.

◆ 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

◆ AttachBuffer()

virtual void IFX_MemoryStream::AttachBuffer ( FX_LPBYTE  pBuffer,
size_t  nSize,
FX_BOOL  bTakeOver = false 
)
pure virtual

Attach a memory buffer.

Parameters
[in]pBufferMemory buffer to attach.
[in]nSizeBuffer size, in bytes.
[in]bTakeOverIndicates whether need free attached memory buffer(pBuffer) when memory stream is to be released. Default value: false
Returns
None.
Note
This method will let memory stream works under consecutive mode, that's only one block exists, it will be expanded when writes data into it if necessary. If memory stream works under non-consecutive mode, this method makes no sense.

◆ AttachFile()

FX_BOOL CFX_CachedFileRead::AttachFile ( IFX_FileRead pFile,
FX_BOOL  bTakeOver 
)

Attach a file read.

Parameters
[in]pFileThe file to be attached.
[in]bTakeOverTake over the file or not.
Returns
true means success, while false means failure.

◆ ClearRange()

virtual void IFX_FileRead::ClearRange ( )
inlinevirtual

Clear accessing range set by function IFX_FileRead::SetRange.

Returns
None.

◆ Compare() [1/3]

int CFX_WideString::Compare ( const CFX_WideString str) const

Compare the the string with another. Case-sensitive.

Parameters
[in]strThe wide string to be compared.
Returns
  • -1 means current string is "smaller" (in alphabetic order) than the other one.
  • 0 means equal.
  • 1 means current string is "larger" (in alphabetic order) than the other one.

◆ Compare() [2/3]

int CFX_ByteString::Compare ( FX_BSTR  str) const

Compare the the string with another. Case-sensitive.

Parameters
[in]strThe byte string to be compared.
Returns
  • -1 means current string is "smaller" (in alphabetic order) than the other one.
  • 0 means equal.
  • 1 means current string is "larger" (in alphabetic order) than the other one.

◆ Compare() [3/3]

int CFX_WideString::Compare ( FX_LPCWSTR  str) const

Compare current string with a wide character string. Case-sensitive.

Parameters
[in]strThe wide character string to be compared.
Returns
  • -1 means current string is "smaller" (in alphabetic order) than the other one.
  • 0 means equal.
  • 1 means current string is "larger" (in alphabetic order) than the other one.

◆ CompareNoCase()

int CFX_WideString::CompareNoCase ( FX_LPCWSTR  str) const

Compare the the string with a wide character string. No case-insensitive.

Parameters
[in]strThe wide character string to be compared.
Returns
  • -1 means current string is "smaller" (in alphabetic order) than the other one.
  • 0 means equal.
  • 1 means current string is "larger" (in alphabetic order) than the other one.

◆ ConvertFrom() [1/2]

void CFX_WideString::ConvertFrom ( const CFX_ByteString str,
CFX_CharMap pCharMap = NULL 
)

Load MBCS data into this wide string, using specified character mapper.

If no character mapper specified, the system default mapper will be used.

Parameters
[in]strA byte string.
[in]pCharMapA character mapper.
Returns
None.

◆ ConvertFrom() [2/2]

void CFX_ByteString::ConvertFrom ( const CFX_WideString str,
CFX_CharMap pCharMap = NULL 
)

Load unicode data into this byte string, using specified character mapper. If no character mapper specified, the system default mapper will be used.

Parameters
[in]strThe input unicode string.
[in]pCharMapSpecified character mapper to be used for converting.
Returns
None.

◆ Copy()

void CFX_StringBufBase::Copy ( FX_BSTR  str)

Copy from a non-buffered byte string.

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

◆ CreateChunkFileStream()

IFX_ChunkFileStream* CFX_ChunkFileStreamsManager::CreateChunkFileStream ( )

Create a Chunk-Based file stream.

Returns
The instance of IFX_ChunkFileStream, the caller guarantees that it is released correctly.

◆ CreateFileStream()

virtual IFX_FileStream* IFX_FileAccess::CreateFileStream ( FX_DWORD  dwModes)
pure virtual

Create IFX_FileStream to operate file.

Parameters
[in]dwModesOpen file mode.
Returns
A new IFX_FileStream object.

◆ Delete() [1/2]

FX_STRSIZE CFX_ByteString::Delete ( FX_STRSIZE  index,
FX_STRSIZE  count = 1 
)

Delete one or more characters starting from specific position.

Parameters
[in]indexSpecifies the zero-based index in the byte string for starting deleting.
[in]countCount of bytes to be deleted.
Returns
The new length of the byte string.

◆ Delete() [2/2]

FX_STRSIZE CFX_WideString::Delete ( FX_STRSIZE  index,
FX_STRSIZE  count = 1 
)

Delete one or more wide characters starting from specific position.

Parameters
[in]indexSpecifies the zero-based index in the wide string for starting deleting.
[in]countCount of wide characters to be deleted.
Returns
The new length of the wide string.

◆ DetachBuffer()

virtual void IFX_MemoryStream::DetachBuffer ( )
pure virtual

Detach the current memory buffer.

Returns
None.
Note
If memory stream works under non-consecutive mode, this method makes no sense.

◆ Empty() [1/3]

void CFX_ByteString::Empty ( )

Set this string to be empty.

Returns
None.

◆ Empty() [2/3]

void CFX_StringBufBase::Empty ( )
inline

Set this string to be empty.

Returns
None.

◆ Empty() [3/3]

void CFX_WideString::Empty ( )

Set this string to be empty.

Returns
None.

◆ Equal() [1/2]

bool CFX_WideString::Equal ( const CFX_WideStringC str) const

Check if current string is equal to another.

This function os faster than CFX_WideString::Comparewhen only need to check whether two strings are equal.

Parameters
[in]strThe wide string to be compared.
Returns
true means equal, while false means not equal.

◆ Equal() [2/2]

bool CFX_ByteString::Equal ( FX_BSTR  str) const

Check if current string is equal to another one. Case-sensitive.

This function is faster than function CFX_ByteString::Compare if only need to check whether two strings are equal.

Parameters
[in]strThe byte string to be compared.
Returns
true means current string is equal to the other one, while false means not.

◆ EqualNoCase()

bool CFX_ByteString::EqualNoCase ( FX_BSTR  str) const

Check if current string is equal to another one, not considering case.

This function will treat letters 'A'-'Z' just same as 'a'-'z'.

Parameters
[in]strThe byte string to be compared.
Returns
true means current string is equal to the other one, while false means not.

◆ EstimateSize()

virtual void IFX_MemoryStream::EstimateSize ( size_t  nInitSize,
size_t  nGrowSize 
)
pure virtual

Change initialize size and grow size.

Parameters
[in]nInitSizeInitial size for memory block.
[in]nGrowSizeGrow up size for next change when write data.
Returns
None.
Note
For consecutive mode, if parameter nInitSize is greater than the current size, block memory will be reallocated; parameter nGrowSize will be used when reallocate memory next time. For non-consecutive mode, parameter nGrowSize will be used to allocate each memory block, this method should be called at first; parameter nInitSize will be ignored.

◆ Find() [1/4]

FX_STRSIZE CFX_ByteString::Find ( FX_BSTR  lpszSub,
FX_STRSIZE  start = 0 
) const

Find a sub-string, from specific position. Only first occurrence is found.

Parameters
[in]lpszSubThe sub-string to be found.
[in]startSpecifies the zero-based index of the starting position to do finding.
Return values
Theposition where first occurrence is found. -1 means not found.

◆ Find() [2/4]

FX_STRSIZE CFX_ByteString::Find ( FX_CHAR  ch,
FX_STRSIZE  start = 0 
) const

Find a character, from specific position. Only first occurrence is found.

Parameters
[in]chThe character to be found.
[in]startSpecifies the zero-based index of the starting position to do finding.
Return values
Theposition where first occurrence is found. -1 means not found.

◆ Find() [3/4]

FX_STRSIZE CFX_WideString::Find ( FX_LPCWSTR  lpszSub,
FX_STRSIZE  start = 0 
) const

Find a sub-string, from specific position. Only first occurrence is found.

Parameters
[in]lpszSubThe sub-string to be found.
[in]startSpecifies the zero-based index of the starting position to do finding. Default value: 0.
Returns
The position of first occurrence in current string. -1 means not found.

◆ Find() [4/4]

FX_STRSIZE CFX_WideString::Find ( FX_WCHAR  ch,
FX_STRSIZE  start = 0 
) const

Find a character, from specific position. Only first occurrence is found.

Parameters
[in]chThe character to be found.
[in]startSpecifies the zero-based index of the starting position to do finding.Default value: 0.
Returns
The position of first occurrence in current string. -1 means not found.

◆ Flush() [1/4]

virtual FX_BOOL IFX_StreamWrite::Flush ( )
inlinevirtual

Flush stream data.

Returns
true means success, while false means failure.

Reimplemented in IFX_ChunkFileStream, IFX_FileStream, IFX_FileWrite, and CFX_CachedFileRead.

◆ Flush() [2/4]

virtual FX_BOOL IFX_FileWrite::Flush ( )
pure virtual

Flush internal buffer of the file.

Returns
true means success, while false means failure.

Reimplemented from IFX_StreamWrite.

Implemented in IFX_ChunkFileStream, IFX_FileStream, and CFX_CachedFileRead.

◆ Flush() [3/4]

virtual FX_BOOL IFX_FileStream::Flush ( )
pure virtual

Flush internal buffer.

Returns
true means success, and false means failure.

Implements IFX_FileWrite.

Implemented in IFX_ChunkFileStream, and CFX_CachedFileRead.

◆ Flush() [4/4]

virtual FX_BOOL IFX_ChunkFileStream::Flush ( )
pure virtual

Flush internal buffer.

Returns
true means success, and false means failure.

Implements IFX_FileStream.

◆ Format() [1/2]

void CFX_ByteString::Format ( FX_LPCSTR  lpszFormat,
  ... 
)

Format a number of parameters into this byte string.

On desktop platforms, this function supports all the sprintf() formats.
On embedded platforms, it supports only a subset of formats:

  • Supported types: d, u, f, g, x, X, s, c, %.
  • Width field supported.
  • Precision not supported
  • Flags supported: '0'.
Parameters
[in]lpszFormatSpecifies a format-control string.
Returns
None.

◆ Format() [2/2]

void CFX_WideString::Format ( FX_LPCWSTR  lpszFormat,
  ... 
)

Format a number of parameters into this wide string.

Parameters
[in]lpszFormatSpecifies a format-control string.
Returns
None.

◆ FormatFloat()

static CFX_ByteString CFX_ByteString::FormatFloat ( FX_FLOAT  f,
int  precision = 0 
)
static

Convert from floating-point number.

Parameters
[in]fThe input floating-point number.
[in]precisionThe number of decimal digits. Not used. Default value: 0.
Returns
A CFX_ByteString object.

◆ FormatInteger()

static CFX_ByteString CFX_ByteString::FormatInteger ( FX_INT32  i,
FX_DWORD  flags = 0 
)
static

Convert from Integer.

The flags can be following flags (single or compound):

  • FXFORMAT_SIGNED
  • FXFORMAT_HEX
  • FXFORMAT_CAPITAL
Parameters
[in]iThe input 32-bit integer.
[in]flagsThe formating flags. Default value: 0.
Returns
A CFX_ByteString object.

◆ FormatV() [1/2]

void CFX_ByteString::FormatV ( FX_LPCSTR  lpszFormat,
va_list  argList 
)

Format a number of parameters into this byte string, using va_list.

Parameters
[in]lpszFormatSpecifies a format-control string.
[in]argListVariable-argument lists.
Returns
None.
See also
CFX_ByteString::Format

◆ FormatV() [2/2]

void CFX_WideString::FormatV ( FX_LPCWSTR  lpszFormat,
va_list  argList 
)

Format a number of parameters into this wide string. using va_list.

Parameters
[in]lpszFormatSpecifies a format-control string.
[in]argListVariable-argument lists.
Returns
None.
See also
CFX_WideString::Format

◆ FromLocal()

static CFX_WideString CFX_WideString::FromLocal ( const char *  str,
FX_STRSIZE  len = -1 
)
static

Create a wide string from system multi-byte charset.

Parameters
[in]stra multi-byte charset string.
[in]lenThe length in bytes of the multi-byte charset string. This can be -1 for zero terminated multi-byte charset string.
Returns
A wide string.

◆ FromUnicode() [1/2]

static CFX_ByteString CFX_ByteString::FromUnicode ( const CFX_WideString str)
static

Create a CFX_ByteString object from a CFX_WideString object.

Parameters
[in]strA ref to a constant CFX_WideString object.
Returns
A byte string.

◆ FromUnicode() [2/2]

static CFX_ByteString CFX_ByteString::FromUnicode ( FX_LPCWSTR  ptr,
FX_STRSIZE  len = -1 
)
static

Create a CFX_ByteString object from a Unicode string. Convert from Unicode to system multi-byte charset.

Parameters
[in]ptrPointer to a constant Unicode string.
[in]lenThe length of the Unicode string. len can be -1 for zero terminated Unicode string.
Returns
A byte string.

◆ FromUTF16BE()

static CFX_WideString CFX_WideString::FromUTF16BE ( const unsigned short *  str,
FX_STRSIZE  len = -1 
)
static

Create a wide string from UTF16BE encoded string.

Parameters
[in]strA UTF16BE encoded string.
[in]lenThe length in bytes of the UTF16BE encoded string. This can be -1 for zero terminated UTF16BE string.
Returns
A wide string.

◆ FromUTF16LE()

static CFX_WideString CFX_WideString::FromUTF16LE ( const unsigned short *  str,
FX_STRSIZE  len = -1 
)
static

Create a wide string from UTF16LE encoded string.

Parameters
[in]strA UTF16LE encoded string.
[in]lenThe length in bytes of the UTF16LE encoded string. This can be -1 for zero terminated UTF16LE string.
Returns
A wide string.

◆ FromUTF8()

static CFX_WideString CFX_WideString::FromUTF8 ( const char *  str,
FX_STRSIZE  len = -1 
)
static

Create a wide string from UTF-8 string (ASCII string compatible).

Parameters
[in]strA UTF8 string.
[in]lenThe length in bytes of the UTF8 string. This can be -1 for zero terminated UTF8 string.
Returns
A wide string.

◆ FX_atof()

FX_FLOAT FX_atof ( FX_BSTR  str)

Convert a non-buffered byte string to a floating-point number.

Parameters
[in]strA non-buffered byte string.
Returns
A floating-point number.

◆ FX_Atom_Add32()

FX_INT32 FX_Atom_Add32 ( volatile FX_INT32 pAddend,
FX_INT32  nIncrement 
)

Increase 32-bits integer value.

Parameters
[in,out]pAddendPointer to 32-bits integer to increase value.
[in]nIncrementIncrement value to be added to pAddend.
Returns
New increment value.

◆ FX_Atom_Add64()

FX_INT64 FX_Atom_Add64 ( volatile FX_INT64 *  pAddend,
FX_INT64  nIncrement 
)

Increase 64-bits integer value.

Parameters
[in,out]pAddendPointer to 64-bits integer to increase value.
[in]nIncrementIncrement value to be added to pAddend.
Returns
New increment value.

◆ FX_Atom_Subtract32()

FX_INT32 FX_Atom_Subtract32 ( volatile FX_INT32 pAddend,
FX_INT32  nDecrement 
)

Decrease 32-bits integer value.

Parameters
[in,out]pAddendPointer to 32-bits integer to decrease value.
[in]nDecrementDecrement value to be subtracted from pAddend.
Returns
New decrement value.

◆ FX_Atom_Subtract64()

FX_INT64 FX_Atom_Subtract64 ( volatile FX_INT64 *  pAddend,
FX_INT64  nDecrement 
)

Decrease 64-bits integer value.

Parameters
[in,out]pAddendPointer to 64-bits integer to decrease value.
[in]nDecrementDecrement value to be subtracted from pAddend.
Returns
New decrement value.

◆ FX_atonum()

void FX_atonum ( FX_BSTR  str,
FX_BOOL bInteger,
void *  pData,
int  sizeOfData = 4 
)

Convert a non-buffered byte string to a number.

Parameters
[in]strA non-buffered byte string.
[out]bIntegerNon-zero values means the string can convert to a number, otherwise can not.
[out]pDataIt receives the converted number.
[in]sizeOfDataSize of pData. Default value: 4.
Returns
None.

◆ FX_CloseFolder()

void FX_CloseFolder ( void *  handle)

Close folder handle.

Parameters
[in]handlefolder handle returned by FX_OpenFolder function.
Returns
None.

◆ FX_CreateCodePointFromUtf16SurrogatePair()

FX_DWORD FX_CreateCodePointFromUtf16SurrogatePair ( FX_WCHAR  first,
FX_WCHAR  second 
)
inline

Creates a Unicode code point from UTF16 surrogate pair.

Parameters
[in]firstFirst value of a UTF16 surrogate pair.
[in]secondSecond value of a UTF16 surrogate pair.
Returns
The Unicode code point.
Note
Only make sense if the the system uses UTF-16 for wide string encoding. All supported systems with 16 bit wchar_t (Windows, Cygwin, Symbian OS) do use UTF-16.

◆ FX_CreateDefaultFileAccess()

IFX_FileAccess* FX_CreateDefaultFileAccess ( FX_WSTR  wsPath,
IFX_Allocator pAllocator = 0 
)

Create a CRT based file I/O interface.

Parameters
[in]wsPathFile path.
[in]pAllocatorAn allocator. Default value: NULL.
Returns
An instance of IFX_FileAccess interface. NULL means failure. Please call function IFX_FileAccess::Release to destroy the returned object when not use it any more.

◆ FX_CreateFileRead() [1/2]

IFX_FileRead* FX_CreateFileRead ( FX_LPCSTR  filename,
IFX_Allocator pAllocator = 0 
)

(Available only for platforms supporting CRT file access) Create a CRT based file reading interface.

Parameters
[in]filenameFile name, using MBCS file name.
[in]pAllocatorAn allocator. Default value: NULL.
Returns
An instance of IFX_FileRead interface. Please call function IFX_FileRead::Release to destroy the returned object when not use it any more.

◆ FX_CreateFileRead() [2/2]

IFX_FileRead* FX_CreateFileRead ( FX_LPCWSTR  filename,
IFX_Allocator pAllocator = 0 
)

(Available only for platforms supporting CRT file access) Create a CRT based file reading interface.

Parameters
[in]filenameFile name, using Unicode file name.
[in]pAllocatorAn allocator. Default value: NULL.
Returns
An instance of IFX_FileRead interface. Please call function IFX_FileRead::Release to destroy the returned object when not use it any more.

◆ FX_CreateFileStream() [1/2]

IFX_FileStream* FX_CreateFileStream ( FX_LPCSTR  filename,
FX_DWORD  dwModes,
IFX_Allocator pAllocator = 0 
)

(Available only for platforms supporting CRT file access) Create a CRT based file I/O interface.

Parameters
filenameFile name, using MBCS file name.
dwModes
pAllocatorAn allocator. Default value: NULL.
Returns
An instance of IFX_FileStream interface. NULL means failure. Please call function IFX_FileStream::Release to destroy returned object when not use it any more.

◆ FX_CreateFileStream() [2/2]

IFX_FileStream* FX_CreateFileStream ( FX_LPCWSTR  filename,
FX_DWORD  dwModes,
IFX_Allocator pAllocator = 0 
)

(Available only for platforms supporting CRT file access) Create a CRT based file I/O interface.

Parameters
filenameFile name, using Unicode file name.
dwModes
pAllocatorAn allocator. Default value: NULL.
Returns
An instance of IFX_FileStream interface. NULL means failure. Please call function IFX_FileStream::Release to destroy returned object when not use it any more.

◆ FX_CreateFileWrite() [1/2]

IFX_FileWrite* FX_CreateFileWrite ( FX_LPCSTR  filename,
IFX_Allocator pAllocator = 0 
)

(Available only for platforms supporting CRT file access (fopen, ...)) Create a CRT based file writing interface.

Parameters
[in]filenameFile name, using MBCS file name.
[in]pAllocatorAn allocator. Default value: NULL.
Returns
An instance of IFX_FileWrite interface. Please call function IFX_FileWrite::Release to destroy returned object when not use it any more.

◆ FX_CreateFileWrite() [2/2]

IFX_FileWrite* FX_CreateFileWrite ( FX_LPCWSTR  filename,
IFX_Allocator pAllocator = 0 
)

(Available only for platforms supporting CRT file access (fopen, ...)) Create a CRT based file writing interface.

Parameters
[in]filenameFile name, using unicode file name.
[in]pAllocatorAn allocator. Default value: NULL.
Returns
An instance of IFX_FileWrite interface. Please call function IFX_FileWrite::Release to destroy returned object when not use it any more.

◆ FX_CreateFolder() [1/2]

FX_BOOL FX_CreateFolder ( FX_LPCSTR  path)

Create new folder.

Parameters
[in]pathpath name of folder.
Returns
true means success, while false means failure.

◆ FX_CreateFolder() [2/2]

FX_BOOL FX_CreateFolder ( FX_LPCWSTR  path)

Create new folder.

Parameters
[in]pathpath name of folder.
Returns
true means success, while false means failure.

◆ FX_CreateMemoryStream() [1/2]

IFX_MemoryStream* FX_CreateMemoryStream ( FX_BOOL  bConsecutive = false,
IFX_Allocator pAllocator = 0 
)

Create a memory stream object. Memory buffer will be created internally, and the size will increase when need more space.

Parameters
[in]bConsecutiveIndicates whether to create a consecutive memory stream. true means to create a consecutive memory stream, while false means to create a non-consecutive stream. Default value: false.
[in]pAllocatorPointer to IFX_Allocator object which specifies an allocator. NULL means to use default allocator. Default value: NULL.
Returns
An instance of IFX_MemoryStream interface. NULL means failure.

◆ FX_CreateMemoryStream() [2/2]

IFX_MemoryStream* FX_CreateMemoryStream ( FX_LPBYTE  pBuffer,
size_t  nSize,
FX_BOOL  bTakeOver = false,
IFX_Allocator pAllocator = 0 
)

Creates a stream object by a given memory buffer. This function creates a consecutive memory stream object.

Parameters
[in]pBufferA memory buffer to read/write data.
[in]nSizeBuffer size, in bytes.
[in]bTakeOverIndicates whether need to take over parameter pBuffer. If this is true, parameter pBuffer will release internally when destroy returned IFX_MemoryStream object. Default value: false.
[in]pAllocatorPointer to IFX_Allocator object, this specifies an allocator. If this is NULL, default allocator is used. Default value: NULL.
Returns
An instance of IFX_MemoryStream interface. NULL means failure.

◆ FX_CreateUtf16SurrogatePairFromCodePoint()

FX_BOOL FX_CreateUtf16SurrogatePairFromCodePoint ( FX_DWORD  unicode,
FX_WCHAR first,
FX_WCHAR second 
)
inline

Creates UTF16 surrogate pair from a Unicode code point.

Parameters
[in]unicodeThe Unicode code point.
[out]firstFirst value of a UTF16 surrogate pair.
[out]secondSecond value of a UTF16 surrogate pair.
Returns
false means the Unicode code point isn't in the range which need use TF16 surrogate pair.
Note
Only make sense if the system uses UTF-16 for wide string encoding. All supported systems with 16 bit wchar_t (Windows, Cygwin, Symbian OS) to use UTF-16.

◆ FX_DecodeURI()

CFX_WideString FX_DecodeURI ( const CFX_ByteString bsURI)

A simple URI Decode.

Parameters
[in]bsURIA URI string to be decoded.
Returns
The decoded URI string.

◆ FX_EncodeURI()

CFX_ByteString FX_EncodeURI ( const CFX_WideString wsURI)

A simple URI encode.

Parameters
[in]wsURIA URI string to be encoded.
Returns
The encoded URI string.

◆ FX_File_Close()

void FX_File_Close ( FX_HFILE  hFile,
IFX_Allocator pAllocator = 0 
)

Close file.

Parameters
[in]hFileFile handler returned by function ::FX_File_Open.
[in]pAllocatorAn allocator. Default value: NULL.
Returns
None.

◆ FX_File_Copy() [1/2]

FX_BOOL FX_File_Copy ( FX_BSTR  fileNameSrc,
FX_BSTR  fileNameDst 
)

Copy file.

Parameters
[in]fileNameSrcSource file path name.
[in]fileNameDstDestination file path name.
Returns
true means success, while false means failure.

◆ FX_File_Copy() [2/2]

FX_BOOL FX_File_Copy ( FX_WSTR  fileNameSrc,
FX_WSTR  fileNameDst 
)

Copy file.

Parameters
[in]fileNameSrcSource file path name.
[in]fileNameDstDestination file path name.
Returns
true means success, while false means failure.

◆ FX_File_Delete() [1/2]

FX_BOOL FX_File_Delete ( FX_BSTR  fileName)

Delete file.

Parameters
[in]fileNameFile path name.
Returns
true means success, while false means failure.

◆ FX_File_Delete() [2/2]

FX_BOOL FX_File_Delete ( FX_WSTR  fileName)

Delete file.

Parameters
[in]fileNameFile path name.
Returns
true means success, while false means failure.

◆ FX_File_Exist() [1/2]

FX_BOOL FX_File_Exist ( FX_BSTR  fileName)

Determine whether a file exists or not.

Parameters
[in]fileNameFile path name.
Returns
true means file exists, while false means file does not exist.

◆ FX_File_Exist() [2/2]

FX_BOOL FX_File_Exist ( FX_WSTR  fileName)

Determine whether a file exists or not.

Parameters
[in]fileNameFile path name.
Returns
true means file exists, while false means file does not exist.

◆ FX_File_Flush()

FX_BOOL FX_File_Flush ( FX_HFILE  hFile)

Flush internal buffer if need.

Parameters
[in]hFileFile handler returned by function ::FX_File_Open.
Returns
true means success, while false means failure.

◆ FX_File_GetPosition()

FX_INT64 FX_File_GetPosition ( FX_HFILE  hFile)

Get the current file accessing position.

Parameters
[in]hFileFile handler returned by function ::FX_File_Open.
Returns
The current file accessing position from the beginning of file. -1 means failure.

◆ FX_File_GetSize()

FX_INT64 FX_File_GetSize ( FX_HFILE  hFile)

Get file size.

Parameters
[in]hFileFile handler returned by function ::FX_File_Open.
Returns
File size. 0 means file is empty or failure.

◆ FX_File_Move() [1/2]

FX_BOOL FX_File_Move ( FX_BSTR  fileNameSrc,
FX_BSTR  fileNameDst 
)

Move file.

Parameters
[in]fileNameSrcSource file path name.
[in]fileNameDstDestination file path name.
Returns
true means success, while false means failure.

◆ FX_File_Move() [2/2]

FX_BOOL FX_File_Move ( FX_WSTR  fileNameSrc,
FX_WSTR  fileNameDst 
)

Move file.

Parameters
[in]fileNameSrcSource file path name.
[in]fileNameDstDestination file path name.
Returns
true means success, while false means failure.

◆ FX_File_Open() [1/2]

FX_HFILE FX_File_Open ( FX_BSTR  fileName,
FX_DWORD  dwMode,
IFX_Allocator pAllocator = 0 
)

Open file with specified accessing mode.

Parameters
[in]fileNameFile path name which specifies a file to be opened.
[in]dwModeFile accessing mode. Please refer to values starting from ::FX_FILEMODE_Write and this should be one of these values.
[in]pAllocatorAn allocator. Default value: NULL.
Returns
File handler. NULL means failure.

◆ FX_File_Open() [2/2]

FX_HFILE FX_File_Open ( FX_WSTR  fileName,
FX_DWORD  dwMode,
IFX_Allocator pAllocator = 0 
)

Open file with specified accessing mode.

Parameters
[in]fileNameFile path name which specifies a file to be opened.
[in]dwModeFile accessing mode. Please refer to values starting from ::FX_FILEMODE_Write and this should be one of these values.
[in]pAllocatorAn allocator. Default value: NULL.
Returns
File handler. NULL means failure.

◆ FX_File_Read()

size_t FX_File_Read ( FX_HFILE  hFile,
void *  pBuffer,
size_t  szBuffer 
)

Read data from the current file accessing position.

Parameters
[in]hFileFile handler returned by function ::FX_File_Open.
[out]pBufferBuffer to receive data.
[in]szBufferBuffer size, in bytes.
Returns
The size of data read from file. 0 means there is no data or failure.

◆ FX_File_ReadPos()

size_t FX_File_ReadPos ( FX_HFILE  hFile,
void *  pBuffer,
size_t  szBuffer,
FX_INT64  pos 
)

Read data from specified position.

Parameters
[in]hFileFile handler returned by function ::FX_File_Open.
[out]pBufferBuffer to receive data.
[in]szBufferBuffer size, in bytes.
[in]posPosition from which to read data, from the beginning of file.
Returns
The size of data read from file. 0 means there is no data or failure.

◆ FX_File_SetPosition()

FX_INT64 FX_File_SetPosition ( FX_HFILE  hFile,
FX_INT64  pos 
)

Set the current file accessing position.

Parameters
[in]hFileFile handler returned by function ::FX_File_Open.
[in]posThe new accessing position.
Returns
The current file accessing position from the beginning of file. -1 means failure.

◆ FX_File_Truncate()

FX_BOOL FX_File_Truncate ( FX_HFILE  hFile,
FX_INT64  szFile 
)

Truncate file size.

Parameters
[in]hFileFile handler returned by function ::FX_File_Open.
[in]szFileNew file size.
Returns
true means success, while false means failure.

◆ FX_File_Write()

size_t FX_File_Write ( FX_HFILE  hFile,
const void *  pBuffer,
size_t  szBuffer 
)

Write data from the current file accessing position.

Parameters
[in]hFileFile handler returned by function ::FX_File_Open.
[in]pBufferBuffer of data.
[in]szBufferData size, in bytes.
Returns
The size of data write into file. If return value is less than szBuffer, that means failure.

◆ FX_File_WritePos()

size_t FX_File_WritePos ( FX_HFILE  hFile,
const void *  pBuffer,
size_t  szBuffer,
FX_INT64  pos 
)

Write data at specified position.

Parameters
[in]hFileFile handler returned by function ::FX_File_Open.
[in]pBufferBuffer of data.
[in]szBufferData size, in bytes.
[in]posPosition from which to write data, from the beginning of file.
Returns
The size of data write into file. If return value is less than szBuffer, that means failure.

◆ FX_ftoa()

FX_STRSIZE FX_ftoa ( FX_FLOAT  f,
FX_LPSTR  buf,
int  precision = 0 
)

Convert float to byte string.

Parameters
[in]fFloat number.
[out]bufBuffer of float string, buf should have 32 bytes at least.
[in]precisionThe number of decimal digits. Default value: 0.
Returns
Length of formatted float string in buf, in bytes.

◆ FX_GetFolderSeparator()

FX_WCHAR FX_GetFolderSeparator ( )

Get folder separator for the system. Most likely it's either /' or '\'.

Returns
Folder separator.

◆ FX_GetNextFile() [1/2]

FX_BOOL FX_GetNextFile ( void *  handle,
CFX_ByteString filename,
FX_BOOL bFolder,
FX_LPCSTR  absPath = 0 
)

Read next entry in the folder.

Parameters
[in]handleFolder handle returned by function ::FX_OpenFolder.
[out]filenameReceives file name when find a folder item.
[out]bFolderIndicates filename is a sub-folder or normal file.
[in]absPathAbsolute path. Default value: NULL.
Returns
true means success, which false means that reach end of folder.

◆ FX_GetNextFile() [2/2]

FX_BOOL FX_GetNextFile ( void *  handle,
CFX_WideString filename,
FX_BOOL bFolder,
FX_LPCSTR  absPath = 0 
)

Read next entry in the folder.

Parameters
[in]handleFolder handle returned by function ::FX_OpenFolder.
[out]filenameReceives file name when find a folder item.
[out]bFolderIndicates filename is a sub-folder or normal file.
[in]absPathAbsolute path. Default value: NULL.
Returns
true means success, which false means that reach end of folder.

◆ FX_IsFilePathExist()

FX_BOOL FX_IsFilePathExist ( FX_LPCWSTR  path)

Check if the path exists, including file path and folder path.

Parameters
[in]pathPath name of file or folder.
Returns
true means input path exists, while false means input path does not exist.

◆ FX_IsRectAdjacent()

FX_BOOL FX_IsRectAdjacent ( const CFX_FloatRect rect1,
const CFX_FloatRect rect2,
FX_FLOAT  alignmentTolerance,
FX_FLOAT  distanceTolerance,
int  direction 
)

Check if a rectangle is adjacent to the other rectangle in the horizontal or vertical direction.

Parameters
[in]rect1A rectangle which is to be check if adjacent to parameter rect2.
[in]rect2The other rectangle.
[in]alignmentToleranceAlignment tolerance to be allowed between two rectangles. Measured in coordinate units, and should be non-negative value.
[in]distanceToleranceDistance tolerance to be allowed between two rectangles. Measured in coordinate units, and should be non-negative value.
[in]directionSpecify a direction to judge adjacent state between two rectangles:
  • 0 means horizontal direction.
  • 1 means vertical direction.
Returns
true means the specified rectangle is adjacent to the other specified rectangle in specified direction, while false means the specified rectangle is not adjacent to the other specified rectangle in specified direction.

◆ FX_IsUtf16SurrogatePair()

FX_BOOL FX_IsUtf16SurrogatePair ( FX_WCHAR  first,
FX_WCHAR  second 
)
inline

Determines if the arguments constitute UTF-16 surrogate pair.

Parameters
[in]firstFirst value of a UTF16 surrogate pair.
[in]secondSecond value of a UTF16 surrogate pair.
Returns
true means the arguments constitute UTF-16 surrogate pair and thus should be combined into a single Unicode code point.
Note
Only make sense if the the system uses UTF-16 for wide string encoding. All supported systems with 16 bit wchar_t (Windows, Cygwin, Symbian OS) do use UTF-16.

◆ FX_Mutex_Destroy()

void FX_Mutex_Destroy ( FX_MUTEX pMutex)

Destroy a mutex.

Parameters
[in]pMutexPointer to a mutex to be destroyed. Must be not a NULL pointer.
Returns
None.

◆ FX_Mutex_Initialize()

FX_BOOL FX_Mutex_Initialize ( FX_MUTEX pMutex)

Initialize a mutex.

Parameters
[in]pMutexPointer to a mutex which need to be initialized. Must be not a NULL pointer.
Returns
true means success, while false means failure.

◆ FX_Mutex_Lock()

void FX_Mutex_Lock ( FX_MUTEX pMutex)

Lock a mutex.

Parameters
[in]pMutexPointer to a mutex. Must be not a NULL pointer.
Returns
None.
Note
If another thread owns the mutex when calls this function, this function won't return until the current thread obtains the ownership of the mutex.

◆ FX_Mutex_TryLock()

FX_BOOL FX_Mutex_TryLock ( FX_MUTEX pMutex)

Try to lock a mutex.

Parameters
[in]pMutexPointer to a mutex. Must be not a NULL pointer.
Returns
true means the given mutex object is locked successfully or the current thread already owns the mutex, while false means another thread owns the mutex already or other error occurs.

◆ FX_Mutex_Unlock()

void FX_Mutex_Unlock ( FX_MUTEX pMutex)

Unlock a mutex.

Parameters
[in]pMutexPointer to a mutex. Must be not a NULL pointer.
Returns
None.

◆ FX_OpenFolder() [1/2]

void* FX_OpenFolder ( FX_LPCSTR  path)

Open a folder for reading.

Parameters
[in]pathPath name of folder.
Returns
Folder handle. NULL means failure.

◆ FX_OpenFolder() [2/2]

void* FX_OpenFolder ( FX_LPCWSTR  path)

Open a folder for reading.

Parameters
[in]pathPath name of folder.
Returns
Folder handle. NULL means failure.

◆ FX_Process_Finalize()

void FX_Process_Finalize ( )

Finalize process.

Returns
None.
Note
Application should call this function before release memory management when application stops running.

◆ FX_Process_GetContext()

CFX_ProcessContext* FX_Process_GetContext ( )

Retrieve process context.

Returns
The current process context object.
Note
This function is used internally.

◆ FX_Process_GetID()

FX_PROCESSID FX_Process_GetID ( )

Get the current process ID.

Returns
The current process ID

◆ FX_Process_GetPrivateData()

FX_LPVOID FX_Process_GetPrivateData ( FX_LPVOID  key)

Get private data in the current process.

Parameters
[in]keyKey value to specify private data to be retrieved.
Returns
Pointer to private data, NULL if failure.

◆ FX_Process_Initialize()

void FX_Process_Initialize ( )

Initialize process.

Returns
None.
Note
Application should call this function after initializes memory management. This function will prepare some global resources which are used in application.

◆ FX_Process_RemovePrivateData()

void FX_Process_RemovePrivateData ( FX_LPVOID  key)

Remove private data in the current process.

Parameters
[in]keyKey value to specify private data to be removed.
Returns
None.

◆ FX_Process_SetPrivateData()

void FX_Process_SetPrivateData ( FX_LPVOID  key,
FX_LPVOID  data,
PD_CALLBACK_FREEDATA  callback 
)

Set private data in the current process.

Parameters
[in]keyKey value to specify private data to be set.
[in]dataPointer to private data.
[in]callbackCallback function address which is used to free private data, pass NULL if need no additional process to free private data.
Returns
None.

◆ FX_RWLock_Destroy()

void FX_RWLock_Destroy ( FX_RWLOCK *  pRWLock)

Destroy a read-write lock.

Parameters
[in]pRWLockPointer to a read-write lock to be destroyed. Must be not a NULL pointer.
Returns
None.

◆ FX_RWLock_Initialize()

FX_BOOL FX_RWLock_Initialize ( FX_RWLOCK *  pRWLock)

Initialize a read-write lock.

Parameters
[in]pRWLockPointer to a read-write lock which need to be initialized. Must be not a NULL pointer.
Returns
true means success, while false means failure.

◆ FX_RWLock_ReadLock()

void FX_RWLock_ReadLock ( FX_RWLOCK *  pRWLock)

Lock for share read.

Parameters
[in]pRWLockPointer to a read-write lock. Must be not a NULL pointer.
Returns
None.
Note
If another thread owns the read-write lock when calls this function, this function won't return until the current thread obtains the ownership of the read-write lock.

◆ FX_RWLock_ReadUnlock()

void FX_RWLock_ReadUnlock ( FX_RWLOCK *  pRWLock)

Unlock for share read.

Parameters
[in]pRWLockPointer to a read-write lock. Must be not a NULL pointer.
Returns
None.

◆ FX_RWLock_TryReadLock()

FX_BOOL FX_RWLock_TryReadLock ( FX_RWLOCK *  pRWLock)

Try to lock for share read.

Parameters
[in]pRWLockPointer to a read-write lock. Must be not a NULL pointer.
Returns
true means the given read-write lock object is locked successfully or current thread already owns the read-write lock, false means another thread owns the read-write lock already or other error occurs.

◆ FX_RWLock_TryWriteLock()

FX_BOOL FX_RWLock_TryWriteLock ( FX_RWLOCK *  pRWLock)

Try to lock for exclusive write.

Parameters
[in]pRWLockPointer to a read-write lock. Must be not a NULL pointer.
Returns
true if the given read-write lock object is locked successfully or current thread already owns the read-write lock, false means another thread owns the read-write lock already or other error occurs.

◆ FX_RWLock_WriteLock()

void FX_RWLock_WriteLock ( FX_RWLOCK *  pRWLock)

Lock for exclusive write.

Parameters
[in]pRWLockPointer to a read-write lock. Must be not a NULL pointer.
Returns
None.
Note
If another thread owns the read-write lock when calls this function, this function won't return until the current thread obtains the ownership of the read-write lock.

◆ FX_RWLock_WriteUnlock()

void FX_RWLock_WriteUnlock ( FX_RWLOCK *  pRWLock)

Unlock for exclusive write.

Parameters
[in]pRWLockPointer to a read-write lock. Must be not a NULL pointer.
Returns
None.

◆ FX_SpinLock_Destroy()

void FX_SpinLock_Destroy ( FX_SPINLOCK pSpinLock)

Destroy a spin lock.

Parameters
[in]pSpinLockPointer to a spin lock to be destroyed.
Returns
None.

◆ FX_SpinLock_Initialize()

FX_BOOL FX_SpinLock_Initialize ( FX_SPINLOCK pSpinLock)

Initialize a spin lock.

Parameters
[in]pSpinLockPointer to a spin lock to be initialized.
Returns
true means success, while false means failure.

◆ FX_SpinLock_IsLocked()

FX_BOOL FX_SpinLock_IsLocked ( FX_SPINLOCK pSpinLock)

Determine whether specified spin lock is locked or not.

Parameters
[in]pSpinLockPointer to a spin lock.
Returns
true means spin lock is locked, while false means spin lock is unlocked.

◆ FX_SpinLock_Lock()

void FX_SpinLock_Lock ( FX_SPINLOCK pSpinLock)

Lock a spin lock.

Parameters
[in]pSpinLockPointer to a spin lock.
Returns
None.
Note
If another thread owns the spin lock when calls this function, this function won't return until the current thread obtains the ownership of the spin lock.

◆ FX_SpinLock_TryLock()

FX_BOOL FX_SpinLock_TryLock ( FX_SPINLOCK pSpinLock)

Try to lock a spin lock.

Parameters
[in]pSpinLockPointer to a spin lock.
Returns
true means the given spin lock object is locked successfully or current thread already owns the spin lock, while false means another thread owns the spin lock already or other error occurs.

◆ FX_SpinLock_Unlock()

void FX_SpinLock_Unlock ( FX_SPINLOCK pSpinLock)

Unlock a spin lock.

Parameters
[in]pSpinLockPointer to a spin lock.
Returns
None.

◆ FX_Thread_Create()

FX_HTHREAD FX_Thread_Create ( FX_INT32  nPriority,
size_t  szStack,
FX_CALLBACK_ThreadProc  threadProc,
FX_LPVOID  param 
)

Create a new thread.

Parameters
[in]nPriorityThread priority.
[in]szStackStack size of thread, set to 0 for default stack size.
[in]threadProcThread callback function.
[in]paramParameter passed to thread procedure.
Returns
Thread handle. NULL means failure.

◆ FX_Thread_Exit()

void FX_Thread_Exit ( )

Exit from the current thread.

Returns
None.

◆ FX_Thread_GetContext()

CFX_ThreadContext* FX_Thread_GetContext ( )

Get the current thread context.

Returns
The current thread context. NULL means failure.

◆ FX_Thread_GetExceptionContext()

CFX_ExceptionContext* FX_Thread_GetExceptionContext ( )

Get the current thread exception context.

Returns
The current thread exception context. NULL means failure.

◆ FX_Thread_GetHandle()

FX_HTHREAD FX_Thread_GetHandle ( )

Get the current thread handle.

Returns
The current thread handle, NULL if failure.

◆ FX_Thread_GetHandler()

FX_THREADHANDLER* FX_Thread_GetHandler ( )

Get the current thread handler.

Returns
The current thread handler. NULL means no thread handler has been set.
Note
This function returns NULL always under single-thread mode or FPDFAPI_MT isn't defined.

◆ FX_Thread_GetLastError()

FX_INT32 FX_Thread_GetLastError ( )

Get the last error code in the current thread.

Returns
The last error code.

◆ FX_Thread_GetPriority()

FX_INT32 FX_Thread_GetPriority ( FX_HTHREAD  hThread)

Get thread priority.

Parameters
[in]hThreadThread handle specifies a thread to retrieve its priority.
Returns
Priority code of thread.

◆ FX_Thread_GetPrivateData()

FX_LPVOID FX_Thread_GetPrivateData ( FX_LPVOID  key)

Get private data in the current thread.

Parameters
[in]keyKey value to specify private data to be retrieved.
Returns
Pointer to private data, NULL if failure.

◆ FX_Thread_RemovePrivateData()

void FX_Thread_RemovePrivateData ( FX_LPVOID  key)

Remove private data in the current thread.

Parameters
[in]keyKey value to specify private data to be removed.
Returns
None.

◆ FX_Thread_SetHandler()

void FX_Thread_SetHandler ( FX_THREADHANDLER pThreadHandler)

Set the current thread handler.

Parameters
[in]pThreadHandlerPointer to external thread handler.
Returns
None.
Note
This function is disabled under single-thread mode or FPDFAPI_MT isn't defined.

◆ FX_Thread_SetLastError()

void FX_Thread_SetLastError ( FX_INT32  nErr)

Set the last error code in the current thread.

Parameters
[in]nErrThe last error code to be set.
Returns
None.

◆ FX_Thread_SetPriority()

void FX_Thread_SetPriority ( FX_HTHREAD  hThread,
FX_INT32  nPriority 
)

Set thread priority.

Parameters
[in]hThreadThread handle specifies a thread to change its priority.
[in]nPriorityThread priority code.
Returns
None.

◆ FX_Thread_SetPrivateData()

void FX_Thread_SetPrivateData ( FX_LPVOID  key,
FX_LPVOID  data,
PD_CALLBACK_FREEDATA  callback 
)

Set private data in the current thread.

Parameters
[in]keyKey value to specify private data to be set.
[in]dataPointer to private data.
[in]callbackCallback function address which is used to free private data. Pass NULL if need no additional process to free private data.
Returns
None.

◆ FX_Thread_WaitForMultipleThreads()

FX_INT32 FX_Thread_WaitForMultipleThreads ( const FX_HTHREAD *  pThreads,
FX_INT32  nCount 
)

Wait for termination of multiple threads.

Parameters
[in]pThreadsPointer to array of thread handles.
[in]nCountNumber of threads in array.
Returns
0 means all threads terminates successfully, other value means failure.

◆ FX_Thread_WaitForSingleThread()

FX_INT32 FX_Thread_WaitForSingleThread ( FX_HTHREAD  hThread)

Wait for termination of a single thread.

Parameters
[in]hThreadThread handle specifies a thread to wait.
Returns
0 means thread terminates successfully, other value means failure.

◆ FX_Thread_Yield()

void FX_Thread_Yield ( )

Yield the processor to another thread.

Returns
None.

◆ FX_Time_GetClock()

FX_DWORD FX_Time_GetClock ( )

Get the clock ticks elapsed by calling process.

Returns
Elapsed time in milliseconds.

◆ FX_Time_GetLocalTime()

void FX_Time_GetLocalTime ( FX_SYSTEMTIME pSystemTime)

Retrieve the current local date and time.

Parameters
[in,out]pSystemTimePointer to a FX_SYSTEMTIME to receive the current local data and time.
Returns
None.

◆ FX_Time_GetSystemTime()

void FX_Time_GetSystemTime ( FX_SYSTEMTIME pSystemTime)

Retrieve the current system date and time.

Parameters
[in,out]pSystemTimePointer to a FX_SYSTEMTIME to receive the current system data and time.
Returns
None.

◆ FX_Time_Sleep()

FX_DWORD FX_Time_Sleep ( FX_DWORD  dwMilliseconds)

Delay the current running for specified milliseconds.

Parameters
[in]dwMillisecondsTime in milliseconds to delay.
Returns
Remained time has not elapsed, 0 if time interval expired.

◆ FX_UrlDecode()

CFX_WideString FX_UrlDecode ( const CFX_ByteString bsUrl)

A simple URL decode.

Parameters
[in]bsUrlA URL string to be decoded.
Returns
The decoded URL string.

◆ FX_UrlEncode()

CFX_ByteString FX_UrlEncode ( const CFX_WideString wsUrl)

A simple URL encode.

Parameters
[in]wsUrlA URL string to be encoded.
Returns
The encoded URL string.

◆ FX_UTF8Encode() [1/3]

CFX_ByteString FX_UTF8Encode ( const CFX_WideString wsStr)
inline

Encode a wide string into a UTF-8 string.

Parameters
[in]wsStrA wide string.
Returns
The object of encoded UTF-8 string.

◆ FX_UTF8Encode() [2/3]

CFX_ByteString FX_UTF8Encode ( FX_LPCWSTR  pwsStr,
FX_STRSIZE  len 
)

Encode a wide string into a UTF-8 string.

Parameters
[in]pwsStrPointer to a wide string buffer.
[in]lenLength of wide string, in wide characters (FX_WCHAR).
Returns
The object of encoded UTF-8 string.

◆ FX_UTF8Encode() [3/3]

CFX_ByteString FX_UTF8Encode ( FX_WSTR  wsStr)
inline

Encode a wide string into a UTF-8 string.

Parameters
[in]wsStrA constant wide string.
Returns
The object of encoded UTF-8 string.

◆ FXCRT_GetCurrentSystemTime()

void FXCRT_GetCurrentSystemTime ( FXCRT_DATETIMEZONE dt)

Get current system date,time and timezone information.

Parameters
[in,out]dtStructure to receive the current system date,time and timezone information.
Returns
None.

◆ FXMEM_Alloc()

void* FXMEM_Alloc ( FXMEM_FoxitMgr *  pFoxitMgr,
size_t  size,
int  flags 
)

Foxit basic memory allocation function.

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object.
[in]sizeThe size in bytes to allocate.
[in]flagsMemory allocation attributes.
Returns
Address of new memory block.

◆ FXMEM_AllocDebug()

void* FXMEM_AllocDebug ( FXMEM_FoxitMgr *  pFoxitMgr,
size_t  size,
int  flags,
FX_LPCSTR  file,
int  line 
)

Foxit basic memory allocation function in debug-mode.

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object.
[in]sizeThe size in bytes to allocate.
[in]flagsMemory allocation attributes.
[in]fileThe name of the current source file.
[in]lineThe line number in the current source file.
Returns
Address of new memory block.

◆ FXMEM_CollectAll()

void FXMEM_CollectAll ( FXMEM_FoxitMgr *  pFoxitMgr)

Release all memory blocks allocated by a Foxit manager. This function is only supported on embedded systems.

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object.
Returns
None.

◆ FXMEM_CreateFixedMgr()

FXMEM_FoxitMgr* FXMEM_CreateFixedMgr ( void *  pMemory,
size_t  size,
FXMEM_SystemMgr2 pExtender 
)

Create a Foxit manager from a pre-allocated, fixed memory buffer.

This form of Foxit manager is typically used on embedded systems where memory is limited and can be dedicated to single task. The application is responsible to allocate and free the fixed memory buffer. Buffer size can't be lower than 512KB, there is no upper limit. Now the fixed memory manager supports extensible pool. If parameter pExtender is not NULL, then when current memory pool runs out, it will ask for more from the system.

Parameters
[in]pMemoryA pointer to a memory block.
[in]sizeThe size in bytes of the memory block pointed by parameter pMemory.
[in]pExtenderA pointer to a FXMEM_SystemMgr2 object.
Returns
A pointer to a FXMEM_FoxitMgr object.

◆ FXMEM_CreateFoxitMgr()

FXMEM_FoxitMgr* FXMEM_CreateFoxitMgr ( FXMEM_SystemMgr pSystemMgr)

Create a Foxit manager. A system manager must be provided for actual allocation.

On desktop platforms, you don't have to create a Foxit manager to use memory allocation, because FPDFAPI comes with a default Foxit manager (and underlying default system manager). But if your application uses non-default system manager, you will have to create a new Foxit manager that makes use of the custom system manager.

Parameters
[in]pSystemMgrA pointer to a FXMEM_SystemMgr object.
Returns
A pointer to a FXMEM_FoxitMgr object.

◆ FXMEM_CreateMemoryMgr()

FXMEM_FoxitMgr* FXMEM_CreateMemoryMgr ( size_t  size,
FX_BOOL  extensible 
)

Create a fixed memory manager as default implementation.

Parameters
[in]sizeInitial size of memory pool, in bytes. It should be not less than 8MB(1024 * 1024 * 8).
[in]extensibleIf it's true, memory pool will extend if need more space. And false means memory cannot be extended.
Returns
A pointer to a FXMEM_FoxitMgr object.
Note
If parameter extensible is false and there is no enough space to allocate, FX_Alloc or FX_Realloc will return NULL directly. For extensible memory manager, it will try to request more memory pools to allocate.

◆ FXMEM_CreatePyMgr()

FXMEM_FoxitMgr* FXMEM_CreatePyMgr ( )

Create a Python manager. A fast, special-purpose memory allocator for small blocks, to be used on top of a general-purpose malloc – heavily based on previous art.

On desktop platforms, you don't have to create a Foxit manager to use memory allocation, because FPDFAPI comes with a default Foxit manager (and underlying default system manager). But if your application uses non-default system manager, you can create a new Python manager that makes use of the custom system manager.

Returns
A pointer to a FXMEM_FoxitMgr object.

◆ FXMEM_DefaultAlloc()

void* FXMEM_DefaultAlloc ( size_t  byte_size,
int  flags 
)

Default allocation function using default Foxit memory manager for current module.

Parameters
[in]byte_sizeThe size in bytes to allocate.
[in]flagsMemory allocation attributes.
Returns
Address of new memory block.

◆ FXMEM_DefaultAlloc2()

void* FXMEM_DefaultAlloc2 ( size_t  units,
size_t  unit_size,
int  flags 
)

Default allocation function using default Foxit memory manager for current module.

Parameters
[in]unitsNumber of units to allocate.
[in]unit_sizeThe byte size of each unit.
[in]flagsMemory allocation attributes.
Returns
Address of new memory block.

◆ FXMEM_DefaultAllocDebug()

void* FXMEM_DefaultAllocDebug ( size_t  size,
int  flags,
FX_LPCSTR  file,
int  line 
)

Default debug-mode allocation function using default Foxit memory manager for current module.

Parameters
[in]sizeThe size in bytes to allocate.
[in]flagsMemory allocation attributes.
[in]fileThe name of the current source file.
[in]lineThe line number in the current source file.
Returns
Address of new memory block.

◆ FXMEM_DefaultAllocDebug2()

void* FXMEM_DefaultAllocDebug2 ( size_t  units,
size_t  unit_size,
int  flags,
FX_LPCSTR  file,
int  line 
)

Default debug-mode allocation function using default Foxit memory manager for current module.

Parameters
[in]unitsNumber of units to allocate.
[in]unit_sizeThe byte size of each unit.
[in]flagsMemory allocation attributes.
[in]fileThe name of the current source file.
[in]lineThe line number in the current source file.
Returns
Address of new memory block.

◆ FXMEM_DefaultFree()

void FXMEM_DefaultFree ( void *  pointer,
int  flags 
)

Default free function using default Foxit memory manager for current module.

Parameters
[in]pointerAddress of a memory block.
[in]flagsMemory allocation attributes.
Returns
None.

◆ FXMEM_DefaultRealloc()

void* FXMEM_DefaultRealloc ( void *  pointer,
size_t  new_size,
int  flags 
)

Default reallocation function using default Foxit memory manager for current module.

Parameters
[in]pointerAddress of the memory block to be reallocated.
[in]new_sizeThe new size in bytes to reallocate.
[in]flagsMemory allocation attributes.
Returns
Address of new memory block.

◆ FXMEM_DefaultRealloc2()

void* FXMEM_DefaultRealloc2 ( void *  pointer,
size_t  units,
size_t  unit_size,
int  flags 
)

Default reallocation function using default Foxit memory manager for current module.

Parameters
[in]pointerAddress of the memory block to be reallocated.
[in]unitsNumber of units to allocate.
[in]unit_sizeThe byte size of each unit.
[in]flagsMemory allocation attributes.
Returns
Address of new memory block.

◆ FXMEM_DefaultReallocDebug()

void* FXMEM_DefaultReallocDebug ( void *  pointer,
size_t  new_size,
int  flags,
FX_LPCSTR  file,
int  line 
)

Default debug-mode reallocation function using default Foxit memory manager for current module.

Parameters
[in]pointerAddress of the memory block to be reallocated.
[in]new_sizeThe new size in bytes to reallocate.
[in]flagsMemory allocation attributes.
[in]fileThe name of the current source file.
[in]lineThe line number in the current source file.
Returns
Address of new memory block.

◆ FXMEM_DefaultReallocDebug2()

void* FXMEM_DefaultReallocDebug2 ( void *  pointer,
size_t  units,
size_t  unit_size,
int  flags,
FX_LPCSTR  file,
int  line 
)

Default debug-mode reallocation function using default Foxit memory manager for current module.

Parameters
[in]pointerAddress of the memory block to be reallocated.
[in]unitsNumber of units to allocate.
[in]unit_sizeThe byte size of each unit.
[in]flagsMemory allocation attributes.
[in]fileThe name of the current source file.
[in]lineThe line number in the current source file.
Returns
Address of new memory block.

◆ FXMEM_DestroyFoxitMgr()

void FXMEM_DestroyFoxitMgr ( FXMEM_FoxitMgr *  pFoxitMgr)

Destroy a Foxit manager instance. If the platform supports auto-collection, then all allocated memory blocks will be released.

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object.
Returns
None.

◆ FXMEM_Free()

void FXMEM_Free ( FXMEM_FoxitMgr *  pFoxitMgr,
void *  pointer,
int  flags 
)

Foxit basic memory free function.

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object.
[in]pointerA pointer to a memory block.
[in]flagsMemory allocation attributes.
Returns
None.

◆ FXMEM_GetBlockSizeInFixedMgr()

size_t FXMEM_GetBlockSizeInFixedMgr ( FXMEM_FoxitMgr *  pFoxitMgr,
void *  ptr 
)

Get the size of a memory block to which ptr points.

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object, it should be created as fixed memory manager.
[in]ptrA pointer to a memory block.
Returns
Memory block size in bytes if parameter ptr locates in fixed memory manager, or 0 returns.

◆ FXMEM_GetDefAllocator()

IFX_Allocator* FXMEM_GetDefAllocator ( )

Get default allocator used by the library.

Returns
The default IFX_Allocator pointer.

◆ FXMEM_GetDefaultMgr()

FXMEM_FoxitMgr* FXMEM_GetDefaultMgr ( )

Get default memory manager for current module.

Returns
The default FXMEM_FoxitMgr pointer.

◆ FXMEM_OutputDebugTag()

void FXMEM_OutputDebugTag ( FXMEM_FoxitMgr *  pFoxitMgr,
FX_LPCSTR  tag 
)

Output a memory debug tag.

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object.
[in]tagTag string.
Returns
None.

◆ FXMEM_PurgeMgr()

void FXMEM_PurgeMgr ( FXMEM_FoxitMgr *  pFoxitMgr)

Release all excessive memory without touching any used memory. This is useful for extensible fixed memory manager (FXMEM_SystemMgr2), because we never free those additional memory pool until the memory manager destroyed.

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object.
Returns
None.

◆ FXMEM_Realloc()

void* FXMEM_Realloc ( FXMEM_FoxitMgr *  pFoxitMgr,
void *  pointer,
size_t  new_size,
int  flags 
)

Foxit basic memory reallocation function.

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object.
[in]pointerA pointer to a memory block.
[in]new_sizeThe size in bytes to reallocate.
[in]flagsMemory allocation attributes.
Returns
Address of new memory block.

◆ FXMEM_ReallocDebug()

void* FXMEM_ReallocDebug ( FXMEM_FoxitMgr *  pFoxitMgr,
void *  pointer,
size_t  new_size,
int  flags,
FX_LPCSTR  file,
int  line 
)

Foxit basic memory reallocation function in debug-mode.

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object.
[in]pointerA pointer to a memory block.
[in]new_sizeThe size in bytes to reallocate.
[in]flagsMemory allocation attributes.
[in]fileThe name of the current source file.
[in]lineThe line number in the current source file.
Returns
Address of new memory block.

◆ FXMEM_ReportOOM()

void FXMEM_ReportOOM ( FXMEM_FoxitMgr *  pFoxitMgr)

Report Out-of-memory (OOM).

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object.
Returns
None.

◆ FXMEM_ResetSystemMgr()

void FXMEM_ResetSystemMgr ( )

Reset Foxit system memory manager for current module.

Returns
None.

◆ FXMEM_SetConfig()

void FXMEM_SetConfig ( const FX_MEMCONFIG memConfig)

Set configuration of fixed memory.

This function is optional for desktop platforms, and should be called at first to change default configuration when start application before initialize fixed memory manager.

Parameters
[in]memConfigA pointer to memory configuration.
Returns
None.

◆ FXMEM_SetDefaultMgr()

void FXMEM_SetDefaultMgr ( FXMEM_FoxitMgr *  pFoxitMgr)

Set default Foxit manager for current compile module (EXE, DLL, etc.).

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object.
Returns
None.

◆ FXMEM_SetOOMHandler()

void FXMEM_SetOOMHandler ( FXMEM_FoxitMgr *  pFoxitMgr,
FPDF_OOM_Handler  pOOMReportFunc,
void *  param 
)

Setup A Out-Of-Memory handler for a Foxit memory manager.

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object.
[in]pOOMReportFuncA pointer a Out-Of-Memory handler.
[in]paramA generic typeless pointer for user data to be called back.
Returns
None.

◆ FXMEM_SetPyConfig()

int FXMEM_SetPyConfig ( size_t  lowByteRange,
size_t  highByteRange 
)

Set configuration of Python memory.

This function is optional, when config is set, Python memory manager can only allocate between lowByteRange and highByteRange.

Parameters
[in]lowByteRangeThe specify low byte range.
[in]highByteRangeThe specify high byte range.
Note
. lowByteRange must to be less than or equal to highByteRange and highByteRange must be less than or equal to SMALL_REQUEST_THRESHOLD which is the max size threshold below which malloc requests are considered to be small enough in order to use preallocated memory pools.
Returns
Zero if the function is successful; otherwise -1, parameter error.

◆ FXMEM_UseDebugger()

void FXMEM_UseDebugger ( FXMEM_FoxitMgr *  pFoxitMgr,
FXMEM_Debugger pDebugger 
)

Use a memory debugger which capturing all memory activities. Use NULL for parameter pDebugger to stop debugging.

Parameters
[in]pFoxitMgrA pointer to a FXMEM_FoxitMgr object to be debugged.
[in]pDebuggerA pointer to a FXMEM_Debugger object.
Returns
None.

◆ FXSYS_atoi()

FX_INT32 FXSYS_atoi ( FX_LPCSTR  str)

Convert an ANSI string to an integer.

Parameters
[in]strAn ANSI string.
Returns
An integer as converted result.

◆ FXSYS_atoi64()

FX_INT64 FXSYS_atoi64 ( FX_LPCSTR  str)

Convert an ANSI string to an integer.

Parameters
[in]strAn ANSI string.
Returns
An integer as converted result.

◆ FXSYS_i64toa()

FX_LPCSTR FXSYS_i64toa ( FX_INT64  value,
FX_LPSTR  str,
int  radix 
)

Convert an integer to an ANSI string.

Parameters
[in]valueAn integer.
[in]str
[in]radixBase of value; which must be in the range 2¨C36.
Returns

◆ FXSYS_i64tow()

FX_LPCWSTR FXSYS_i64tow ( FX_INT64  value,
FX_LPWSTR  str,
int  radix 
)

Convert an integer to an wide string.

Parameters
[in]valueAn integer.
[in]str
[in]radixBase of value; which must be in the range 2¨C36.
Returns

◆ FXSYS_memcmp32()

FX_INT32 FXSYS_memcmp32 ( const void *  buf1,
const void *  buf2,
size_t  size 
)

Compare data in two buffers.

Input buffers should start from 4-bytes-aligned position, but size can be any value.

Parameters
[in]buf1First buffer pointer.
[in]buf2Second buffer pointer.
[in]sizeLength of data to compare, in bytes.
Returns
The result would be following:
  • The result would be less than zero if buf1 less than buf2;
  • The result would be equal to zero if buf1 identical to buf2;
  • The result would be bigger than 0, if buf2 greater than buf2.

◆ FXSYS_memcpy32()

void* FXSYS_memcpy32 ( void *  dst,
const void *  src,
size_t  size 
)

Copy buffer data from source to destination.

Parameter dst and src should start from 4-bytes-aligned position, but size can be any value.

Parameters
[in,out]dstDestination buffer pointer.
[in]srcSource buffer pointer to copy from.
[in]sizeLength of data to copy, in bytes.
Returns
The dest buffer.

◆ FXSYS_memmove32()

void* FXSYS_memmove32 ( void *  dst,
const void *  src,
size_t  size 
)

Move source buffer data into destination.

Parameters
[in,out]dstDestination buffer pointer.
[in]srcSource buffer pointer.
[in]sizeLength of source buffer data to move, in bytes.
Returns
The dest buffer.

◆ FXSYS_memset32()

void* FXSYS_memset32 ( void *  dst,
FX_INT32  v,
size_t  size 
)

Set buffer data to specified value.

Parameter dst should start from 4-bytes-aligned position, but size can be any value.

Parameters
[in,out]dstDestination buffer pointer.
[in]vValue to set.
[in]sizeLength of data to set, in bytes.
Returns
The dest buffer.

◆ FXSYS_memset8()

void* FXSYS_memset8 ( void *  dst,
FX_BYTE  v,
size_t  size 
)

Set buffer data to specified value.

Parameter dst should start from 4-bytes-aligned position, but size can be any value.

Parameters
[in,out]dstDestination buffer pointer.
[in]vValue to set.
[in]sizeLength of data to set, in bytes.
Returns
The dest buffer.

◆ FXSYS_round()

int FXSYS_round ( FX_FLOAT  f)

Get nearest integer.

Parameters
[in]fA float value.
Returns
The nearest integer.

◆ FXSYS_wtoi()

FX_INT32 FXSYS_wtoi ( FX_LPCWSTR  str)

Convert a wide string to an integer.

Parameters
[in]strA wide string.
Returns
An integer as converted result.

◆ FXSYS_wtoi64()

FX_INT64 FXSYS_wtoi64 ( FX_LPCWSTR  str)

Convert a wide string to an integer.

Parameters
[in]strA wide string.
Returns
An integer as converted result.

◆ FXWCHAR_GetDirection()

int FXWCHAR_GetDirection ( FX_WCHAR  wchar)

Get text direction.

Parameters
[in]wchar
Returns
Direction value. Please refer to values starting from ::FXWCHAR_LTR and it would be one of these values.

◆ FXWCHAR_GetLower()

FX_WCHAR FXWCHAR_GetLower ( FX_WCHAR  wchar)

Convert to lower-case letter.

Parameters
[in]wcharA unicode character.
Returns
The lower-case letter.

◆ FXWCHAR_GetUpper()

FX_WCHAR FXWCHAR_GetUpper ( FX_WCHAR  wchar)

Convert to upper-case letter.

Parameters
[in]wcharA unicode character.
Returns
The upper-case letter.

◆ FXWCHAR_IsSpace()

FX_BOOL FXWCHAR_IsSpace ( FX_WCHAR  wchar)

Check if the unicode is space.

Parameters
[in]wcharA unicode character.
Returns
true means the input unicode character is space, and false means the input unicode character is not space.

◆ FXWCHAR_IsWordBreak()

FX_BOOL FXWCHAR_IsWordBreak ( FX_WCHAR  wchar)

Check if the unicode can break a word.

Parameters
[in]wcharA unicode character.
Returns
true means the input unicode character can break a word, and false means the input unicode character cannot break a word.

◆ GetAt() [1/4]

FX_BYTE CFX_ByteStringC::GetAt ( FX_STRSIZE  index) const
inline

This method retrieves a single byte specified by an index number.

Parameters
[in]indexSpecifies the zero-based index in the byte string.
Returns
A single byte.

◆ GetAt() [2/4]

FX_WCHAR CFX_WideStringC::GetAt ( FX_STRSIZE  index) const
inline

Retrieves a single byte specified by an index number.

Parameters
[in]indexSpecifies the zero-based index in the byte string.
Returns
A single byte.

◆ GetAt() [3/4]

FX_BYTE CFX_ByteString::GetAt ( FX_STRSIZE  nIndex) const
inline

Get a single byte specified by an index number.

Parameters
[in]nIndexSpecifies the zero-based index in the byte string.
Returns
A single byte.

◆ GetAt() [4/4]

FX_WCHAR CFX_WideString::GetAt ( FX_STRSIZE  nIndex) const
inline

Retrieves a single wide character specified by an index number.

Parameters
[in]nIndexSpecifies the zero-based index in the wide string.
Returns
A single wide character.

◆ GetBlockBuffer()

virtual FX_LPCBYTE IFX_BufferRead::GetBlockBuffer ( )
pure virtual

Get internal buffer of block data.

Returns
The internal buffer.

◆ GetBlockOffset()

virtual FX_INT64 IFX_BufferRead::GetBlockOffset ( )
pure virtual

Get the offset of data in internal buffer.

This offset starts from the beginning of stream.

Returns
The offset of data in internal buffer.

◆ GetBlockSize()

virtual size_t IFX_BufferRead::GetBlockSize ( )
pure virtual

Get the size of data in internal buffer.

Returns
Size of data in internal buffer.

◆ GetBuffer() [1/3]

virtual FX_LPBYTE IFX_MemoryStream::GetBuffer ( ) const
pure virtual

Get the current memory buffer.

Returns
The current memory buffer.
Note
If the current memory stream works under non-consecutive mode(there are more than one memory blocks), only the first block returns.

◆ GetBuffer() [2/3]

FX_LPSTR CFX_ByteString::GetBuffer ( FX_STRSIZE  len)

Get a buffer with specific number of bytes allocated.

The content of this string won't be affected by function CFX_ByteString::GetBuffer. Caller can modified the returned buffer, and should call function CFX_ByteString::ReleaseBuffer after modification done.

Parameters
[in]lenthe Length expected to get.
Returns
A character string pointer to the byte string.

◆ GetBuffer() [3/3]

FX_LPWSTR CFX_WideString::GetBuffer ( FX_STRSIZE  len)

Get a buffer with specific number of characters allocated.

Parameters
[in]lenthe Length expected to get.
Returns
A wide character string pointer to the wide string.

◆ GetCStr()

FX_LPCSTR CFX_ByteStringC::GetCStr ( ) const
inline

Get a constant character string pointer to the byte string.

Returns
A constant character string pointer to the byte string.

◆ GetFloat()

FX_FLOAT CFX_WideString::GetFloat ( ) const

Convert to other data type.

Returns
A floating point number.

◆ GetID() [1/2]

FX_DWORD CFX_ByteStringC::GetID ( FX_STRSIZE  start_pos = 0) const

Get a DWORD identifier of the string, from a particular position.

This DWORD can be used for quick comparison. Using MSB-first scheme. If the string does not have enough bytes, then zero will be used missing bytes.

Parameters
[in]start_posStart position in the constant byte string.
Returns
A DWORD identifier.
Note
For example:
CFX_ByteString str1("hello"), str2("hey");
FX_BOOL bCheck1 = str1.GetID() == FXBSTR_ID('h', 'e', 'l', 'l'); // returns TRUE
FX_BOOL bCheck2 = str2.GetID() == FXBSTR_ID('h', 'e', 'y', 0); // returns TRUE

◆ GetID() [2/2]

FX_DWORD CFX_ByteString::GetID ( FX_STRSIZE  start_pos = 0) const

Get a DWORD identifier of the string. See function CFX_ByteStringC::GetID for details.

Parameters
[in]start_posStart position in the constant byte string.
Returns
A FX_DWORD identifier.

◆ GetInteger()

int CFX_WideString::GetInteger ( ) const

Convert to other data type.

Returns
A decimal number.

◆ GetLength() [1/4]

FX_STRSIZE CFX_ByteStringC::GetLength ( ) const
inline

Get the length of the byte string.

Returns
The length of the byte string.

◆ GetLength() [2/4]

FX_STRSIZE CFX_ByteString::GetLength ( ) const
inline

Get number of bytes in the byte string (not counting any possible terminator).

Returns
The Length of the byte string.

◆ GetLength() [3/4]

FX_STRSIZE CFX_WideStringC::GetLength ( ) const
inline

Get the length of the byte string.

Returns
The length of the byte string.

◆ GetLength() [4/4]

FX_STRSIZE CFX_WideString::GetLength ( ) const
inline

Get number of characters, not bytes. Trailing zero not counted.

Returns
The number of characters.

◆ GetPath()

virtual void IFX_FileAccess::GetPath ( CFX_WideString wsPath)
pure virtual

Get current path string.

Parameters
[out]wsPathReceive current file path.
Returns
None.

◆ GetPosition() [1/6]

virtual FX_INT64 IFX_FileRead::GetPosition ( )
inlinevirtual

Get the current reading position in stream.

Returns
The current reading position in stream.

Implements IFX_StreamRead.

Reimplemented in IFX_ChunkFileStream, IFX_FileStream, and CFX_CachedFileRead.

◆ GetPosition() [2/6]

virtual FX_INT64 CFX_CachedFileRead::GetPosition ( )
virtual

Get the current reading position in stream.

Returns
The current reading position in stream.

Implements IFX_FileStream.

◆ GetPosition() [3/6]

virtual FX_INT64 IFX_StreamRead::GetPosition ( )
pure virtual

Get the current reading position in stream.

Returns
Current reading position.

Implemented in IFX_BufferRead, IFX_ChunkFileStream, IFX_FileStream, CFX_CachedFileRead, and IFX_FileRead.

◆ GetPosition() [4/6]

virtual FX_INT64 IFX_FileStream::GetPosition ( )
pure virtual

Get the current reading position in stream.

Returns
Current reading position.

Reimplemented from IFX_FileRead.

Implemented in IFX_ChunkFileStream, and CFX_CachedFileRead.

◆ GetPosition() [5/6]

virtual FX_INT64 IFX_ChunkFileStream::GetPosition ( )
pure virtual

Get the current reading position in stream.

Returns
Current reading position.

Implements IFX_FileStream.

◆ GetPosition() [6/6]

virtual FX_INT64 IFX_BufferRead::GetPosition ( )
pure virtual

Get the current reading position in stream.

Returns
Current reading position in stream.

Implements IFX_StreamRead.

◆ GetPtr() [1/3]

FX_LPCBYTE CFX_ByteStringC::GetPtr ( ) const
inline

Get a constant byte string pointer to the byte string.

Returns
A constant byte string pointer to the byte string.

◆ GetPtr() [2/3]

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.

◆ GetPtr() [3/3]

FX_LPCWSTR CFX_WideStringC::GetPtr ( ) const
inline

Get a constant wide string pointer to the wide string.

Returns
A constant wide string pointer to the wide string.

◆ GetSize() [1/6]

virtual FX_INT64 CFX_CachedFileRead::GetSize ( )
virtual

Get total size of the file.

Returns
File size, in bytes. Implementation can return 0 for any error.

Implements IFX_FileStream.

◆ GetSize() [2/6]

FX_STRSIZE CFX_StringBufBase::GetSize ( ) const
inline

Gets the length of the string.

Returns
The length of the string.

◆ GetSize() [3/6]

virtual FX_INT64 IFX_FileWrite::GetSize ( )
pure virtual

Get total size of the file.

Returns
File size, in bytes. Implementation can return 0 for any error.

Implemented in IFX_ChunkFileStream, IFX_FileStream, and CFX_CachedFileRead.

◆ GetSize() [4/6]

virtual FX_INT64 IFX_FileRead::GetSize ( )
pure virtual

Get total size of the file.

Returns
File size, in bytes. Implementation can return 0 for any error.

Implemented in IFX_ChunkFileStream, IFX_FileStream, and CFX_CachedFileRead.

◆ GetSize() [5/6]

virtual FX_INT64 IFX_FileStream::GetSize ( )
pure virtual

Get the current stream size, in bytes.

Returns
Current stream size, in bytes.

Implements IFX_FileWrite.

Implemented in IFX_ChunkFileStream, and CFX_CachedFileRead.

◆ GetSize() [6/6]

virtual FX_INT64 IFX_ChunkFileStream::GetSize ( )
pure virtual

Get the current stream size, in bytes.

Returns
Current stream size, in bytes.

Implements IFX_FileStream.

◆ 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.

◆ Init()

FX_BOOL CFX_CachedFileRead::Init ( FX_INT32  nChunkSize,
FX_INT32  nChunkCount,
FX_LPVOID  pBuffer,
IFX_Allocator pAllocator = 0 
)

Initialize the chunk size and chunk count.

Parameters
[in]nChunkSizeThe size of each chunk.
[in]nChunkCountThe total count of chunks.
[in]pBufferExternal buffer. NULL means cache is disabled.
[in]pAllocatorAllocator used in this class. NULL means to use default allocator. Default value: NULL.
Returns
true means success, while false means failure.

◆ Insert() [1/2]

FX_STRSIZE CFX_ByteString::Insert ( FX_STRSIZE  index,
FX_CHAR  ch 
)

Insert a character before specific position.

Parameters
[in]indexSpecifies the zero-based index in the byte string.
[in]chA single character.
Returns
The new length of the byte string.

◆ Insert() [2/2]

FX_STRSIZE CFX_WideString::Insert ( FX_STRSIZE  index,
FX_WCHAR  ch 
)

Insert a wide character before specific position.

Parameters
[in]indexSpecifies the zero-based index in the wide string.
[in]chA single wide character.
Returns
The new length of the wide string.

◆ IsConsecutive()

virtual FX_BOOL IFX_MemoryStream::IsConsecutive ( ) const
pure virtual

Determine whether the current mode is consecutive or not.

Returns
true means current mode is consecutive, while false means current mode is non-consecutive.

◆ IsEmpty() [1/4]

bool CFX_ByteStringC::IsEmpty ( ) const
inline

Check whether current string object is empty.

Returns
true means current string object is empty, while false means not.

◆ IsEmpty() [2/4]

bool CFX_ByteString::IsEmpty ( ) const
inline

Check whether current string object is empty.

Returns
true means current string object is empty, while false means not.

◆ IsEmpty() [3/4]

bool CFX_WideStringC::IsEmpty ( ) const
inline

Determines whether current string object is empty.

Returns
true means current string object is empty, while false means not.

◆ IsEmpty() [4/4]

FX_BOOL CFX_WideString::IsEmpty ( ) const
inline

Check whether current string object is empty.

Returns
true means current string object is empty, while false means not.

◆ IsEOF() [1/6]

virtual FX_BOOL IFX_FileRead::IsEOF ( )
inlinevirtual

Determine whether reach the end of stream.

Returns
true means reach the end of stream, and false means not yet.

Implements IFX_StreamRead.

Reimplemented in IFX_ChunkFileStream, IFX_FileStream, and CFX_CachedFileRead.

◆ IsEOF() [2/6]

virtual FX_BOOL CFX_CachedFileRead::IsEOF ( )
virtual

Determine whether reach the end of stream.

Returns
true means reach the end of stream, and false means not yet.

Implements IFX_FileStream.

◆ IsEOF() [3/6]

virtual FX_BOOL IFX_StreamRead::IsEOF ( )
pure virtual

Determine whether reach the end of stream.

Returns
true means reach the end of stream, and false means not yet.

Implemented in IFX_BufferRead, IFX_ChunkFileStream, IFX_FileStream, CFX_CachedFileRead, and IFX_FileRead.

◆ IsEOF() [4/6]

virtual FX_BOOL IFX_FileStream::IsEOF ( )
pure virtual

Determine whether reach the end of stream.

Returns
true means reach the end of stream, and false means not yet.

Reimplemented from IFX_FileRead.

Implemented in IFX_ChunkFileStream, and CFX_CachedFileRead.

◆ IsEOF() [5/6]

virtual FX_BOOL IFX_ChunkFileStream::IsEOF ( )
pure virtual

Determine whether reach the end of stream.

Returns
true means reach the end of stream, and false means not yet.

Implements IFX_FileStream.

◆ IsEOF() [6/6]

virtual FX_BOOL IFX_BufferRead::IsEOF ( )
pure virtual

Determine whether reach the end of stream.

Returns
true means reach the end of stream, and false means not yet.

Implements IFX_StreamRead.

◆ Left() [1/3]

CFX_ByteString CFX_ByteString::Left ( FX_STRSIZE  count) const

Extracts the first (leftmost) count bytes from this CFX_ByteString object as a sub-string.

Parameters
[in]countThe count of bytes expected to extract for the sub-string.
Returns
A CFX_ByteString sub-string.

◆ Left() [2/3]

CFX_WideStringC CFX_WideStringC::Left ( FX_STRSIZE  count) const
inline

Extracts the first (leftmost) count wide characters from this CFX_WideStringC object as a sub-string.

Parameters
[in]countThe count of wide characters expected to extract for the sub-string.
Returns
A CFX_WideStringC sub-string.

◆ Left() [3/3]

CFX_WideString CFX_WideString::Left ( FX_STRSIZE  count) const

Extracts the first (leftmost) count wide characters from this CFX_WideString object as a sub-string.

Parameters
[in]countThe count of wide characters expected to extract for the sub-string.
Returns
A CFX_WideString sub-string.

◆ Load()

void CFX_ByteString::Load ( FX_LPCBYTE  str,
FX_STRSIZE  len 
)

Load from a byte string.

Parameters
[in]strPointer to a constant byte string.
[in]lenThe length of the byte string.
Returns
None.

◆ LoadFromFile()

static CFX_ByteString CFX_ByteString::LoadFromFile ( FX_BSTR  file_path)
static

Load the whole content of a file.

Parameters
[in]file_pathThe file path.
Returns
A CFX_ByteString object.

◆ LockBuffer() [1/2]

FX_LPSTR CFX_ByteString::LockBuffer ( )

Lock and get the current string buffer, so the caller can modify the returned buffer.

Caller can modified the returned buffer, and should call function CFX_ByteString::ReleaseBuffer after modification done.

Returns
A character string pointer to the byte string.

◆ LockBuffer() [2/2]

FX_LPWSTR CFX_WideString::LockBuffer ( )

Lock and get the current string buffer, so the caller can modify the returned buffer. Caller can modified the returned buffer, and should call CFX_WideString::ReleaseBuffer after modification done.

Returns
A wide character string pointer to the wide string.

◆ MakeLower() [1/2]

void CFX_ByteString::MakeLower ( )

Change case of English letters to lower.

Returns
None.

◆ MakeLower() [2/2]

void CFX_WideString::MakeLower ( )

Change case of English letters to lower.

Returns
None.

◆ MakeUpper() [1/2]

void CFX_ByteString::MakeUpper ( )

Change case of English letters to upper.

Returns
None.

◆ MakeUpper() [2/2]

void CFX_WideString::MakeUpper ( )

Change case of English letters to upper.

Returns
None.

◆ Mid() [1/6]

CFX_ByteString CFX_ByteString::Mid ( FX_STRSIZE  first) const

Extracts a substring from this CFX_ByteString object, starting at position nFirst (zero-based) to last.

Parameters
[in]firstSpecifies the zero-based index of the starting position in this CFX_ByteString object.
Returns
A CFX_ByteString sub-string.

◆ Mid() [2/6]

CFX_WideString CFX_WideString::Mid ( FX_STRSIZE  first) const

Extracts a substring from this CFX_WideString object, starting at position nFirst (zero-based) to last.

Parameters
[in]firstSpecifies the zero-based index of the starting position in this CFX_WideString object.
Returns
A CFX_WideString sub-string.

◆ Mid() [3/6]

CFX_ByteString CFX_ByteString::Mid ( FX_STRSIZE  first,
FX_STRSIZE  count 
) const

Extracts a substring of count bytes from this CFX_ByteString object, starting at position nFirst (zero-based) to last.

Parameters
[in]firstSpecifies the zero-based index of the starting position in this CFX_ByteString object.
[in]countThe count of bytes expected to extract for the sub-string.
Returns
A CFX_ByteString sub-string.

◆ Mid() [4/6]

CFX_WideString CFX_WideString::Mid ( FX_STRSIZE  first,
FX_STRSIZE  count 
) const

Extracts a substring of count wide character from this CFX_WideString object, starting at position nFirst (zero-based) to last.

Parameters
[in]firstSpecifies the zero-based index of the starting position in this CFX_WideString object.
[in]countThe count of wide characters expected to extract for the sub-string.
Returns
A CFX_WideString sub-string.

◆ Mid() [5/6]

CFX_ByteStringC CFX_ByteStringC::Mid ( FX_STRSIZE  index,
FX_STRSIZE  count = -1 
) const
inline

This method extracts a substring of length count bytes from this CFX_ByteStringC object, starting at position index (zero-based).

Parameters
[in]indexSpecifies the zero-based index in the CFX_ByteStringC object.
[in]countSpecifies the number of bytes to extract from this CFX_ByteStringC object.
Returns
A CFX_ByteStringC object refer to the substring.

◆ Mid() [6/6]

CFX_WideStringC CFX_WideStringC::Mid ( FX_STRSIZE  index,
FX_STRSIZE  count = -1 
) const
inline

Extracts a substring of length count bytes from this CFX_WideStringC object, starting at position index (zero-based).

Parameters
[in]indexSpecifies the zero-based index in the CFX_WideStringC object.
[in]countSpecifies the number of bytes to extract from this CFX_WideStringC object.
Returns
A CFX_WideStringC object refer to the substring.

◆ operator FX_LPCBYTE()

CFX_ByteStringC::operator FX_LPCBYTE ( ) const
inline

This casting operator accesses the byte string referred in a CFX_ByteStringC object.

Returns
A byte string pointer to the data in the string.
Note
A CFX_ByteStringC cannot be implicitly converted to a FX_LPCSTR pointer, because very likely the CFX_ByteStringC buffer is not null-terminated.

◆ operator!=() [1/10]

bool CFX_ByteString::operator!= ( const CFX_ByteString str) const
inline

Comparison(!=) operator overload. case-sensitive.

Parameters
[in]strThe null-terminated byte string to be compared.
Returns
true means not equal, while false means equal.

◆ operator!=() [2/10]

bool CFX_ByteStringC::operator!= ( const CFX_ByteStringC str) const
inline

Comparison(!=) operator overload. case-sensitive.

Parameters
[in]strconstant ref to a CFX_ByteStringC object.
Returns
true means not equal, while false means equal.

◆ operator!=() [3/10]

bool operator!= ( const CFX_WideString s1,
const CFX_WideString s2 
)

Comparison(!=) operator overload. Case-sensitive.

Parameters
[in]s1The first wide string.
[in]s2The second wide string.
Returns
true means not equal, while false means equal.

◆ operator!=() [4/10]

bool operator!= ( const CFX_WideString s1,
const CFX_WideStringC s2 
)

Comparison(!=) operator overload. Case-sensitive.

Parameters
[in]s1The first wide string.
[in]s2The second wide string.
Returns
true means not equal, while false means equal.

◆ operator!=() [5/10]

bool operator!= ( const CFX_WideString s1,
FX_LPCWSTR  s2 
)

Comparison(!=) operator overload. Case-sensitive.

Parameters
[in]s1The first wide string.
[in]s2The second wide character string.
Returns
true means not equal, while false means equal.

◆ operator!=() [6/10]

bool operator!= ( const CFX_WideStringC s1,
const CFX_WideString s2 
)

Comparison(!=) operator overload. Case-sensitive.

Parameters
[in]s1The first wide string.
[in]s2The second wide string.
Returns
true means not equal, while false means equal.

◆ operator!=() [7/10]

bool CFX_WideStringC::operator!= ( const CFX_WideStringC str) const
inline

Comparison(!=) operator overload. Case-sensitive.

Parameters
[in]strconstant ref to a CFX_WideStringC object.
Returns
true means not equal, while false means equal.

◆ operator!=() [8/10]

bool CFX_ByteString::operator!= ( FX_BSTR  str) const
inline

Comparison(!=) operator overload. case-sensitive.

Parameters
[in]strThe null-terminated constant byte string to be compared.
Returns
true means not equal, while false means equal.

◆ operator!=() [9/10]

bool CFX_ByteString::operator!= ( FX_LPCSTR  str) const
inline

Comparison(!=) operator overload. case-sensitive.

Parameters
[in]strThe null-terminated character string to be compared.
Returns
true means not equal, while false means equal.

◆ operator!=() [10/10]

bool operator!= ( FX_LPCWSTR  s1,
const CFX_WideString s2 
)

Comparison(!=) operator overload. Case-sensitive.

Parameters
[in]s1The first wide character string.
[in]s2The second wide string.
Returns
true means not equal, while false means equal.

◆ operator+() [1/24]

CFX_ByteString operator+ ( const CFX_ByteString str1,
const CFX_ByteString str2 
)
inline

Concatenate a buffered byte string and a buffered byte string.

Parameters
[in]str1A buffered byte string.
[in]str2A buffered byte string.
Returns
A CFX_ByteString object.

◆ operator+() [2/24]

CFX_ByteString operator+ ( const CFX_ByteString str1,
FX_BSTR  str2 
)
inline

Concatenate a buffered byte string and a non-buffered byte string.

Parameters
[in]str1A buffered byte string.
[in]str2A non-buffered byte string.
Returns
A CFX_ByteString object.

◆ operator+() [3/24]

CFX_ByteString operator+ ( const CFX_ByteString str1,
FX_CHAR  ch 
)
inline

Concatenate a buffered byte string and a single character or byte.

Parameters
[in]str1A buffered byte string.
[in]chA single character or byte.
Returns
A CFX_ByteString object.

◆ operator+() [4/24]

CFX_ByteString operator+ ( const CFX_ByteString str1,
FX_LPCSTR  str2 
)
inline

Concatenate a buffered byte string and a zero-terminated C-style string.

Parameters
[in]str1A buffered byte string.
[in]str2A zero-terminated C-style string.
Returns
A CFX_ByteString object.

◆ operator+() [5/24]

CFX_WideString operator+ ( const CFX_WideString str1,
const CFX_WideString str2 
)
inline

Concatenate a buffered byte string and a buffered byte string.

Parameters
[in]str1A buffered wide string.
[in]str2A buffered wide string.
Returns
A CFX_WideString object.

◆ operator+() [6/24]

CFX_WideString operator+ ( const CFX_WideString str1,
const CFX_WideStringC str2 
)
inline

Concatenate a buffered byte string and a non-buffered byte string.

Parameters
[in]str1A buffered wide string.
[in]str2A non-buffered wide string.
Returns
A CFX_WideString object.

◆ operator+() [7/24]

CFX_WideString operator+ ( const CFX_WideString str1,
FX_LPCWSTR  str2 
)
inline

Concatenate a buffered wide string and a zero-terminated C-style string.

Parameters
[in]str1A buffered wide string.
[in]str2A zero-terminated C-style string.
Returns
A CFX_WideString object.

◆ operator+() [8/24]

CFX_WideString operator+ ( const CFX_WideString str1,
FX_WCHAR  ch 
)
inline

Concatenate a buffered byte string and a single character or byte.

Parameters
[in]str1A buffered wide string.
[in]chA single character.
Returns
A CFX_WideString object.

◆ operator+() [9/24]

CFX_WideString operator+ ( const CFX_WideStringC str1,
const CFX_WideString str2 
)
inline

Concatenate a non-buffered byte string and a buffered byte string.

Parameters
[in]str1A non-buffered wide string.
[in]str2A buffered wide string.
Returns
A CFX_WideString object.

◆ operator+() [10/24]

CFX_WideString operator+ ( const CFX_WideStringC str1,
const CFX_WideStringC str2 
)
inline

Concatenate a non-buffered wide string and a non-buffered wide string.

Parameters
[in]str1A non-buffered wide string.
[in]str2A non-buffered wide string.
Returns
A CFX_WideString object.

◆ operator+() [11/24]

CFX_WideString operator+ ( const CFX_WideStringC str1,
FX_LPCWSTR  str2 
)
inline

Concatenate a non-buffered byte string and a zero-terminated C-style string.

Parameters
[in]str1A non-buffered wide string.
[in]str2A zero-terminated C-style string.
Returns
A CFX_WideString object.

◆ operator+() [12/24]

CFX_WideString operator+ ( const CFX_WideStringC str1,
FX_WCHAR  ch 
)
inline

Concatenate a non-buffered byte string and a single character or byte.

Parameters
[in]str1A non-buffered wide string.
[in]chA single character.
Returns
A CFX_WideString object.

◆ operator+() [13/24]

CFX_ByteString operator+ ( FX_BSTR  str1,
const CFX_ByteString str2 
)
inline

Concatenate a non-buffered byte string and a buffered byte string.

Parameters
[in]str1A non-buffered byte string.
[in]str2A buffered byte string.
Returns
A CFX_ByteString object.

◆ operator+() [14/24]

CFX_ByteString operator+ ( FX_BSTR  str1,
FX_BSTR  str2 
)
inline

Concatenate a non-buffered byte string and a non-buffered byte string.

Parameters
[in]str1A non-buffered byte string.
[in]str2A non-buffered byte string.
Returns
A CFX_ByteString object.

◆ operator+() [15/24]

CFX_ByteString operator+ ( FX_BSTR  str1,
FX_CHAR  ch 
)
inline

Concatenate a non-buffered byte string and a single character or byte.

Parameters
[in]str1A non-buffered byte string.
[in]chA single character or byte.
Returns
A CFX_ByteString object.

◆ operator+() [16/24]

CFX_ByteString operator+ ( FX_BSTR  str1,
FX_LPCSTR  str2 
)
inline

Concatenate a non-buffered byte string and a zero-terminated C-style string.

Parameters
[in]str1A non-buffered byte string.
[in]str2A zero-terminated C-style string.
Returns
A CFX_ByteString object.

◆ operator+() [17/24]

CFX_ByteString operator+ ( FX_CHAR  ch,
const CFX_ByteString str2 
)
inline

Concatenate a single character or byte and a buffered byte string.

Parameters
[in]chA single character or byte.
[in]str2A buffered byte string.
Returns
A CFX_ByteString object.

◆ operator+() [18/24]

CFX_ByteString operator+ ( FX_CHAR  ch,
FX_BSTR  str2 
)
inline

Concatenate a single character or byte and a non-buffered byte string.

Parameters
[in]chA single character or byte.
[in]str2A non-buffered byte string.
Returns
A CFX_ByteString object.

◆ operator+() [19/24]

CFX_ByteString operator+ ( FX_LPCSTR  str1,
const CFX_ByteString str2 
)
inline

Concatenate a zero-terminated C-style string and a buffered byte string.

Parameters
[in]str1A zero-terminated C-style string.
[in]str2A buffered byte string.
Returns
A CFX_ByteString object.

◆ operator+() [20/24]

CFX_ByteString operator+ ( FX_LPCSTR  str1,
FX_BSTR  str2 
)
inline

Concatenate a zero-terminated C-style string and a non-buffered byte string.

Parameters
[in]str1A zero-terminated C-style string.
[in]str2A non-buffered byte string.
Returns
A CFX_ByteString object.

◆ operator+() [21/24]

CFX_WideString operator+ ( FX_LPCWSTR  str1,
const CFX_WideString str2 
)
inline

Concatenate a zero-terminated C-style string and a buffered byte string.

Parameters
[in]str1A zero-terminated C-style string.
[in]str2A buffered wide string.
Returns
A CFX_ByteString object.

◆ operator+() [22/24]

CFX_WideString operator+ ( FX_LPCWSTR  str1,
const CFX_WideStringC str2 
)
inline

Concatenate a zero-terminated C-style string and a non-buffered byte string.

Parameters
[in]str1A zero-terminated C-style string.
[in]str2A non-buffered wide string.
Returns
A CFX_WideString object.

◆ operator+() [23/24]

CFX_WideString operator+ ( FX_WCHAR  ch,
const CFX_WideString str2 
)
inline

Concatenate a single character or byte and a buffered byte string.

Parameters
[in]chA single character.
[in]str2A buffered wide string.
Returns
A CFX_WideString object.

◆ operator+() [24/24]

CFX_WideString operator+ ( FX_WCHAR  ch,
const CFX_WideStringC str2 
)
inline

Concatenate a single character or byte and a non-buffered byte string.

Parameters
[in]chA single character.
[in]str2A non-buffered wide string.
Returns
A CFX_WideString object.

◆ operator+=() [1/8]

const CFX_ByteString& CFX_ByteString::operator+= ( const CFX_ByteString str)

Concatenation(+=) operator overload. Concatenate a CFX_ByteString object.

Parameters
[in]strA ref to a constant CFX_ByteString object.
Returns
A reference to current object itself.

◆ operator+=() [2/8]

const CFX_WideString& CFX_WideString::operator+= ( const CFX_WideString str)

Concatenation(+=) operator overload. Concatenate a wide string.

Parameters
[in]strThe input wide string.
Returns
A reference to current object itself.

◆ operator+=() [3/8]

const CFX_WideString& CFX_WideString::operator+= ( const CFX_WideStringC str)

Concatenation(+=) operator overload. Concatenate a constant wide string.

Parameters
[in]strThe input wide string.
Returns
A reference to current object itself.

◆ operator+=() [4/8]

const CFX_ByteString& CFX_ByteString::operator+= ( FX_BSTR  bstrc)

Concatenation(+=) operator overload. Concatenate a constant CFX_ByteStringC object.

Parameters
[in]bstrcA ref to a constant CFX_ByteStringC object.
Returns
A reference to current object itself.

◆ operator+=() [5/8]

const CFX_ByteString& CFX_ByteString::operator+= ( FX_CHAR  ch)

Concatenation(+=) operator overload. Concatenate a single character.

Parameters
[in]chA single character.
Returns
A reference to current object itself.

◆ operator+=() [6/8]

const CFX_ByteString& CFX_ByteString::operator+= ( FX_LPCSTR  str)

Concatenation(+=) operator overload. Concatenate a null-terminated character string.

Parameters
[in]strPointer to a constant null-terminated character string.
Returns
A reference to current object itself.

◆ operator+=() [7/8]

const CFX_WideString& CFX_WideString::operator+= ( FX_LPCWSTR  str)

Concatenation(+=) operator overload. Concatenate a wide character string.

Parameters
[in]strThe wide character string.
Returns
A reference to current object itself.

◆ operator+=() [8/8]

const CFX_WideString& CFX_WideString::operator+= ( FX_WCHAR  ch)

Concatenation(+=) operator overload. Concatenate a single wide character.

Parameters
[in]chThe single wide character.
Returns
A reference to current object itself.

◆ operator<() [1/2]

bool CFX_ByteString::operator< ( const CFX_ByteString rhs) const

Comparison(<) operator overload. case-sensitive.

Parameters
[in]rhsThe right hand side string.
Returns
true means current string is smaller than parameter rhs, while false means not.

◆ operator<() [2/2]

bool operator< ( const CFX_WideString lhs,
const CFX_WideString rhs 
)

Comparison(<) operator overload. Case-sensitive.

Parameters
[in]lhsThe left hand side wide string.
[in]rhsThe right hand side wide string.
Returns
true means lhs is smaller than rhs, while false means lhs is not smaller than rhs.

◆ operator=() [1/13]

const CFX_ByteString& CFX_ByteString::operator= ( const CFX_BinaryBuf buf)

Assignment(=) operator overload. From a CFX_BinaryBuf object.

Parameters
[in]bufA ref to a constant CFX_BinaryBuf object.
Returns
A reference to current object itself.

◆ operator=() [2/13]

CFX_ByteStringC & CFX_ByteStringC::operator= ( const CFX_ByteString src)
inline

Assignment(=) operator overload. From a CFX_ByteString object.

Parameters
[in]srcconstant ref to a CFX_ByteString object.
Returns
A reference to current object itself.

◆ operator=() [3/13]

const CFX_ByteString& CFX_ByteString::operator= ( const CFX_ByteString stringSrc)

Assignment(=) operator overload. From a CFX_ByteString object.

Parameters
[in]stringSrcA ref to a constant CFX_ByteString object.
Returns
A reference to current object itself.

◆ operator=() [4/13]

CFX_ByteStringC& CFX_ByteStringC::operator= ( const CFX_ByteStringC src)
inline

Assignment(=) operator overload. From a CFX_ByteStringC object.

Parameters
[in]srcconstant ref to a CFX_ByteStringC object.
Returns
A reference to current object itself.

◆ operator=() [5/13]

CFX_WideStringC & CFX_WideStringC::operator= ( const CFX_WideString src)
inline

Assignment(=) operator overload. From a CFX_ByteString object.

Parameters
[in]srcconstant ref to a CFX_ByteString object.
Returns
A reference to current object itself.

◆ operator=() [6/13]

const CFX_WideString& CFX_WideString::operator= ( const CFX_WideString stringSrc)

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

Parameters
[in]stringSrcThe Input wide string.
Returns
A reference to current object itself.

◆ operator=() [7/13]

CFX_WideStringC& CFX_WideStringC::operator= ( const CFX_WideStringC src)
inline

Assignment(=) operator overload. From a CFX_WideStringC object.

Parameters
[in]srcconstant ref to a CFX_ByteStringC object.
Returns
A reference to current object itself.

◆ operator=() [8/13]

const CFX_WideString& CFX_WideString::operator= ( const CFX_WideStringC stringSrc)

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

Parameters
[in]stringSrcThe Input wide string.
Returns
A reference to current object itself.

◆ operator=() [9/13]

const CFX_ByteString& CFX_ByteString::operator= ( FX_BSTR  bstrc)

Assignment(=) operator overload. From a constant byte string.

Parameters
[in]bstrcA ref to a constant byte string.
Returns
A reference to current object itself.

◆ operator=() [10/13]

CFX_ByteStringC& CFX_ByteStringC::operator= ( FX_LPCSTR  src)
inline

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

Parameters
[in]srcPointer to a constant character string.
Returns
A reference to current object itself.

◆ operator=() [11/13]

const CFX_ByteString& CFX_ByteString::operator= ( FX_LPCSTR  str)

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

Parameters
[in]strA pointer to a constant character string.
Returns
A reference to current object itself.

◆ operator=() [12/13]

CFX_WideStringC& CFX_WideStringC::operator= ( FX_LPCWSTR  src)
inline

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

Parameters
[in]srcPointer to a constant character string.
Returns
A reference to current object itself.

◆ operator=() [13/13]

const CFX_WideString& CFX_WideString::operator= ( FX_LPCWSTR  str)

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

Parameters
[in]strThe wide character string.
Returns
A reference to current object itself.

◆ operator==() [1/10]

bool CFX_ByteString::operator== ( const CFX_ByteString str) const

Comparison(==) operator overload. case-sensitive.

Parameters
[in]strThe null-terminated byte string to be compared.
Returns
true means equal, while false means not equal.

◆ operator==() [2/10]

bool CFX_ByteStringC::operator== ( const CFX_ByteStringC str) const
inline

Comparison(==) operator overload. case-sensitive.

Parameters
[in]strconstant ref to a CFX_ByteStringC object.
Returns
true means equal, while false means not equal.

◆ operator==() [3/10]

bool operator== ( const CFX_WideString s1,
const CFX_WideString s2 
)

Comparison(==) operator overload. Case-sensitive.

Parameters
[in]s1The first wide string.
[in]s2The second wide string.
Returns
true means equal, while false means not equal.

◆ operator==() [4/10]

bool operator== ( const CFX_WideString s1,
const CFX_WideStringC s2 
)

Comparison(==) operator overload. Case-sensitive.

Parameters
[in]s1The first wide string.
[in]s2The second wide string.
Returns
true means equal, while false means not equal.

◆ operator==() [5/10]

bool operator== ( const CFX_WideString s1,
FX_LPCWSTR  s2 
)

Comparison(==) operator overload. Case-sensitive.

Parameters
[in]s1The first wide string.
[in]s2The second wide character string.
Returns
true means equal, while false means not equal.

◆ operator==() [6/10]

bool operator== ( const CFX_WideStringC s1,
const CFX_WideString s2 
)

Comparison(==) operator overload. Case-sensitive.

Parameters
[in]s1The first wide string.
[in]s2The second wide string.
Returns
true means equal, while false means not equal.

◆ operator==() [7/10]

bool CFX_WideStringC::operator== ( const CFX_WideStringC str) const
inline

Comparison(==) operator overload. Case-sensitive.

Parameters
[in]strconstant ref to a CFX_ByteStringC object.
Returns
true means equal, while false means not equal.

◆ operator==() [8/10]

bool CFX_ByteString::operator== ( FX_BSTR  str) const
inline

Comparison(==) operator overload. case-sensitive.

Parameters
[in]strThe null-terminated constant byte string to be compared.
Returns
true means equal, while false means not equal.

◆ operator==() [9/10]

bool CFX_ByteString::operator== ( FX_LPCSTR  str) const
inline

Comparison(==) operator overload. case-sensitive.

Parameters
[in]strThe null-terminated character string to be compared.
Returns
true means equal, while false means not equal.

◆ operator==() [10/10]

bool operator== ( FX_LPCWSTR  s1,
const CFX_WideString s2 
)

Comparison(==) operator overload. Case-sensitive.

Parameters
[in]s1The first wide character string.
[in]s2The second wide string.
Returns
true means equal, while false means not equal.

◆ operator[]() [1/2]

FX_BYTE CFX_ByteString::operator[] ( FX_STRSIZE  nIndex) const
inline

Subscript([]) operator overload. It retrieves a single byte specified by the zero-based index in nIndex.

Parameters
[in]nIndexSpecifies the zero-based index in the byte string.
Returns
A single byte.

◆ operator[]() [2/2]

FX_WCHAR CFX_WideString::operator[] ( FX_STRSIZE  nIndex) const
inline

Subscript([]) operator overload. It retrieves a wide character specified by the zero-based index in nIndex.

Parameters
[in]nIndexSpecifies the zero-based index in the wide string.
Returns
A single wide character.

◆ PreCache()

FX_BOOL CFX_CachedFileRead::PreCache ( FX_INT64  offset,
FX_INT32  nCacheCount 
)

Attach a file read.

Parameters
[in]offsetThe file to be attached.
[in]nCacheCountTake over the file or not.
Returns
true means success, while false means failure.

◆ ReadBlock() [1/10]

virtual FX_BOOL CFX_CachedFileRead::ReadBlock ( void *  buffer,
FX_INT64  offset,
size_t  size 
)
virtual

Read a data block from the file.

Parameters
[in,out]bufferPointer to a buffer receiving read data
[in]offsetByte offset from beginning of the file
[in]sizeNumber of bytes for the block.
Returns
true means success, while false means failure.

Implements IFX_FileStream.

◆ ReadBlock() [2/10]

virtual FX_BOOL IFX_FileRead::ReadBlock ( void *  buffer,
FX_INT64  offset,
size_t  size 
)
pure virtual

Read a data block from the file.

Parameters
[in,out]bufferPointer to a buffer receiving read data
[in]offsetByte offset from beginning of the file
[in]sizeNumber of bytes for the block.
Returns
true means success, and false means failure.

Implemented in IFX_ChunkFileStream, IFX_FileStream, and CFX_CachedFileRead.

◆ ReadBlock() [3/10]

virtual FX_BOOL IFX_FileStream::ReadBlock ( void *  buffer,
FX_INT64  offset,
size_t  size 
)
pure virtual

Read a data block from stream.

Parameters
[in,out]bufferPointer to a buffer receiving data.
[in]offsetByte offset from beginning of the file, the position to read data.
[in]sizeNumber of bytes to be read from stream.
Returns
true means success, and false means failure.

Implements IFX_FileRead.

Implemented in IFX_ChunkFileStream, and CFX_CachedFileRead.

◆ ReadBlock() [4/10]

virtual FX_BOOL IFX_ChunkFileStream::ReadBlock ( void *  buffer,
FX_INT64  offset,
size_t  size 
)
pure virtual

Read a data block from stream.

Parameters
[in,out]bufferPointer to a buffer receiving data.
[in]offsetByte offset from beginning of the file, the position to read data.
[in]sizeNumber of bytes to be read from stream.
Returns
true means success, and false means failure.

Implements IFX_FileStream.

◆ ReadBlock() [5/10]

virtual size_t IFX_FileRead::ReadBlock ( void *  buffer,
size_t  size 
)
inlinevirtual

Read data block from stream.

Parameters
[in,out]bufferBuffer to store data.
[in]sizeTotal size of buffer, in bytes.
Returns
The length of data stored in buffer. If returns 0, that means error or no data.

Implements IFX_StreamRead.

Reimplemented in IFX_ChunkFileStream, IFX_FileStream, and CFX_CachedFileRead.

◆ ReadBlock() [6/10]

virtual size_t CFX_CachedFileRead::ReadBlock ( void *  buffer,
size_t  size 
)
virtual

Read data block from stream.

Parameters
[in,out]bufferBuffer to store data.
[in]sizeTotal size of buffer, in bytes.
Returns
The length of data stored in buffer. 0 means error or no data.

Implements IFX_FileStream.

◆ ReadBlock() [7/10]

virtual size_t IFX_StreamRead::ReadBlock ( void *  buffer,
size_t  size 
)
pure virtual

Read data block from sequential stream.

Parameters
[in,out]bufferBuffer to store data.
[in]sizeTotal size of buffer, in bytes.
Returns
The length of data stored in buffer. If returns 0, means error or no data.

Implemented in IFX_BufferRead, IFX_ChunkFileStream, IFX_FileStream, CFX_CachedFileRead, and IFX_FileRead.

◆ ReadBlock() [8/10]

virtual size_t IFX_FileStream::ReadBlock ( void *  buffer,
size_t  size 
)
pure virtual

Read data block from stream.

Parameters
[in,out]bufferBuffer to store data.
[in]sizeTotal size of buffer, in bytes.
Returns
The length of data stored in buffer. If returns 0, means error or no data.

Reimplemented from IFX_FileRead.

Implemented in IFX_ChunkFileStream, and CFX_CachedFileRead.

◆ ReadBlock() [9/10]

virtual size_t IFX_ChunkFileStream::ReadBlock ( void *  buffer,
size_t  size 
)
pure virtual

Read data block from stream.

Parameters
[in,out]bufferBuffer to store data.
[in]sizeTotal size of buffer, in bytes.
Returns
The length of data stored in buffer. If returns 0, means error or no data.

Implements IFX_FileStream.

◆ ReadBlock() [10/10]

virtual size_t IFX_BufferRead::ReadBlock ( void *  buffer,
size_t  size 
)
pure virtual

Read data block from sequential stream.

Parameters
[in,out]bufferbuffer to store data.
[in]sizetotal size of buffer, in bytes.
Returns
The length of data stored in buffer. 0 means error or no data.

Implements IFX_StreamRead.

◆ ReadNextBlock()

virtual FX_BOOL IFX_BufferRead::ReadNextBlock ( FX_BOOL  bRestart = false)
pure virtual

Read the next block in sequential stream.

Parameters
[in]bRestartIndicates to read data from the beginning of stream. Default value: false.
Returns
true means success, and false means failure.

◆ Release() [1/7]

virtual void CFX_CachedFileRead::Release ( )
protectedvirtual

Destroy the current instance.

Returns
None.

Implements IFX_FileStream.

◆ Release() [2/7]

virtual void IFX_StreamRead::Release ( )
pure virtual

Called when to release everything.

Returns
None.

Implemented in IFX_BufferRead, IFX_ChunkFileStream, IFX_FileStream, IFX_FileRead, and CFX_CachedFileRead.

◆ Release() [3/7]

virtual void IFX_FileRead::Release ( )
pure virtual

Called when to release everything.

Returns
None.

Implements IFX_StreamRead.

Implemented in IFX_ChunkFileStream, IFX_FileStream, and CFX_CachedFileRead.

◆ Release() [4/7]

virtual void IFX_FileStream::Release ( )
pure virtual

Destroy the current instance.

Returns
None.

Implements IFX_FileWrite.

Implemented in IFX_ChunkFileStream, and CFX_CachedFileRead.

◆ Release() [5/7]

virtual void IFX_ChunkFileStream::Release ( )
pure virtual

Destroy the current instance.

Returns
None.

Implements IFX_FileStream.

◆ Release() [6/7]

virtual void IFX_FileAccess::Release ( )
pure virtual

Destroy the current instance.

Returns
None.

◆ Release() [7/7]

virtual void IFX_BufferRead::Release ( )
pure virtual

Called when to release the current instance.

Returns
None.

Implements IFX_StreamRead.

◆ ReleaseBuffer() [1/2]

void CFX_ByteString::ReleaseBuffer ( FX_STRSIZE  len = -1)

Release the buffer fetched by function CFX_ByteString::GetBuffer or CFX_ByteString::LockBuffer, and set the length of modified string.

If parameter len parameter is -1, then it's assumed to be a zero-terminated string.

Parameters
[in]lenLength expected to release to. Default value: -1.
Returns
None.

◆ ReleaseBuffer() [2/2]

void CFX_WideString::ReleaseBuffer ( FX_STRSIZE  len = -1)

Release the buffer fetched by function CFX_WideString::GetBuffer or CFX_WideString::LockBuffer, and set the length of modified string.

Parameters
[in]lenLength expected to release to. -1 means that current string is assumed to be a zero-terminated string.
Returns
None.

◆ Remove() [1/2]

FX_STRSIZE CFX_ByteString::Remove ( FX_CHAR  ch)

Remove all occurrence of a particular character.

Parameters
[in]chSpecified the character to be removed.
Returns
The number of characters removed.

◆ Remove() [2/2]

FX_STRSIZE CFX_WideString::Remove ( FX_WCHAR  ch)

Remove all occurrence of a particular character.

Parameters
[in]chSpecified the character to be removed.
Returns
The number of characters removed.

◆ Replace() [1/2]

FX_STRSIZE CFX_ByteString::Replace ( FX_BSTR  lpszOld,
FX_BSTR  lpszNew 
)

Replace all patterns in the string with a new sub-string.

Parameters
[in]lpszOldSpecified the string to be matched and replaced in the byte string.
[in]lpszNewSpecified the string to replace.
Returns
The number of replaced patterns.

◆ Replace() [2/2]

FX_STRSIZE CFX_WideString::Replace ( FX_LPCWSTR  lpszOld,
FX_LPCWSTR  lpszNew 
)

Replace all patterns in the string with a new sub-string.

Parameters
[in]lpszOldSpecified the string to be matched and replaced in the wide string.
[in]lpszNewSpecified the string to replace.
Returns
The number of replaced patterns.

◆ Reserve() [1/2]

void CFX_ByteString::Reserve ( FX_STRSIZE  len)

Reserve a buffer that can hold specific number of bytes.

The content of this string won't be changed. This can be used if application anticipates the string may grow many times, in this case, reserving a larger buffer will support string growth without buffer reallocation.

Parameters
[in]lenLength expected to reserve.
Returns
None.

◆ Reserve() [2/2]

void CFX_WideString::Reserve ( FX_STRSIZE  len)

Reserve a buffer that can hold specific number of characters.

Parameters
[in]lenthe Length expected to reserve.
Returns
None.
See also
CFX_ByteString::Reserve(FX_STRSIZE)

◆ Retain() [1/4]

virtual IFX_FileStream* CFX_CachedFileRead::Retain ( )
protectedvirtual

Create a shared instance.

Returns
File stream interface.

Implements IFX_FileStream.

◆ Retain() [2/4]

virtual IFX_FileStream* IFX_FileStream::Retain ( )
pure virtual

Create a shared instance.

Returns
File stream interface.

Implemented in IFX_ChunkFileStream, and CFX_CachedFileRead.

◆ Retain() [3/4]

virtual IFX_FileStream* IFX_ChunkFileStream::Retain ( )
protectedpure virtual

Create a shared instance.

Returns
File stream interface.

Implements IFX_FileStream.

◆ Retain() [4/4]

virtual IFX_FileAccess* IFX_FileAccess::Retain ( )
pure virtual

Create a shared instance.

Returns
A shared instance of current object.

◆ ReverseFind()

FX_STRSIZE CFX_ByteString::ReverseFind ( FX_CHAR  ch) const

Find a character from end of the string.

Parameters
[in]chA character to be found in curren string, from the end.
Returns
The position of input character in current string. -1 means Not found.

◆ Right() [1/3]

CFX_ByteString CFX_ByteString::Right ( FX_STRSIZE  count) const

Extracts the last (rightmost) count bytes from this CFX_ByteString object as a sub-string.

Parameters
[in]countThe count of bytes expected to extract for the sub-string.
Returns
A CFX_ByteString sub-string.

◆ Right() [2/3]

CFX_WideStringC CFX_WideStringC::Right ( FX_STRSIZE  count) const
inline

Extracts the last (rightmost) count wide characters from this CFX_WideStringC object as a sub-string.

Parameters
[in]countThe count of wide characters expected to extract for the sub-string.
Returns
A CFX_WideStringC sub-string.

◆ Right() [3/3]

CFX_WideString CFX_WideString::Right ( FX_STRSIZE  count) const

Extracts the last (rightmost) count wide characters from this CFX_WideString object as a sub-string.

Parameters
[in]countThe count of wide characters expected to extract for the sub-string.
Returns
A CFX_WideString sub-string.

◆ SetAt() [1/2]

void CFX_ByteString::SetAt ( FX_STRSIZE  nIndex,
FX_CHAR  ch 
)

Overwrites a single byte specified by an index number.

Parameters
[in]nIndexSpecifies the zero-based index in the byte string.
[in]chA single character.
Returns
None.

◆ SetAt() [2/2]

void CFX_WideString::SetAt ( FX_STRSIZE  nIndex,
FX_WCHAR  ch 
)

Overwrites a single wide character specified by an index number.

Parameters
[in]nIndexSpecifies the zero-based index in the wide string.
[in]chA single wide character.
Returns
None.

◆ SetPosition() [1/2]

virtual FX_INT64 IFX_StreamRead::SetPosition ( FX_INT64  pos)
inlinevirtual

Set the current file accessing position.

Parameters
[in]posThe new accessing position.
Returns
The current file accessing position from the beginning of file. Default value:-1, means Unsupport.

Reimplemented in IFX_FileRead.

◆ SetPosition() [2/2]

virtual FX_INT64 IFX_FileRead::SetPosition ( FX_INT64  pos)
inlinevirtual

Set the current file accessing position.

Parameters
[in]posThe new accessing position.
Returns
The current file accessing position from the beginning of file. Default value:-1, means Unsupport.

Reimplemented from IFX_StreamRead.

◆ SetRange()

virtual FX_BOOL IFX_FileRead::SetRange ( FX_INT64  offset,
FX_INT64  size 
)
inlinevirtual

Set accessing range.

Parameters
[in]offset
[in]size
Returns
true means success, and false means failure.

◆ TrimLeft() [1/6]

void CFX_ByteString::TrimLeft ( )

Trim white spaces from the left side of the byte string.

Returns
None.

◆ TrimLeft() [2/6]

void CFX_WideString::TrimLeft ( )

Trim white spaces from the left side of the wide string.

Returns
None.

◆ TrimLeft() [3/6]

void CFX_ByteString::TrimLeft ( FX_BSTR  lpszTargets)

Trim continuous occurrences of specified characters from left side of the byte string.

Parameters
[in]lpszTargetsThe specified characters.
Returns
None.

◆ TrimLeft() [4/6]

void CFX_ByteString::TrimLeft ( FX_CHAR  chTarget)

Trim continuous occurrences of specified characters from left side of the byte string.

Parameters
[in]chTargetThe specified character.
Returns
None.

◆ TrimLeft() [5/6]

void CFX_WideString::TrimLeft ( FX_LPCWSTR  lpszTargets)

Trim continuous occurrences of specified characters from left side of the wide string.

Parameters
[in]lpszTargetsThe specified characters.
Returns
None.

◆ TrimLeft() [6/6]

void CFX_WideString::TrimLeft ( FX_WCHAR  chTarget)

Trim continuous occurrences of specified character from left side of the wide string.

Parameters
[in]chTargetThe specified character.
Returns
None.

◆ TrimRight() [1/6]

void CFX_ByteString::TrimRight ( )

Trim white spaces from the right side of the byte string.

Returns
None.

◆ TrimRight() [2/6]

void CFX_WideString::TrimRight ( )

Trim white spaces from the right side of the wide string.

Returns
None.

◆ TrimRight() [3/6]

void CFX_ByteString::TrimRight ( FX_BSTR  lpszTargets)

Trim continuous occurrences of specified characters from right side of the byte string.

Parameters
[in]lpszTargetsThe specified characters.
Returns
None.

◆ TrimRight() [4/6]

void CFX_ByteString::TrimRight ( FX_CHAR  chTarget)

Trim continuous occurrences of specified character from right side of the byte string.

Parameters
[in]chTargetThe specified character.
Returns
None.

◆ TrimRight() [5/6]

void CFX_WideString::TrimRight ( FX_LPCWSTR  lpszTargets)

Trim continuous occurrences of specified characters from right side of the wide string.

Parameters
[in]lpszTargetsThe specified characters.
Returns
None.

◆ TrimRight() [6/6]

void CFX_WideString::TrimRight ( FX_WCHAR  chTarget)

Trim continuous occurrences of specified character from right side of the wide string.

Parameters
[in]chTargetThe specified character.
Returns
None.

◆ UTF16LE_Encode()

CFX_ByteString CFX_WideString::UTF16LE_Encode ( FX_BOOL  bTerminate = true) const

Do UTF16LE encoding.

Parameters
[in]bTerminate
Returns
A byte string which represents UTF-16LE encoded memory block.

◆ UTF8Decode()

CFX_WideString CFX_ByteString::UTF8Decode ( ) const

Decode a UTF-8 unicode string (assume this byte string is UTF-8 encoded).

Returns
A unicode string.

◆ UTF8Encode()

CFX_ByteString CFX_WideString::UTF8Encode ( ) const

Do UTF8 encoding.

Returns
A byte string.

◆ WriteBlock() [1/7]

virtual FX_BOOL IFX_FileStream::WriteBlock ( const void *  buffer,
FX_INT64  offset,
size_t  size 
)
pure virtual

Write a block data into stream.

Parameters
[in]bufferPointer to the data block.
[in]offsetByte offset from beginning of the file, the position to write data.
[in]sizeThe length in bytes of the buffer.
Returns
true means success, and false means failure.

Implements IFX_FileWrite.

Implemented in IFX_ChunkFileStream, and CFX_CachedFileRead.

◆ WriteBlock() [2/7]

virtual FX_BOOL IFX_ChunkFileStream::WriteBlock ( const void *  buffer,
FX_INT64  offset,
size_t  size 
)
pure virtual

Write a block data into stream.

Parameters
[in]bufferPointer to the data block.
[in]offsetByte offset from beginning of the file, the position to write data.
[in]sizeThe length in bytes of the buffer.
Returns
true means success, and false means failure.

Implements IFX_FileStream.

◆ WriteBlock() [3/7]

virtual FX_BOOL IFX_FileStream::WriteBlock ( const void *  buffer,
size_t  size 
)
inlinevirtual

Write a block data to the end of current stream.

Parameters
[in]bufferPointer to the data block.
[in]sizeThe length in bytes of the buffer.
Returns
true means success, and false means failure.

Reimplemented from IFX_FileWrite.

Reimplemented in IFX_ChunkFileStream.

◆ WriteBlock() [4/7]

virtual FX_BOOL IFX_ChunkFileStream::WriteBlock ( const void *  buffer,
size_t  size 
)
inlinevirtual

Write a block data to the end of current stream.

Parameters
[in]bufferPointer to the data block.
[in]sizeThe length in bytes of the buffer.
Returns
true means success, and false means failure.

Reimplemented from IFX_FileStream.

◆ WriteBlock() [5/7]

virtual FX_BOOL IFX_FileWrite::WriteBlock ( const void *  pData,
FX_INT64  offset,
size_t  size 
)
pure virtual

Write a block data.

Parameters
[in]pDataThe block data.
[in]offsetByte offset from beginning of the file
[in]sizeThe length in bytes of the block data.
Returns
true means success, while false means failure.

Implemented in IFX_ChunkFileStream, IFX_FileStream, and CFX_CachedFileRead.

◆ WriteBlock() [6/7]

virtual FX_BOOL IFX_FileWrite::WriteBlock ( const void *  pData,
size_t  size 
)
inlinevirtual

Write a block data to the end.

Parameters
[in]pDataThe block data.
[in]sizeThe length in bytes of the block data.
Returns
true means success, while false means failure.

Implements IFX_StreamWrite.

Reimplemented in IFX_ChunkFileStream, and IFX_FileStream.

◆ WriteBlock() [7/7]

virtual FX_BOOL IFX_StreamWrite::WriteBlock ( const void *  pData,
size_t  size 
)
pure virtual

Write a block data.

Parameters
[in]pDataThe block data.
[in]sizeThe length in bytes of the block data.
Returns
true means success, while false means failure.

Implemented in IFX_FileWrite, IFX_ChunkFileStream, and IFX_FileStream.

◆ WStringLength()

static FX_STRSIZE CFX_WideString::WStringLength ( const unsigned short *  str)
static

Length of string.

Parameters
[in]strA string.
Returns
The length of string.

Variable Documentation

◆ Alloc

void*(* FXMEM_SystemMgr::Alloc) (struct _FXMEM_SystemMgr *pMgr, size_t size, int flags)

A pointer type to an allocation function.

The function prototype is:
void* Alloc(FXMEM_SystemMgr* pMgr, size_t size, int flags);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
[in]sizeThe size in bytes to allocate.
[in]flagsMemory allocation attributes.
Returns
Address of new memory block.

◆ AllocDebug

void*(* FXMEM_SystemMgr::AllocDebug) (struct _FXMEM_SystemMgr *pMgr, size_t size, int flags, FX_LPCSTR file, int line)

A pointer type to a debug-mode allocation function.

The function prototype is:
void* AllocDebug(FXMEM_SystemMgr* pMgr, size_t size, int flags, FX_LPCSTR file, int line);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
[in]sizeThe size in bytes to allocate.
[in]flagsMemory allocation attributes.
[in]fileThe name of the current source file.
[in]lineThe line number in the current source file.
Returns
Address of new memory block.

◆ CollectAll

void(* FXMEM_SystemMgr::CollectAll) (struct _FXMEM_SystemMgr *pMgr)

A pointer type to a memory-collection function.

The function prototype is:
void CollectAll(FXMEM_SystemMgr* pMgr);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
Returns
None.

◆ CreateThread

FX_HTHREAD(* FX_THREADHANDLER::CreateThread) (FX_LPVOID pUserData, FX_INT32 nPriority, size_t szStack, FX_CALLBACK_ThreadProc lpfThreadProc, FX_LPVOID param)

Callback function to create a thread.

Parameters
[in]pUserDataPointer to user data.
[in]nPriorityThread priority, set to 0 at default.
[in]szStackStack size for thread, set to 0 at default.
[in]lpfThreadProcFunction address for thread procedure.
[in]paramUser parameters passed to thread procedure.
Returns
Handle of thread, NULL if failure.

◆ ExitThread

FX_BOOL(* FX_THREADHANDLER::ExitThread) (FX_LPVOID pUserData)

Callback function to exit from the current thread.

Parameters
[in]pUserDataPointer to user data.
Returns
true means success, while false means failure.

◆ Free [1/2]

void(* FXMEM_SystemMgr::Free) (struct _FXMEM_SystemMgr *pMgr, void *pointer, int flags)

A pointer type to a free function.

The function prototype is:
void Free(FXMEM_SystemMgr* pMgr, void* pointer, int flags);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
[in]pointerA pointer to a memory block.
[in]flagsMemory allocation attributes.
Returns
None.

◆ Free [2/2]

void(* FXMEM_SystemMgr2::Free) (struct _FXMEM_SystemMgr2 *pMgr, void *memory)

Called when an addition memory pool becomes empty.

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr2 object.
[in]memoryA pointer to a memory block.
Returns
None.

◆ GetCurrentThread

FX_HTHREAD(* FX_THREADHANDLER::GetCurrentThread) (FX_LPVOID pUserData)

Callback function to get handle of the current thread.

Parameters
[in]pUserDataPointer to user data.
Returns
Thread handle. NULL means error occurs.

◆ GetThreadPriority

FX_INT32(* FX_THREADHANDLER::GetThreadPriority) (FX_LPVOID pUserData, FX_HTHREAD hThread)

Callback function to get thread priority.

Parameters
[in]pUserDataPointer to user data.
[in]hThreadThread handle specifies a thread to retrieve its priority.
Returns
Thread priority code, refers to FX_THREADPRIORITY_XXX macros.

◆ Lock

void*(* FXMEM_SystemMgr::Lock) (struct _FXMEM_SystemMgr *pMgr, void *handle)

A pointer type to a lock function.

The function prototype is:
void Lock(FXMEM_SystemMgr* pMgr, void* handle);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
[in]handleA handle to a memory block.
Returns
A pointer to the locked memory block.

◆ m_Alloc

void*(* IFX_Allocator::m_Alloc) (struct _IFX_Allocator *pAllocator, size_t size)

A pointer type to an allocation function.

The function prototype is:
void* Alloc(IFX_Allocator* pAllocator, size_t size);

Parameters
[in]pAllocatorA pointer to a IFX_Allocator object.
[in]sizeThe size in bytes to allocate.
Returns
Address of new memory block.

◆ m_AllocDebug

void*(* IFX_Allocator::m_AllocDebug) (struct _IFX_Allocator *pAllocator, size_t size, FX_LPCSTR file, int line)

A pointer type to a debug-mode allocation function.

The function prototype is:
void* AllocDebug(IFX_Allocator* pAllocator, size_t size, FX_LPCSTR filename, int line);

Parameters
[in]pAllocatorA pointer to a IFX_Allocator object.
[in]sizeThe size in bytes to allocate.
[in]fileThe name of the current source file.
[in]lineThe line number in the current source file.
Returns
Address of new memory block.

◆ m_Buffer

template<FX_STRSIZE limit>
FX_CHAR CFX_StringBufTemplate< limit >::m_Buffer[limit]

The fixed string buffer.

Note
IMPORTANT: the string is NOT zero terminated.

◆ m_Free

void(* IFX_Allocator::m_Free) (struct _IFX_Allocator *pAllocator, void *p)

A pointer type to a free function.

The function prototype is:
void free(IFX_Allocator* pAllocator, void* p);

Parameters
[in]pAllocatorA pointer to a IFX_Allocator object.
[in]pAddress of a memory block.
Returns
None.

◆ m_Realloc

void*(* IFX_Allocator::m_Realloc) (struct _IFX_Allocator *pAllocator, void *p, size_t size)

A pointer type to a re-allocation function.

The function prototype is:
void* Realloc(IFX_Allocator* pAllocator, void* p, size_t size);

Parameters
[in]pAllocatorA pointer to a IFX_Allocator object.
[in]pPointer to reallocate.
[in]sizeThe new size in bytes to reallocate.
Returns
Address of new pointer.

◆ m_ReallocDebug

void*(* IFX_Allocator::m_ReallocDebug) (struct _IFX_Allocator *pAllocator, void *p, size_t size, FX_LPCSTR file, int line)

A pointer type to a debug-mode re-allocation function.

The function prototype is:
void* ReallocDebug(IFX_Allocator* pAllocator, void* p, size_t size, FX_LPCSTR filename, int line);

Parameters
[in]pAllocatorA pointer to a IFX_Allocator object.
[in]pPointer to reallocate.
[in]sizeThe new size in bytes to reallocate.
[in]fileThe name of the current source file.
[in]lineThe line number in the current source file.
Returns
Address of new pointer.

◆ More

FX_BOOL(* FXMEM_SystemMgr2::More) (struct _FXMEM_SystemMgr2 *pMgr, size_t alloc_size, void **new_memory, size_t *new_size)

Called when fixed memory manager needs more memory.

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr2 object.
[in]alloc_sizeThe size that API is trying to allocate.
[out]new_memoryIt receives the newly allocated memory.
[out]new_sizeIt receives the newly allocated size. The newly allocated size should be at least alloc_size + 32.
Returns
Nonzero if the function is successful; otherwise 0.

◆ OnAlloc

void(* FXMEM_Debugger::OnAlloc) (FXMEM_FoxitMgr *pMgr, void *p, size_t size, int flags)

A pointer type to an allocation-callback function.

The function prototype is:
void OnAlloc(FXMEM_FoxitMgr* pMgr, void* p, size_t size, int flags);

Parameters
[in]pMgrA pointer to a FXMEM_FoxitMgr object.
[in]pAddress of the allocated memory block.
[in]sizeThe size in bytes allocated.
[in]flagsMemory allocation attributes.
Returns
None.

◆ OnAllocDebug

void(* FXMEM_Debugger::OnAllocDebug) (FXMEM_FoxitMgr *pMgr, void *p, size_t size, int flags, FX_LPCSTR file, int line)

A pointer type to a debug-mode allocation-callback function.

The function prototype is:
void OnAllocDebug(FXMEM_FoxitMgr* pMgr, void* p, size_t size, int flags, FX_LPCSTR file, int line);

Parameters
[in]pMgrA pointer to a FXMEM_FoxitMgr object.
[in]pAddress of the allocated memory block.
[in]sizeThe size in bytes allocated.
[in]flagsMemory allocation attributes.
[in]fileThe name of the current source file.
[in]lineThe line number in the current source file.
Returns
None.

◆ OnFree

void(* FXMEM_Debugger::OnFree) (FXMEM_FoxitMgr *pMgr, void *p, int flags)

A pointer type to a free-callback function.

The function prototype is:
void OnFree(FXMEM_FoxitMgr* pMgr, void* p, int flags);

Parameters
[in]pMgrA pointer to a FXMEM_FoxitMgr object.
[in]pAddress of the memory block to be freed.
[in]flagsMemory allocation attributes.
Returns
None.

◆ OnRealloc

void(* FXMEM_Debugger::OnRealloc) (FXMEM_FoxitMgr *pMgr, void *old_p, void *new_p, size_t size, int flags)

A pointer type to a reallocation-callback function.

The function prototype is:
void OnRealloc(FXMEM_FoxitMgr* pMgr, void* old_p, void* new_p, size_t size, int flags);

Parameters
[in]pMgrA pointer to a FXMEM_FoxitMgr object.
[in]old_pAddress of the old memory block.
[in]new_pAddress of the new memory block.
[in]sizeThe size in bytes reallocated.
[in]flagsMemory allocation attributes.
Returns
None.

◆ OnReallocDebug

void(* FXMEM_Debugger::OnReallocDebug) (FXMEM_FoxitMgr *pMgr, void *old_p, void *new_p, size_t size, int flags, FX_LPCSTR file, int line)

A pointer type to a debug-mode reallocation-callback function.

The function prototype is:
void OnReallocDebug(FXMEM_FoxitMgr* pMgr, void* old_p, void* new_p, size_t size, int flags, FX_LPCSTR file, int line);

Parameters
[in]pMgrA pointer to a FXMEM_FoxitMgr object.
[in]old_pAddress of the old memory block.
[in]new_pAddress of the new memory block.
[in]sizeThe size in bytes reallocated.
[in]flagsMemory allocation attributes.
[in]fileThe name of the current source file.
[in]lineThe line number in the current source file.
Returns
None.

◆ OnTag

void(* FXMEM_Debugger::OnTag) (FXMEM_FoxitMgr *pMgr, FX_LPCSTR tag)

A pointer type to a tag-callback function.

The function prototype is:
void OnTag(FXMEM_FoxitMgr* pMgr, FX_LPCSTR tag);

Parameters
[in]pMgrA pointer to a FXMEM_FoxitMgr object.
[in]tagTag string.
Returns
None.

◆ Purge

void(* FXMEM_SystemMgr::Purge) (struct _FXMEM_SystemMgr *pMgr)

A pointer type to a purge function, which can be used to purge excessive memory without touching any used memory.

The function prototype is:
void Purge(FXMEM_SystemMgr* pMgr);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
Returns
None.

◆ Realloc

void*(* FXMEM_SystemMgr::Realloc) (struct _FXMEM_SystemMgr *pMgr, void *pointer, size_t size, int flags)

A pointer type to a reallocation function.

The function prototype is:
void* Realloc(FXMEM_SystemMgr* pMgr, void* pointer, size_t size, int flags);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
[in]pointerA pointer to a memory block.
[in]sizeThe size in bytes to reallocate.
[in]flagsMemory allocation attributes.
Returns
Address of new memory block.

◆ ReallocDebug

void*(* FXMEM_SystemMgr::ReallocDebug) (struct _FXMEM_SystemMgr *pMgr, void *pointer, size_t size, int flags, FX_LPCSTR file, int line)

A pointer type to a debug-mode reallocation function.

The function prototype is:
void ReallocDebug(FXMEM_SystemMgr* pMgr, void* pointer, size_t size, int flags, FX_LPCSTR file, int line);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
[in]pointerA pointer to a memory block.
[in]sizeThe size in bytes to reallocate.
[in]flagsMemory allocation attributes.
[in]fileThe name of the current source file.
[in]lineThe line number in the current source file.
Returns
Address of new memory block.

◆ SetThreadPriority

void(* FX_THREADHANDLER::SetThreadPriority) (FX_LPVOID pUserData, FX_HTHREAD hThread, FX_INT32 nPriority)

Callback function to set thread priority.

Parameters
[in]pUserDataPointer to user data.
[in]hThreadThread handle specifies a thread to set its priority.
[in]nPriorityThread priority code.
Returns
None.

◆ tzHour

FX_INT32 FXCRT_DATETIMEZONE::tzHour

Hour of time zone, from -12 to 12.

Positive value for the eastern time zone, and negative value for the western time zone.

◆ Unlock

void(* FXMEM_SystemMgr::Unlock) (struct _FXMEM_SystemMgr *pMgr, void *handle)

A pointer type to a unlock function.

The function prototype is:
void Unlock(FXMEM_SystemMgr* pMgr, void* handle);

Parameters
[in]pMgrA pointer to a FXMEM_SystemMgr object.
[in]handleA handle to a memory block.
Returns
A pointer to the unlocked memory block.

◆ WaitForMultipleThreads

FX_INT32(* FX_THREADHANDLER::WaitForMultipleThreads) (FX_LPVOID pUserData, const FX_HTHREAD *pThreads, FX_INT32 nCount)

Wait for termination of multiple threads.

Parameters
[in]pUserDataPointer to user data.
[in]pThreadsPointer to array of thread handles.
[in]nCountNumber of threads in array.
Returns
0 means all threads terminates successfully, other value means failure.

◆ WaitForSingleThread

FX_INT32(* FX_THREADHANDLER::WaitForSingleThread) (FX_LPVOID pUserData, FX_HTHREAD hThread)

Wait for termination of a single thread.

Parameters
[in]pUserDataPointer to user data.
[in]hThreadThread handle specifies a thread to wait.
Returns
0 means thread terminates successfully, other value means failure.

◆ Yield

void(* FX_THREADHANDLER::Yield) (FX_LPVOID pUserData)

Callback function to change CPU time to another thread.

Parameters
[in]pUserDataPointer to user data.
Returns
None.
Note
Call this function to alternate to another thread if caller wants to break the current thread running. Calling thread will be awoken in next thread polling.
FX_BSTRC
#define FX_BSTRC(str)
All application should use the following macro when specifying a string constant. "str" must be a cha...
Definition: fx_string.h:296
FXBSTR_ID
#define FXBSTR_ID(c1, c2, c3, c4)
Construct a ID from four integer values.
Definition: fx_string.h:189
CFX_ByteString
BYTE STRING CLASS.
Definition: fx_string.h:317
FX_WSTRC
#define FX_WSTRC(wstr)
All application should use the following macro when specifying a wide string constant....
Definition: fx_string.h:1428
FX_BOOL
int FX_BOOL
Boolean variable (should be TRUE or FALSE).
Definition: fx_system.h:682