Go to the documentation of this file.
42 #ifndef _FX_EXCEPTION_H_
130 if (m_AllocSize <= m_DataSize)
135 m_pBuffer[m_DataSize++] = byte;
189 void Delete(
int start_index,
int count);
471 void GetWideStringL(CFX_WideStringL& wideText)
const;
797 virtual void Clear();
861 virtual FX_BOOL DoWork(
const void* pBuf,
size_t size) = 0;
898 virtual void Clear();
944 virtual FX_BOOL DoWork(
const void* pBuf,
size_t size);
1069 void GetResult(CFX_WideStringL &result)
const {m_Buffer.GetWideStringL(result);}
1223 FX_BOOL SetSize(
int nNewSize,
int nGrowBy);
1251 FX_LPBYTE InsertSpaceAt(
int nIndex,
int nCount);
1261 FX_BOOL RemoveAt(
int nIndex,
int nCount);
1280 const void* GetDataPtr(
int index)
const;
1296 template<
class TYPE>
1343 const char *errorMsg[] = {
1344 "Invalid array size",
1345 "Memory allocation error",
1349 fprintf(stderr,
"%s\n", errorMsg[error]);
1351 fprintf(stderr,
"%i\n", badIndex);
1379 return CFX_BasicArray::SetSize(nNewSize, nGrowBy);
1397 if (nIndex < 0 || nIndex >= m_nSize)
1401 return ((
const TYPE*)m_pData)[nIndex];
1413 if (nIndex < 0 || nIndex >= m_nSize)
return false;
1414 ((TYPE*)m_pData)[nIndex] = newElement;
1427 if (nIndex < 0 || nIndex >= m_nSize)
1431 return ((TYPE*)m_pData)[nIndex];
1439 const TYPE*
GetData()
const {
return (
const TYPE*)m_pData; }
1458 if (nIndex < 0)
return false;
1459 if (nIndex >= m_nSize)
1460 if (!
SetSize(nIndex+1, -1))
return false;
1461 ((TYPE*)m_pData)[nIndex] = newElement;
1474 if (m_nSize < m_nMaxSize)
1477 if (!
SetSize(m_nSize+1, -1))
return false;
1478 ((TYPE*)m_pData)[m_nSize-1] = newElement;
1507 TYPE*
GetDataPtr(
int index) {
return (TYPE*)CFX_BasicArray::GetDataPtr(index); }
1514 TYPE*
AddSpace() {
return (TYPE*)CFX_BasicArray::InsertSpaceAt(m_nSize, 1); }
1524 TYPE*
InsertSpaceAt(
int nIndex,
int nCount) {
return (TYPE*)CFX_BasicArray::InsertSpaceAt(nIndex, nCount); }
1544 if (nIndex < 0 || nIndex >= m_nSize)
1546 *(
volatile char*)0 =
'\0';
1547 return ((
const TYPE*)m_pData)[nIndex];
1560 if (nIndex < 0 || nIndex >= m_nSize)
1562 *(
volatile char*)0 =
'\0';
1563 return ((TYPE*)m_pData)[nIndex];
1579 ((TYPE*)m_pData)[nIndex++] = newElement;
1591 FX_BOOL RemoveAt(
int nIndex,
int nCount = 1) {
return CFX_BasicArray::RemoveAt(nIndex, nCount); }
1610 int Find(
const TYPE& data,
int iStart = 0)
const
1612 if (iStart < 0)
return -1;
1613 for (; iStart < (int)m_nSize; iStart ++)
1614 if (((TYPE*)m_pData)[iStart] == data)
return iStart;
1644 template <
class ObjectClass>
1694 void Add(
const ObjectClass& data)
1696 #ifndef _FX_NOPLACEMENTNEW_
1697 new ((
void*)InsertSpaceAt(m_nSize, 1)) ObjectClass(data);
1699 ::new ((
void*)InsertSpaceAt(m_nSize, 1)) ObjectClass(data);
1713 #ifndef _FX_NOPLACEMENTNEW_
1714 return *(ObjectClass*)
new ((
void*)InsertSpaceAt(m_nSize, 1)) ObjectClass();
1716 return *(ObjectClass*) ::
new ((
void*)InsertSpaceAt(m_nSize, 1)) ObjectClass();
1729 return InsertSpaceAt(m_nSize, 1);
1744 if (nCount == 0)
return 0;
1746 if (!nSize)
return 0;
1748 if (nCount < 0) nCount = nSize;
1749 if (nStart + nCount > nSize) nCount = nSize - nStart;
1750 if (nCount < 1)
return 0;
1752 InsertSpaceAt(m_nSize, nCount);
1753 ObjectClass* pStartObj = (ObjectClass*)
GetDataPtr(nSize);
1754 nSize = nStart + nCount;
1755 for (
FX_INT32 i = nStart; i < nSize; i ++, pStartObj++)
1757 #ifndef _FX_NOPLACEMENTNEW_
1758 new ((
void*)pStartObj) ObjectClass(src[i]);
1760 ::new ((
void*)pStartObj) ObjectClass(src[i]);
1779 if (
this == &src)
return 0;
1781 if (nCount == 0)
return 0;
1783 if (!nSize)
return 0;
1785 if (nCount < 0) nCount = nSize;
1786 if (nStart + nCount > nSize) nCount = nSize - nStart;
1787 if (nCount < 1)
return 0;
1788 nSize = nStart + nCount;
1789 SetSize(nCount, -1);
1790 ObjectClass* pStartObj = (ObjectClass*)m_pData;
1791 for (
FX_INT32 i = nStart; i < nSize; i ++, pStartObj++)
1793 #ifndef _FX_NOPLACEMENTNEW_
1794 new ((
void*)pStartObj) ObjectClass(src[i]);
1796 ::new ((
void*)pStartObj) ObjectClass(src[i]);
1821 return *(ObjectClass*)CFX_BasicArray::GetDataPtr(index);
1831 ObjectClass*
GetDataPtr(
int index)
const {
return (ObjectClass*)CFX_BasicArray::GetDataPtr(index);}
1843 ((ObjectClass*)
GetDataPtr(index))->~ObjectClass();
1844 CFX_BasicArray::RemoveAt(index, 1);
1854 for (
int i = 0; i < m_nSize; i ++)
1855 ((ObjectClass*)
GetDataPtr(i))->~ObjectClass();
1856 CFX_BasicArray::SetSize(0, -1);
1868 template <
class TYPE>
1882 return m_Container.GetSize() == 0;
1892 return m_Container.GetSize();
1902 return m_Container[
Size() - 1];
1912 m_Container.RemoveAt(
Size() - 1);
1924 m_Container.Add(val);
1934 m_Container.RemoveAll();
1943 template <
class TYPE>
1957 return m_Container.
GetSize() == 0;
1977 return m_Container[
Size() - 1];
1999 m_Container.
Add(val);
2023 return m_Container.GetSize() == 0;
2033 return m_Container.GetSize();
2043 return m_Container[
Size() - 1];
2053 m_Container.RemoveAt(
Size() - 1);
2065 m_Container.Add(val);
2102 void SetUnitSize(
int unit_size,
int segment_units,
int index_size = 8);
2118 void*
GetAt(
int index)
const;
2135 void Delete(
int index,
int count = 1);
2166 void*
Iterate(
FX_BOOL (*callback)(
void* param,
void* pData),
void* param)
const;
2174 short m_SegmentSize;
2184 void** GetIndex(
int seg_index)
const;
2185 void* IterateIndex(
int level,
int& start,
void** pIndex,
FX_BOOL (*callback)(
void* param,
void* pData),
void* param)
const;
2186 void* IterateSegment(
FX_LPCBYTE pSegment,
int count,
FX_BOOL (*callback)(
void* param,
void* pData),
void* param)
const;
2192 template <
class ElementType>
2236 template <
class DataType,
int FixedSize>
2247 : m_pAllocator(pAllocator)
2261 : m_pAllocator(pAllocator)
2264 if (data_size > FixedSize)
2282 if (data_size > FixedSize)
2294 operator DataType*() {
return m_pData ? m_pData : m_Data; }
2299 DataType m_Data[FixedSize];
2306 template <
class DataType>
2331 DataType& operator[](
int i) {
FXSYS_assert(m_pData !=
NULL);
return m_pData[i]; }
2332 operator DataType*()
const {
return m_pData; }
2429 void SetAt(
void* key,
void* newValue) { (*this)[key] = newValue; }
2491 CAssoc** m_pHashTable;
2497 CAssoc* m_pFreeList;
2499 struct CFX_Plex* m_pBlocks;
2524 void FreeAssoc(CAssoc* pAssoc);
2533 CAssoc* GetAssocAt(
void* key,
FX_DWORD& hash)
const;
2541 CAssoc* GetCurrentAssoc(
FX_POSITION& rNextPosition)
const;
2558 template <
class KeyType,
class ValueType>
2625 void* pKey =
NULL;
void* pValue =
NULL;
2861 CAssoc** m_pHashTable;
2867 CAssoc* m_pFreeList;
2869 struct CFX_Plex* m_pBlocks;
2886 void FreeAssoc(CAssoc* pAssoc);
2903 CAssoc* GetCurrentAssoc(
FX_POSITION& rNextPosition)
const;
3221 struct CFX_Plex* m_pBlocks;
3233 CNode* NewNode(CNode* pPrev, CNode* pNext);
3239 void FreeNode(CNode* pNode);
3360 if (!module_id)
return false;
3362 for (
FX_DWORD n = 0; n < nCount; n++) {
3363 if (m_DataList[n].m_pModuleId == module_id) {
3364 pData = m_DataList[n].m_pData;
3554 m_pObject = ref.m_pObject;
3563 if (!m_pObject)
return;
3586 if (!m_pObject)
return NULL;
3607 m_pObject = ref.m_pObject;
3620 if (m_pObject ==
NULL)
return;
3627 #if defined(_FX_MANAGED_CODE_) && defined(GetObject)
3644 operator const ObjClass*()
const
3656 return m_pObject ==
NULL;
3665 return m_pObject !=
NULL;
3678 if (m_pObject ==
NULL) {
3700 if (m_pObject ==
NULL)
return;
3716 return m_pObject == ref.m_pObject;
3726 return m_pObject ? m_pObject->
m_RefCount : 0;
3736 if (m_pObject ==
NULL)
return;
3747 if (m_pObject ==
NULL)
return;
3757 CountedObj* m_pObject;
3869 virtual void v_ResetStatistics() {};
3889 template<
typename T>
3898 m_Location = location;
3899 m_OldValue = *location;
3949 #define FX_DATALIST_LENGTH 1024
3952 template<
size_t unit>
3993 for (
FX_INT32 i = m_DataLists.GetUpperBound(); i >= 0; i--){
3994 DataList list = m_DataLists.ElementAt(i);
3997 m_DataLists.RemoveAll();
4011 if (nStart < 0)
return;
4020 if (!list.data)
break;
4022 list.
start = nStart;
4023 list.
count = temp_count;
4028 nCount -= temp_count;
4029 nStart += temp_count;
4048 if (nIndex < 0)
return NULL;
4049 if (m_CurList < 0 || m_CurList >= m_DataLists.GetSize())
return NULL;
4050 DataList *pCurList = m_DataLists.GetDataPtr(m_CurList);
4051 if (!pCurList || nIndex < pCurList->start || nIndex >= pCurList->
start + pCurList->
count){
4054 FX_INT32 iEnd = m_DataLists.GetUpperBound();
4055 while (iStart <= iEnd){
4056 FX_INT32 iMid = (iStart + iEnd) / 2;
4057 DataList* list = m_DataLists.GetDataPtr(iMid);
4058 if (nIndex < list->start)
4060 else if (nIndex >= list->
start + list->
count)
4069 return pCurList ? pCurList->data + (nIndex - pCurList->
start) * unit :
NULL;
4076 FX_INT32 iEnd = m_DataLists.GetUpperBound();
4078 while (iStart <= iEnd) {
4079 FX_INT32 iMid = (iStart + iEnd) / 2;
4080 DataList* cur_list = m_DataLists.GetDataPtr(iMid);
4081 if (list.start == cur_list->start){
4083 }
else if (list.start < cur_list->start + cur_list->count)
4090 DataList* next_list = m_DataLists.GetDataPtr(iMid + 1);
4091 if (list.start == next_list->start){
4093 }
else if (list.start < next_list->start){
4101 m_DataLists.InsertAt(iFind, list);
4110 template<
typename T1,
typename T2>
4134 m_Data.Append(nStart, nCount);
4149 return (T2&)(*(
volatile T2*)data);
4161 return (T2*)m_Data.GetAt(nIndex);
4192 #define ProgressiveStatus FX_ProgressiveStatus
4194 #ifdef _FX_NO_NAMESPACE_
4196 #define FX_NAMESPACE_DECLARE(namespace, type) type
4200 #define FX_NAMESPACE_DECLARE(namespace, type) namespace::type
4227 #define FX_IsOdd(a) ((a) & 1)
4232 #endif // _FX_BASIC_H_
CFX_WideTextBuf(IFX_Allocator *pAllocator=0)
Construct with allocator.
Definition: fx_basic.h:354
FX_BOOL IsEmpty() const
Verify whether the map is empty.
Definition: fx_basic.h:2391
~CFX_BinaryBuf()
The destructor.
FX_INT32 count
The data count.
Definition: fx_basic.h:3961
unsigned char FX_BYTE
Byte (8 bits).
Definition: fx_system.h:656
The data list.
Definition: fx_basic.h:3957
CFX_CountRef()
Construct a null reference.
Definition: fx_basic.h:3542
Definition: fx_basic.h:3776
TYPE & operator[](int nIndex)
Subscript([]) operator overload. This function returns a reference to the specified element specified...
Definition: fx_basic.h:1558
unsigned long FX_DWORD
32-bit unsigned integer.
Definition: fx_system.h:715
FX_BOOL IsEmpty() const
Verify whether the map is empty.
Definition: fx_basic.h:2753
Definition: fx_basic.h:2347
Definition: fx_basic.h:4205
void RemoveAll()
Remove all elements in the array.
FX_DWORD GetBits(FX_DWORD nBits)
Get specified number of bits (maximum 32 bits).
CFX_PtrList(int nBlockSize=10, IFX_Allocator *pAllocator=0)
Construct with block size and allocator.
CFX_PrivateData(IFX_Allocator *pAllocator=0)
Construct with allocator.
Definition: fx_basic.h:3294
T & operator*(void)
Get the object reference operator.
Definition: fx_basic.h:3936
T * operator->(void)
Get the object pointer operator.
Definition: fx_basic.h:3943
FX_POSITION GetNextPosition(FX_POSITION pos) const
Get the next position.
Definition: fx_basic.h:3102
int GetSize() const
Get the number of elements in the array.
Definition: fx_basic.h:1360
FX_BOOL IsEOF() const
Detect EOF.
Definition: fx_basic.h:3798
void Clear()
Clear the data list.
Definition: fx_basic.h:3989
CFX_BaseSegmentedArray(int unit_size=1, int segment_units=512, int index_size=8, IFX_Allocator *pAllocator=0)
Construct with specified unit size, segment units, and number of index levels.
CFX_Stack()
Construct.
Definition: fx_basic.h:2014
CFX_Stack()
Construct.
Definition: fx_basic.h:1873
void SetAt(KeyType key, ValueType newValue)
Add a new (key, value) pair. Add if not exist, otherwise modify.
Definition: fx_basic.h:2603
CFX_ArchiveLoader(FX_LPCBYTE pData, FX_DWORD dwSize)
Construct a loading archive.
~CFX_SortListArray()
The destructor.
Definition: fx_basic.h:3979
int m_RefCount
The reference count.
Definition: fx_basic.h:3536
PD_CALLBACK_FREEDATA m_pCallback
Pointer of a callback function provided by custom module for deallocating private data.
Definition: fx_basic.h:3274
void SetPrivateObj(FX_LPVOID module_id, CFX_DestructObject *pObj)
Set private object.
FX_LPCBYTE GetBuffer() const
Get the constant byte pointer to the saved data.
Definition: fx_basic.h:630
Ready.
Definition: fx_basic.h:4179
void Pop()
Pop the byte string from stack.
Definition: fx_basic.h:2051
Invalid array size.
Definition: fx_basic.h:1307
FX_INT32 start
The start index.
Definition: fx_basic.h:3959
void AddValue(FX_BSTR key, void *pValue)
Add a key-value pair to the dictionary, assuming there is no duplicated key existing.
wchar_t FX_WCHAR
Compiler dependant Unicode character (16-bit for Microsoft Compiler, 32-bit for gcc).
Definition: fx_system.h:721
void SetAt(void *key, void *newValue)
Add a new (key, value) pair. Add if not exist, otherwise modify.
Definition: fx_basic.h:2429
Definition: fx_basic.h:1083
CFX_CMapDWordToDWord(IFX_Allocator *pAllocator=0)
Constructor with allocator.
Definition: fx_basic.h:2646
void operator=(const Ref &ref)
Assignment(=) operator overload. Assign from another reference.
Definition: fx_basic.h:3598
void GetByteStringL(CFX_ByteStringL &str) const
Get a byte string from current buffer object.
FX_BOOL operator==(const Ref &ref) const
Comparison(==) operator overload. Compare with another reference.
Definition: fx_basic.h:3714
FX_BOOL AppendChar(FX_WCHAR wch)
Append a single wide character.
int GetCount() const
Get the number of key-value pairs.
virtual void Clear()
Clear buffer.
Definition: fx_basic.h:3258
Definition: fx_basic.h:2307
void * Add()
Add an element.
INT_PTR FX_INTPTR
Signed integral type for pointer precision.
Definition: fx_system.h:739
TYPE & Top()
Get the top byte data.
Definition: fx_basic.h:1900
CFX_BinaryBuf m_Buffer
Definition: fx_basic.h:2705
void(* PD_CALLBACK_FREEDATA)(FX_LPVOID pData)
Definition: fx_basic.h:3253
Definition: fx_basic.h:4111
int GetUnitSize() const
Get number of bytes for each element.
Definition: fx_basic.h:2156
void Delete(int start_index, int count)
Delete a inter-zone buffer defining by parameters start_index and count in the wide text buffer.
Definition: fx_basic.h:459
T * Get(void)
Get the object pointer.
Definition: fx_basic.h:3929
CFX_ByteStringC GetResult() const
Get the result.
Definition: fx_basic.h:1116
Not Found.
Definition: fx_basic.h:4185
Definition: fx_basic.h:877
int Find(const TYPE &data, int iStart=0) const
Find an element from specified position to last.
Definition: fx_basic.h:1610
void * GetAt(int index) const
Get a typeless pointer to an element data.
Definition: fx_basic.h:3953
FX_STRSIZE GetSize() const
Get the length of the binary buffer.
Definition: fx_basic.h:203
int GetSize() const
Get number of elements in the array.
Definition: fx_basic.h:2142
FX_ProgressiveStatus
Enumeration for progressive status.
Definition: fx_basic.h:4177
Definition: fx_basic.h:2712
FX_STRSIZE GetLength() const
Get the length of the wide text buffer.
Definition: fx_basic.h:442
~CFX_MapByteStringToPtr()
The destructor.
void SetNull()
Set the pointer of the object to be null.
Definition: fx_basic.h:3698
FX_POSITION GetStartPosition() const
Get the first key-value pair position. iterating all (key, value) pairs.
void GetNextAssoc(FX_POSITION &rNextPosition, KeyType &rKey, ValueType &rValue) const
Get the current association and set the position to next association.
Definition: fx_basic.h:2623
void SetUnitSize(int unit_size, int segment_units, int index_size=8)
Change the unit size and the segment units. This can only be called when array is empty.
void SetAt(FX_DWORD key, FX_DWORD value)
Add a new (key, value) pair. Add if not exist, otherwise modify.
void GetNextAssoc(FX_POSITION &rNextPosition, void *&rKey, void *&rValue) const
Get the current association and set the position to next association.
CFX_ObjectArray(const CFX_ObjectArray &other, IFX_Allocator *pAllocator=0)
The copy constructor.
Definition: fx_basic.h:1666
CFX_WideStringC GetWideString() const
Get a wide string from the wide text buffer.
CFX_WideStringC GetResult() const
Get the result.
Definition: fx_basic.h:1060
Definition: fx_basic.h:3911
void ByteAlign()
Get to byte boundary. If current bit position is not multiplication of 8, the rest of the current byt...
void RemoveAll()
Remove all nodes in the list.
CFX_BitWriter(CFX_BinaryBuf *pBinBuf)
A constructor with bits write.
Definition: fx_basic.h:3474
FX_DWORD HashKey(FX_BSTR key) const
Routine used to user-provided hash keys.
virtual FX_BOOL NeedToPauseNow()=0
Check whether callers need to pause now.
Definition: fx_basic.h:1944
FX_LPVOID m_pData
Private data.
Definition: fx_basic.h:3271
void GetResult(CFX_ByteStringL &result) const
Get the result.
Definition: fx_basic.h:1125
void Write(const void *pData, FX_STRSIZE dwSize)
Serialize a memory block.
CFX_ByteStringC GetByteString() const
Get a byte string from the buffer.
FX_LPVOID m_pModuleId
Module ID.
Definition: fx_basic.h:3268
File stream interface, reading & writing.
Definition: fx_stream.h:675
void Delete(int start_index, int count)
Delete a inter-zone buffer defining by parameters start_index and count in the binary buffer.
FX_BOOL Empty() const
Empty the container.
Definition: fx_basic.h:1880
FX_LPBYTE GetAt(FX_INT32 nIndex)
Get the data.
Definition: fx_basic.h:4046
CFX_ObjectArray & operator=(const CFX_ObjectArray &other)
The assignment operator.
Definition: fx_basic.h:1679
Definition: fx_basic.h:1869
ObjectClass & operator[](int index) const
Subscript([]) operator overload. This function returns a reference to the specified object specified ...
Definition: fx_basic.h:1818
void Delete(int index, int count=1)
Delete a number of elements.
void * data
Node data.
Definition: fx_basic.h:3044
static CFX_CharMap * GetDefaultMapper(FX_INT32 codepage=0)
Get a character mapper according to Windows code page or other encoding system. This char maps are ma...
void Input(FX_WCHAR unicode)
Input a unicode.
void * FXSYS_memset32(void *dst, FX_INT32 v, size_t size)
Set buffer data to specified value.
void InitHashTable(FX_DWORD hashSize, FX_BOOL bAllocNow=true)
Initialize the hash table.
FX_BOOL SetSize(int nNewSize, int nGrowBy=-1)
Change the allocated size and the grow amount.
Definition: fx_basic.h:1377
int FX_STRSIZE
String size is limited to 2^31-1.
Definition: fx_string.h:35
CAssoc * pNext
Pointer to next association.
Definition: fx_basic.h:2356
int GetSegmentSize() const
Get number of elements in each segment.
Definition: fx_basic.h:2149
Definition: fx_basic.h:1297
FX_BOOL Copy(const CFX_ArrayTemplate &src)
Copy from an array.
Definition: fx_basic.h:1498
CFX_ArrayTemplate< FX_INT32 > CFX_Int32Array
Type definition for INT32 array.
Definition: fx_basic.h:1632
FX_BOOL IsEOF()
Check whether de-serializing is to the end of the loading buffer.
CFX_CountRef< ObjClass > Ref
Type definition: it is used short for CFX_CountRef<ObjClass>.
Definition: fx_basic.h:3517
void SetStream(IFX_FileStream *pStream)
Set the attached stream.
Definition: fx_basic.h:639
void Clear()
Clear the decoding status and set the output wide text buffer to be empty.
void Clear()
Remove all remaining data from stack.
Definition: fx_basic.h:1932
CONSTANT WIDE STRING CLASS.
Definition: fx_string.h:1205
void Pop()
Pop the byte string from stack.
Definition: fx_basic.h:1985
TYPE & ElementAt(int nIndex)
This method retrieves a ref to an element specified by an index number.
Definition: fx_basic.h:1425
CFX_ArrayTemplate< FX_BYTE > CFX_ByteArray
Type definition for a byte array type.
Definition: fx_basic.h:1620
CFX_UTF8Encoder(IFX_Allocator *pAllocator=0)
A constructor. Set the encoder to initial.
Definition: fx_basic.h:1091
FX_BOOL Append(const CFX_ArrayTemplate &src)
Append an array.
Definition: fx_basic.h:1489
CFX_MapPtrTemplate(IFX_Allocator *pAllocator=0)
Default constructor.
Definition: fx_basic.h:2567
FX_BOOL m_bSelfDestruct
A boolean value to decide whether it is using self destruct for private data. If this is true,...
Definition: fx_basic.h:3280
FX_BOOL Flush()
Flush internal buffer of the file.
CFX_MapPtrToPtr(int nBlockSize=10, IFX_Allocator *pAllocator=0)
Construct with specified block size.
FX_BOOL Lookup(KeyType key, ValueType &rValue) const
Lookup by a key.
Definition: fx_basic.h:2577
CFX_ByteTextBuf(IFX_Allocator *pAllocator=0)
Construct with allocator.
Definition: fx_basic.h:260
CNode * pNext
Pointer to next node.
Definition: fx_basic.h:3040
FX_BOOL SetAtGrow(int nIndex, TYPE newElement)
Set an element value at specified position. Potentially growing the array.
Definition: fx_basic.h:1456
T2 & operator[](FX_INT32 nIndex)
Subscript([]) operator overload.
Definition: fx_basic.h:4144
void Decref()
Decrease the reference.
Definition: fx_basic.h:3745
void AppendStr(FX_BSTR str)
Append a non-buffered byte string.
Definition: fx_basic.h:1109
FX_BOOL Read(void *pBuf, FX_DWORD dwSize)
De-serialize a memory block.
Stream writing interface.
Definition: fx_stream.h:424
CFX_WideString FX_DecodeURI(const CFX_ByteString &bsURI)
A simple URI Decode.
wchar_t * FX_LPWSTR
Pointer to Unicode characters.
Definition: fx_system.h:723
~CFX_FileBufferArchive()
The destructor.
void Add(ElementType data)
Add an element.
Definition: fx_basic.h:2215
void operator=(FX_BSTR str)
Assignment(=) operator overload. From a non-buffered byte string.
void Clear()
Set the binary buffer to be empty.
void * FX_LPVOID
Pointer to any type.
Definition: fx_system.h:645
void Add(const ObjectClass &data)
Add a copy of an existing object to the array.
Definition: fx_basic.h:1694
Definition: fx_basic.h:1176
void Init(FX_LPCBYTE pData, FX_DWORD dwSize)
Initialize the bit-stream with a memory block. Must call Init() first.
ElementType & operator[](int index)
Subscript([]) operator overload. This function returns a ref to the specified element specified by th...
Definition: fx_basic.h:2227
FX_BOOL Lookup(FX_BSTR key, void *&rValue) const
Lookup by a key.
FX_INT64 GetSrcPos() const
Get current position in the source stream (byte offset from the beginning of all input data).
Definition: fx_basic.h:3805
Definition: fx_basic.h:2559
virtual void Clear()
Clear the text buffer.
int RefCount() const
Get the reference count.
Definition: fx_basic.h:3724
void EstimateSize(FX_DWORD size, FX_DWORD grow_by)
Change internal allocation size and grow amount.
CFX_SegmentedArray(int segment_units, int index_size=8, IFX_Allocator *pAllocator=0)
Construct with specified segment units.
Definition: fx_basic.h:2203
CFX_ByteString key
Key data.
Definition: fx_basic.h:2726
void ResetStatistics()
Reset statistics.
CFX_ObjectArray(IFX_Allocator *pAllocator=0)
The constructor.
Definition: fx_basic.h:1653
CFX_TempBuf(int size, IFX_Allocator *pAllocator=0)
Construct with allocator.
Definition: fx_basic.h:2317
~CFX_TempBuf()
The Destructor.
Definition: fx_basic.h:2325
void RemoveAll()
Remove all (key, value) pair.
Definition: fx_basic.h:2701
FX_DWORD GetHashTableSize() const
Get the internal hash table size. Advanced features for derived classes.
Definition: fx_basic.h:2832
void operator=(FX_LPCWSTR lpsz)
Assignment(=) operator overload. From a zero terminated wide character string.
CFX_UTF8Decoder(IFX_Allocator *pAllocator=0)
A constructor. Set the decoder to initial.
Definition: fx_basic.h:1021
void * FX_POSITION
A value used to denote the position of an element in a collection.
Definition: fx_system.h:649
CFX_ArrayTemplate(const CFX_ArrayTemplate &other, IFX_Allocator *pAllocator=0)
The copy constructor.
Definition: fx_basic.h:1330
void GetNextAssoc(FX_POSITION &rNextPosition, CFX_ByteString &rKey, void *&rValue) const
Get the current association and set the position to next association.
int FX_INT32
32-bit signed integer.
Definition: fx_system.h:674
FX_BOOL LookupPrivateData(FX_LPVOID module_id, FX_LPVOID &pData) const
Lookup a private data.
Definition: fx_basic.h:3358
Definition: fx_basic.h:2075
ObjClass * New()
Create a new object and refer to it. The returned pointer to the object can be used to modify the con...
Definition: fx_basic.h:3577
#define FX_Allocator_Alloc(fxAllocator, type, size)
Release-mode allocation on an allocator.
Definition: fx_memory.h:1087
void * AddSpace()
Add an empty space to the array.
Definition: fx_basic.h:1727
CFX_ArrayTemplate(IFX_Allocator *pAllocator=0)
Constructor, from an allocator.
Definition: fx_basic.h:1321
Definition: fx_basic.h:2926
virtual FX_DWORD Release()=0
Decrements reference count and release the current object.
void FreeData()
Free the private data pointed by m_pData.
FX_POSITION GetHeadPosition() const
Get the header position.
Definition: fx_basic.h:3062
int GetCurBytePos()
Get current byte position.
Definition: fx_basic.h:3498
Found.
Definition: fx_basic.h:4183
const TYPE * GetData() const
Direct Access to the element data (may return NULL).
Definition: fx_basic.h:1439
FX_BOOL Lookup(FX_DWORD key, FX_DWORD &value) const
Lookup by a key.
FX_POSITION Find(void *searchValue, FX_POSITION startAfter=0) const
Find a value starting after specified position.
BYTE STRING CLASS.
Definition: fx_string.h:317
FX_POSITION GetStartPosition() const
Get the first key-value pair position. iterating all (key, value) pairs.
ErrorType
Enumeration for error type.
Definition: fx_basic.h:1305
Definition: fx_basic.h:3513
FX_BOOL RemoveAt(int nIndex, int nCount=1)
Remove a number of elements at specified position.
Definition: fx_basic.h:1591
void * Iterate(FX_BOOL(*callback)(void *param, void *pData), void *param) const
Iterate all units, with a callback function for each unit.
FX_BOOL Lookup(FX_BSTR key, void *&rValue) const
Lookup by a key.
Foxit allocator interface.
Definition: fx_memory.h:997
Definition: fx_basic.h:2237
void AppendString(FX_BSTR str)
Append a non-buffered byte string.
Definition: fx_basic.h:119
Header file for Memory management related definitions and classes.
FX_POSITION FindIndex(int index) const
Find a value by index number.
void SetPrivateData(FX_LPVOID module_id, FX_LPVOID pData, PD_CALLBACK_FREEDATA callback)
Set private data.
FX_STRSIZE GetLength() const
Get the length of the byte text buffer.
Definition: fx_basic.h:339
FX_BOOL AppendFill(FX_BYTE byte, FX_STRSIZE count)
Append a byte for specified number times. Not a byte-by-byte processing, but a byte filling processin...
Header file for exception class.
FX_BOOL NeedNewSrc()
Indicate whether this filter needs to input new src data.
void AppendChar(int ch)
Append a single character or byte.
Definition: fx_basic.h:278
wchar_t const * FX_LPCWSTR
Pointer to constant Unicode characters.
Definition: fx_system.h:725
FX_INT32(* m_GetCodePage)()
A pointer type to GetCodePage function. The function return a code page of the platform.
Definition: fx_basic.h:1002
void Rewind()
Rewind a bit-stream. Simply set the current bit position to be zero.
Definition: fx_basic.h:3452
Definition: fx_basic.h:651
~CFX_SmartPointer()
The destructor.
Definition: fx_basic.h:3922
#define FXSYS_assert
Assertion.
Definition: fx_system.h:792
CFX_ObjectArray< CFX_WideString > CFX_WideStringArray
Type definition for a CFX_WideString array type.
Definition: fx_basic.h:1863
Definition: fx_basic.h:345
void AttachData(void *pBuf, FX_STRSIZE size)
Attach to a buffer (this buffer will belong to this object). The buffer must be allocated by FX_Alloc...
Header file for Streams related definitions and classes.
void SetAt(FX_POSITION pos, void *newElement)
Change the value at specified position.
Definition: fx_basic.h:3158
ObjectClass & Add()
Add an empty object to the array.
Definition: fx_basic.h:1711
const TYPE GetAt(int nIndex) const
This method retrieves an element specified by an index number.
Definition: fx_basic.h:1396
CFX_ArrayTemplate & operator=(const CFX_ArrayTemplate &src)
Assignment operator overload.
Definition: fx_basic.h:1533
void SetAt(FX_BSTR key, void *value)
Add a new (key, value) pair. Add if not exist, otherwise modify.
FX_LPVOID GetNextValue(FX_POSITION &rNextPosition) const
Get the the current value and set the position to next association.
Header file for system related definitions.
void RemoveAll()
Clean up the array.
Definition: fx_basic.h:1387
FX_BOOL Add(TYPE newElement)
Add an element at the tail. Potentially growing the array.
Definition: fx_basic.h:1472
int GetSize() const
Get the size of the array.
Definition: fx_basic.h:1808
const TYPE operator[](int nIndex) const
Subscript([]) operator overload. It retrieves a element specified by the zero-based index in nIndex.
Definition: fx_basic.h:1542
FX_BOOL IsNull() const
Check if the pointer of the object is NULL.
Definition: fx_basic.h:3654
void RemoveAt(FX_POSITION pos)
Remove a node at specified position.
~CFX_BaseSegmentedArray()
The destructor.
void FilterFinish(CFX_BinaryBuf &dest_buf)
Indicate the input finished. For some filters, there might be some last output generated.
FX_BOOL RemoveKey(FX_BSTR key)
Remove existing key.
Definition: fx_basic.h:251
void *& operator[](void *key)
Subscript([]) operator overload. Lookup and add if not there.
Definition: fx_basic.h:956
char const * FX_LPCSTR
Pointer to constant 8-bit Windows (ANSI) characters.
Definition: fx_system.h:696
FX_INT32 Append(const CFX_ObjectArray &src, FX_INT32 nStart=0, FX_INT32 nCount=-1)
Append an array.
Definition: fx_basic.h:1742
void Push(const TYPE &val)
Push the data to stack.
Definition: fx_basic.h:1922
FX_BOOL CopyData(const void *pBuf, FX_STRSIZE size)
Copy from another buffer.
FX_LPVOID GetNextValue(FX_POSITION &rNextPosition) const
Get the the current value and set the position to next association.
#define FX_FILESIZE
Support large file directly.
Definition: fx_stream.h:138
unsigned char const * FX_LPCBYTE
Pointer to a constant FX_BYTE.
Definition: fx_system.h:660
void SetAt(FX_BSTR key, void *newValue)
Add a new (key, value) pair. Add if not exist, otherwise modify.
Definition: fx_basic.h:2782
FX_LPBYTE GetBuffer() const
Get a byte pointer to the binary buffer.
Definition: fx_basic.h:196
Definition: fx_basic.h:1645
void * GetPrev(FX_POSITION &rPosition) const
Get the the current value and set the position to previous node.
Definition: fx_basic.h:3090
CFX_MapByteStringToPtr(int nBlockSize=10, IFX_Allocator *pAllocator=0)
Construct with specified block size.
TYPE * GetDataPtr(int index)
Get a pointer to the specified element in the array. Direct pointer access.
Definition: fx_basic.h:1507
void ClearStatus()
Clear the decoding status.
Definition: fx_basic.h:1053
FX_POSITION AddTail(void *newElement)
Add a value to the tail.
CFX_ObjectArray< CFX_ByteString > CFX_ByteStringArray
Type definition for a CFX_ByteString array type.
Definition: fx_basic.h:1861
void WriteBits(FX_INT64 value, FX_INT32 nBits)
Write a value of bits.
int GetCount() const
Get the number of elements.
Definition: fx_basic.h:2384
FX_BOOL AbortAll()
Indicate whether to abort the filter process, including all dest filter.
CFX_ArchiveSaver & operator<<(FX_BYTE i)
Left shifts(<<) operator overload. Serialize a single byte.
FX_BOOL Abort() const
Indicate whether to abort the filter process.
Definition: fx_basic.h:3847
FX_LPWSTR GetBuffer() const
Get a wide character pointer.
Definition: fx_basic.h:449
void AppendChar(FX_DWORD ch)
Append characters to wide text buffer.
FX_BOOL InsertAt(int nStartIndex, const CFX_BasicArray *pNewArray)
Inset an array at specified position.
Definition: fx_basic.h:1601
FX_BOOL NotNull() const
Check if the pointer of the object is not NULL.
Definition: fx_basic.h:3663
CFX_ByteString FX_EncodeURI(const CFX_WideString &wsURI)
A simple URI encode.
void RemoveAll()
Remove all the (key, value) pairs in the map.
void SkipBits(FX_DWORD nBits)
Skip a number of bits.
Definition: fx_basic.h:3445
Definition: fx_basic.h:774
FX_BOOL AppendBlock(const void *pBuf, FX_STRSIZE size)
Append a binary buffer block.
void RemoveAll()
Remove all key-value pairs in the map.
virtual ~CFX_DataFilter()
The destructor. Destroy this filter and all its chain.
void SetDestFilter(CFX_DataFilter *pFilter)
Set destination filter. Note the filter will be appended to the end of current filter chain.
Dynamic binary buffers designed for more efficient appending.
Definition: fx_basic.h:52
CountedObj()
The constructor.
Definition: fx_basic.h:3526
FX_BOOL RemovePrivateData(FX_LPVOID module_id)
Remove previously stored private data. FPDFAPI assumes the module has deallocated the data,...
FX_BOOL Empty() const
Empty the container.
Definition: fx_basic.h:2021
FX_POSITION GetTailPosition() const
Get the tail position.
Definition: fx_basic.h:3069
UINT_PTR FX_UINTPTR
Unsigned integral type for pointer precision.
Definition: fx_system.h:741
void GetResult(CFX_WideStringL &result) const
Get the result.
Definition: fx_basic.h:1069
Definition: fx_basic.h:3761
CFX_ArrayTemplate< FX_INT64 > CFX_FileSizeArray
Type definition for file size array type.
Definition: fx_basic.h:1628
Definition: fx_basic.h:3033
float FX_FLOAT
32-bit floating-point number.
Definition: fx_system.h:676
Association in CFX_MapByteStringToPtr.
Definition: fx_basic.h:2718
CFX_ArrayTemplate< void * > CFX_PtrArray
Type definition for: a typeless pointer array type.
Definition: fx_basic.h:1626
CAssoc * pNext
Pointer to next association.
Definition: fx_basic.h:2721
CFX_WideString FX_UrlDecode(const CFX_ByteString &bsUrl)
A simple URL decode.
~CFX_FixedBufGrow()
The Destructor.
Definition: fx_basic.h:2292
CFX_ByteTextBuf & operator<<(int i)
Left shifts(<<) operator overload. Output an integer to the byte text buffer.
int Size() const
Get size of the container.
Definition: fx_basic.h:2031
FX_INT32 AppendBlock(const void *pBuf, size_t size)
Append a binary buffer block.
Definition: fx_basic.h:2193
CFX_WideString(* m_GetWideString)(CFX_CharMap *pMap, const CFX_ByteString &bstr)
A pointer type to GetWideString function.
Definition: fx_basic.h:982
CFX_CountRef(const Ref &ref)
Copy constructor from another reference.
Definition: fx_basic.h:3552
const typedef CFX_ByteStringC & FX_BSTR
A reference to a constant CFX_ByteStringC object.
Definition: fx_string.h:285
CFX_ArchiveLoader & operator>>(FX_BYTE &i)
Right shifts(>>) operator overload. De-serialize a byte.
Bidirectional node in CFX_PtrList.
Definition: fx_basic.h:3037
CFX_ByteString & Top()
Get the top byte string.
Definition: fx_basic.h:2041
void FX_Error(ErrorType error, FX_INT32 badIndex=0) const
The function is called when raise a fatal error.Print error info an exit(1).
Definition: fx_basic.h:1341
void RemoveAt(int index)
Remove an object at specified position.
Definition: fx_basic.h:1840
TYPE * InsertSpaceAt(int nIndex, int nCount)
Insert a number of elements.
Definition: fx_basic.h:1524
Index out of range.
Definition: fx_basic.h:1313
Association in CFX_MapPtrToPtr.
Definition: fx_basic.h:2353
void * GetNext(FX_POSITION &rPosition) const
Get the the current value and set the position to next node.
Definition: fx_basic.h:3078
ObjClass * GetModify()
Get a modifiable copy of the object.
Definition: fx_basic.h:3676
void Pop()
Pop the data from stack.
Definition: fx_basic.h:1910
void RemoveKey(FX_BSTR key)
Removing existing (key, ?) pair.
CFX_SmartPointer(T *pObj)
The constructor.
Definition: fx_basic.h:3919
TYPE * GetData()
Direct Access to the element data (may return NULL).
Definition: fx_basic.h:1446
void * GetAt(FX_POSITION rPosition) const
Get an value at specified position.
Definition: fx_basic.h:3120
virtual FX_DWORD AddRef()=0
Increments reference count.
FX_INT32 AppendDWord(FX_DWORD i)
Append a FX_DWORD value.
CNode * pPrev
Pointer to previous node.
Definition: fx_basic.h:3042
FX_POSITION GetStartPosition() const
Get the first key-value pair position. iterating all (key, value) pairs.
Definition: fx_basic.h:2805
#define NULL
The null-pointer value.
Definition: fx_system.h:780
FX_BOOL RemoveKey(void *key)
Removing existing (key, ?) pair.
int GetCount() const
Get the number of nodes.
Definition: fx_basic.h:3130
void Push(const CFX_ByteString &val)
Push the byte string to stack.
Definition: fx_basic.h:2063
CFX_BinaryBuf(IFX_Allocator *pAllocator=0)
A default constructor creating an empty buffer.
int GetCount() const
Get the number of elements.
Definition: fx_basic.h:2746
FX_INT32 Copy(const CFX_ObjectArray &src, FX_INT32 nStart=0, FX_INT32 nCount=-1)
Copy from an array.
Definition: fx_basic.h:1777
~CFX_PrivateData()
The destructor.
virtual ~IFX_BufferArchive()
The destructor.
Definition: fx_basic.h:790
IFX_Allocator * m_pAllocator
Special allocator pointer. NULL means to use default allocator.
Definition: fx_basic.h:229
Define a class here derived from user data class, with an additional reference count member.
Definition: fx_basic.h:3522
CFX_WideTextBuf & operator<<(int i)
Left shifts(<<) operator overload. Output a integer to the wide text buffer.
int FX_BOOL
Boolean variable (should be TRUE or FALSE).
Definition: fx_system.h:682
void Add(FX_INT32 nStart, FX_INT32 nCount)
Add a list data.
Definition: fx_basic.h:4132
FX_BOOL IsExhaustBuffer() const
Indicate whether this filter exhausts the input buffer.
Definition: fx_basic.h:3833
int Size() const
Get size of the container.
Definition: fx_basic.h:1965
~CFX_CountRef()
Destruct a reference and release the object it refers to.
Definition: fx_basic.h:3561
const typedef CFX_WideStringC & FX_WSTR
Type definition for a reference to a constant CFX_WideStringC object.
Definition: fx_string.h:1417
CFX_SortListArray(IFX_Allocator *pAllocator=0)
The constructor.
Definition: fx_basic.h:3976
Definition: fx_basic.h:3890
Failed.
Definition: fx_basic.h:4187
#define FX_Allocator_Free(fxAllocator, ptr)
Free memory block on an allocator.
Definition: fx_memory.h:1094
void ByteAlign()
Get to byte boundary. If current bit position is not multiplication of 8, the rest of the current byt...
void DetachBuffer()
Detach the buffer. Just set buffer pointer to NULL, and set the binary buffer size to zero.
FX_BOOL Flush()
Flush internal buffer.
FX_BOOL RemoveKey(KeyType key)
Remove existing (key, ?) pair.
Definition: fx_basic.h:2612
FX_BOOL Lookup(void *key, void *&rValue) const
Lookup by a key.
void RemoveAll()
Remove all objects in the array.
Definition: fx_basic.h:1852
Done.
Definition: fx_basic.h:4189
void ClearAll()
Release all remaining data.
~CFX_AutoRestorer()
The destructor.
Definition: fx_basic.h:3903
void * value
Value data.
Definition: fx_basic.h:2728
IFX_Allocator * m_pAllocator
Special allocator pointer. NULL to use default allocator.
Definition: fx_basic.h:1180
IFX_Allocator * m_pAllocator
Special allocator pointer. NULL means to use default allocator.
Definition: fx_basic.h:2169
FX_POSITION AddHead(void *newElement)
Add a value to the head.
Header file for Strings, variable-length sequence of characters. There are two strings here,...
CFX_ArrayTemplate< FX_DWORD > CFX_DWordArray
Type definition for a double-word array type.
Definition: fx_basic.h:1624
FX_BOOL AttachFile(IFX_StreamWrite *pFile, FX_BOOL bTakeover=false)
Attach file.
FX_INT32 AppendByte(FX_BYTE byte)
Append a single byte.
CFX_FileBufferArchive(FX_STRSIZE size=32768, IFX_Allocator *pAllocator=0)
A constructor with size and allocator.
CFX_ArrayTemplate< FX_FLOAT > CFX_FloatArray
Type definition for float array.
Definition: fx_basic.h:1630
FX_BOOL EstimateSize(FX_STRSIZE size, FX_STRSIZE alloc_step=0)
Change the allocated buffer size, and set the allocation step if alloc_step is non-zero.
CFX_ArrayTemplate< FX_WORD > CFX_WordArray
Type definition for a word array type.
Definition: fx_basic.h:1622
CFX_AutoRestorer(T *location)
The constructor.
Definition: fx_basic.h:3897
CFX_FixedBufGrow(int data_size, IFX_Allocator *pAllocator=0)
Construct with allocator.
Definition: fx_basic.h:2260
TYPE * AddSpace()
Add an element's space.
Definition: fx_basic.h:1514
unsigned char * FX_LPBYTE
Pointer to a FX_BYTE.
Definition: fx_system.h:658
CFX_ObjectStack()
Construct.
Definition: fx_basic.h:1948
CFX_ArrayTemplate< FX_WCHAR > CFX_WCHARArray
Type definition for FX_WHAR array.
Definition: fx_basic.h:1634
CFX_ArchiveSaver(IFX_Allocator *pAllocator=0)
Construct with allocator.
Definition: fx_basic.h:494
Definition: fx_basic.h:3466
int GetUpperBound() const
Get the upper bound in the array, actually the maximum valid index.
Definition: fx_basic.h:1367
FX_BOOL Empty() const
Empty the container.
Definition: fx_basic.h:1955
void * value
Value data.
Definition: fx_basic.h:2360
void TakeOver(CFX_BinaryBuf &other)
Takeover another buffer.
CFX_ByteString(* m_GetByteString)(CFX_CharMap *pMap, const CFX_WideString &wstr)
A pointer type to GetByteString function.
Definition: fx_basic.h:995
FX_POSITION GetStartPosition() const
Get the first key-value pair position. iterating all (key, value) pairs.
Definition: fx_basic.h:2452
FX_DWORD GetHashTableSize() const
Get the internal hash table size. Advanced features for derived classes.
Definition: fx_basic.h:2473
CFX_CMapByteStringToPtr(IFX_Allocator *pAllocator=0)
The constructor.
FX_BOOL SetAt(int nIndex, TYPE newElement)
This method overwrites an element specified by an index number.
Definition: fx_basic.h:1412
void * GetValueAt(void *key) const
Get a value pointer by a key.
ValueType & operator[](KeyType key)
Subscript([]) operator overload. Lookup and add if not there.
Definition: fx_basic.h:2593
~CFX_CMapByteStringToPtr()
The destructor.
void Append(FX_INT32 nStart, FX_INT32 nCount)
Append a list data.
Definition: fx_basic.h:4009
To be continued.
Definition: fx_basic.h:4181
CountedObj(const CountedObj &src)
The copy constructor.
Definition: fx_basic.h:3533
FX_BOOL IsEOF() const
Check if reached end of the stream.
Definition: fx_basic.h:3436
CFX_ByteString FX_UrlEncode(const CFX_WideString &wsUrl)
A simple URL encode.
void SetDataSize(int data_size)
Construct with allocator.
Definition: fx_basic.h:2278
TYPE & Top()
Get the top byte string.
Definition: fx_basic.h:1975
T2 * GetPtrAt(FX_INT32 nIndex)
Get a point to data.
Definition: fx_basic.h:4159
FX_INT32 AppendString(FX_BSTR lpsz)
Append a byte string value.
Definition: fx_basic.h:485
void InitHashTable(FX_DWORD hashSize, FX_BOOL bAllocNow=true)
Initialize the hash table.
int Size() const
Get size of the container.
Definition: fx_basic.h:1890
virtual ~IFX_Pause()
Destructor.
Definition: fx_basic.h:3765
FX_POSITION GetPrevPosition(FX_POSITION pos) const
Get the previous position.
Definition: fx_basic.h:3111
FX_BOOL InsertBlock(FX_STRSIZE pos, const void *pBuf, FX_STRSIZE size)
Insert a binary buffer block at the specified position.
ObjectClass * GetDataPtr(int index) const
Get a pointer to the specified element in the array. Direct pointer access.
Definition: fx_basic.h:1831
WIDE STRING CLASS.
Definition: fx_string.h:1452
Memory allocation error.
Definition: fx_basic.h:1310
FX_INT32 AppendInt64(FX_INT64 i)
Append a FX_INT64 value.
void FilterIn(FX_LPCBYTE src_buf, size_t src_size, CFX_BinaryBuf &dest_buf)
Input a data block to the filter (and its filter chain), and receive the final output.
void Input(FX_BYTE byte)
Input a byte.
Definition: fx_basic.h:2638
Definition: fx_basic.h:1011
FX_BOOL InsertAt(int nIndex, TYPE newElement, int nCount=1)
Inset one or more continuous element at specified position.
Definition: fx_basic.h:1575
FX_INTPTR GetLength() const
Get the length of saved data.
Definition: fx_basic.h:623
void Incref()
Increase the reference.
Definition: fx_basic.h:3734
#define FX_MIN(a, b)
A macro that returns the minimum of a and b.
Definition: fx_system.h:814
void Clear()
Clear data.
Definition: fx_basic.h:4119
#define GetObject
Get object information. GetObjectW defined for unicode-mode, GetObjectA for ansi-mode.
Definition: fx_system.h:546
Definition: fx_basic.h:3286
FX_POSITION InsertAfter(FX_POSITION pos, void *newElement)
Insert a value after specified position.
void RemoveAll()
Remove all the (key, value) pairs in the map.
IFX_BufferArchive(FX_STRSIZE size, IFX_Allocator *pAllocator=0)
Construct with buffer size and special allocator.
FX_DWORD nHashValue
Cached hash value, needed for efficient iteration.
Definition: fx_basic.h:2724
CONSTANT BYTE STRING CLASS.
Definition: fx_string.h:51
void GetNextAssoc(FX_POSITION &rNextPosition, CFX_ByteString &rKey, void *&rValue) const
Get the current association and set the position to next association.
void GetNextAssoc(FX_POSITION &pos, FX_DWORD &key, FX_DWORD &value) const
Get the next association.
void * key
Key data.
Definition: fx_basic.h:2358
void Push(const TYPE &val)
Push the byte string to stack.
Definition: fx_basic.h:1997
Definition: fx_basic.h:3402
~CFX_ObjectArray()
The destructor.
Definition: fx_basic.h:1658
CFX_FixedBufGrow(IFX_Allocator *pAllocator=0)
Construct with allocator.
Definition: fx_basic.h:2246
FX_LPVOID GetPrivateData(FX_LPVOID module_id)
Get previously stored private data. Returns NULL for not stored.
~CFX_MapPtrToPtr()
The Destructor.
FX_BOOL AppendByte(FX_BYTE byte)
Append a single byte.
Definition: fx_basic.h:128
void *& operator[](FX_BSTR key)
Subscript([]) operator overload. Lookup and add if not there.
@2024 Foxit Software Incorporated. All rights reserved.