Searched refs:segment_units (Results 1 - 2 of 2) sorted by relevance

/external/pdfium/core/src/fxcrt/
H A Dfx_basic_array.cpp147 CFX_BaseSegmentedArray::CFX_BaseSegmentedArray(int unit_size, int segment_units, int index_size, IFX_Allocator* pAllocator) argument
150 , m_SegmentSize(segment_units)
157 void CFX_BaseSegmentedArray::SetUnitSize(int unit_size, int segment_units, int index_size) argument
161 m_SegmentSize = segment_units;
/external/pdfium/core/include/fxcrt/
H A Dfx_basic.h696 CFX_BaseSegmentedArray(int unit_size = 1, int segment_units = 512, int index_size = 8, IFX_Allocator* pAllocator = NULL);
700 void SetUnitSize(int unit_size, int segment_units, int index_size = 8);
750 CFX_SegmentedArray(int segment_units, int index_size = 8, IFX_Allocator* pAllocator = NULL)
751 : CFX_BaseSegmentedArray(sizeof(ElementType), segment_units, index_size, pAllocator)
666 FXSYS_assert(index < m_nSize); return *(ObjectClass*)CFX_BasicArray::GetDataPtr(index); } ObjectClass* GetDataPtr(int index) { return (ObjectClass*)CFX_BasicArray::GetDataPtr(index); } void RemoveAt(int index) { FXSYS_assert(index < m_nSize); ((ObjectClass*)GetDataPtr(index))->~ObjectClass(); CFX_BasicArray::RemoveAt(index, 1); } void RemoveAll() { for (int i = 0; i < m_nSize; i ++) { ((ObjectClass*)GetDataPtr(i))->~ObjectClass(); } CFX_BasicArray::SetSize(0, -1); } }; typedef CFX_ObjectArray<CFX_ByteString> CFX_ByteStringArray; typedef CFX_ObjectArray<CFX_WideString> CFX_WideStringArray; class CFX_BaseSegmentedArray : public CFX_Object { public: CFX_BaseSegmentedArray(int unit_size = 1, int segment_units = 512, int index_size = 8, IFX_Allocator* pAllocator = NULL); ~CFX_BaseSegmentedArray(); void SetUnitSize(int unit_size, int segment_units, int index_size = 8); void* Add(); void* GetAt(int index) const; void RemoveAll(); void Delete(int index, int count = 1); int GetSize() const { return m_DataSize; } int GetSegmentSize() const { return m_SegmentSize; } int GetUnitSize() const { return m_UnitSize; } void* Iterate(FX_BOOL (*callback)(void* param, void* pData), void* param) const; IFX_Allocator* m_pAllocator; private: int m_UnitSize; short m_SegmentSize; FX_BYTE m_IndexSize; FX_BYTE m_IndexDepth; int m_DataSize; void* m_pIndex; void** GetIndex(int seg_index) const; void* IterateIndex(int level, int& start, void** pIndex, FX_BOOL (*callback)(void* param, void* pData), void* param) const; void* IterateSegment(FX_LPCBYTE pSegment, int count, FX_BOOL (*callback)(void* param, void* pData), void* param) const; }; template <class ElementType> class CFX_SegmentedArray : public CFX_BaseSegmentedArray { public: CFX_SegmentedArray(int segment_units, int index_size = 8, IFX_Allocator* pAllocator = NULL) : CFX_BaseSegmentedArray(sizeof(ElementType), segment_units, index_size, pAllocator) {} void Add(ElementType data) { *(ElementType*)CFX_BaseSegmentedArray::Add() = data; } ElementType& operator [] (int index) { return *(ElementType*)CFX_BaseSegmentedArray::GetAt(index); } }; template <class DataType, int FixedSize> class CFX_FixedBufGrow : public CFX_Object { public: CFX_FixedBufGrow(IFX_Allocator* pAllocator = NULL) : m_pAllocator(pAllocator) , m_pData(NULL) {} CFX_FixedBufGrow(int data_size, IFX_Allocator* pAllocator = NULL) : m_pAllocator(pAllocator) , m_pData(NULL) { if (data_size > FixedSize) argument

Completed in 48 milliseconds