TrinityCore
Loading...
Searching...
No Matches
DB2FileLoaderSparseImpl Class Referencefinal
+ Inheritance diagram for DB2FileLoaderSparseImpl:

Public Member Functions

 DB2FileLoaderSparseImpl (char const *fileName, DB2FileLoadInfo const *loadInfo, DB2Header const *header, DB2FileSource *source)
 
 DB2FileLoaderSparseImpl (DB2FileLoaderSparseImpl const &other)=delete
 
 DB2FileLoaderSparseImpl (DB2FileLoaderSparseImpl &&other) noexcept=delete
 
DB2FileLoaderSparseImpl & operator= (DB2FileLoaderSparseImpl const &other)=delete
 
DB2FileLoaderSparseImpl & operator= (DB2FileLoaderSparseImpl &&other) noexcept=delete
 
 ~DB2FileLoaderSparseImpl ()
 
void LoadColumnData (std::unique_ptr< DB2SectionHeader[]> sections, std::unique_ptr< DB2FieldEntry[]> fields, std::unique_ptr< DB2ColumnMeta[]> columnMeta, std::unique_ptr< std::unique_ptr< DB2PalletValue[]>[]> palletValues, std::unique_ptr< std::unique_ptr< DB2PalletValue[]>[]> palletArrayValues, std::unique_ptr< std::unordered_map< uint32, uint32 >[]> commonValues) override
 
void SkipEncryptedSection (uint32 section) override
 
bool LoadTableData (DB2FileSource *, uint32) override
 
bool LoadCatalogData (DB2FileSource *source, uint32 section) override
 
void SetAdditionalData (std::vector< uint32 > idTable, std::vector< DB2RecordCopy > copyTable, std::vector< std::vector< DB2IndexData > > parentIndexes) override
 
char * AutoProduceData (uint32 &indexTableSize, char **&indexTable) override
 
char * AutoProduceStrings (char **indexTable, uint32 indexTableSize, uint32 locale) override
 
void AutoProduceRecordCopies (uint32 records, char **indexTable, char *dataTable) override
 
DB2Record GetRecord (uint32 recordNumber) const override
 
DB2RecordCopy GetRecordCopy (uint32 copyNumber) const override
 
uint32 GetRecordCount () const override
 
uint32 GetRecordCopyCount () const override
 
uint32 GetMinId () const override
 
uint32 GetMaxId () const override
 
DB2FileLoadInfo const * GetLoadInfo () const override
 
DB2SectionHeader & GetSection (uint32 section) const override
 
- Public Member Functions inherited from DB2FileLoaderImpl
 DB2FileLoaderImpl ()=default
 
 DB2FileLoaderImpl (DB2FileLoaderImpl const &other)=delete
 
 DB2FileLoaderImpl (DB2FileLoaderImpl &&other) noexcept=delete
 
DB2FileLoaderImpl & operator= (DB2FileLoaderImpl const &other)=delete
 
DB2FileLoaderImpl & operator= (DB2FileLoaderImpl &&other) noexcept=delete
 
virtual ~DB2FileLoaderImpl ()=default
 

Private Member Functions

void FillParentLookup (char *dataTable)
 
uint32 GetRecordSection (uint32 recordNumber) const
 
unsigned char const * GetRawRecordData (uint32 recordNumber, uint32 const *section) const override
 
uint32 RecordGetId (uint8 const *record, uint32 recordIndex) const override
 
uint8 RecordGetUInt8 (uint8 const *record, uint32 field, uint32 arrayIndex) const override
 
uint16 RecordGetUInt16 (uint8 const *record, uint32 field, uint32 arrayIndex) const override
 
uint32 RecordGetUInt32 (uint8 const *record, uint32 field, uint32 arrayIndex) const override
 
int32 RecordGetInt32 (uint8 const *record, uint32 field, uint32 arrayIndex) const override
 
uint64 RecordGetUInt64 (uint8 const *record, uint32 field, uint32 arrayIndex) const override
 
float RecordGetFloat (uint8 const *record, uint32 field, uint32 arrayIndex) const override
 
char const * RecordGetString (uint8 const *record, uint32 field, uint32 arrayIndex) const override
 
uint32 RecordGetVarInt (uint8 const *record, uint32 field, uint32 arrayIndex, bool isSigned) const
 
uint16 GetFieldOffset (uint32 field, uint32 arrayIndex) const
 
uint16 GetFieldSize (uint32 field) const
 
std::size_t * RecordCreateDetachedFieldOffsets (std::size_t *oldOffsets) const override
 
std::size_t * RecordCopyDetachedFieldOffsets (std::size_t *oldOffsets) const override
 
void RecordDestroyFieldOffsets (std::size_t *&fieldOffsets) const override
 
void CalculateAndStoreFieldOffsets (uint8 const *rawRecord) const
 

Private Attributes

char const * _fileName
 
DB2FileLoadInfo const * _loadInfo
 
DB2Header const * _header
 
DB2FileSource *const _source
 
std::size_t _totalRecordSize
 
uint16 _maxRecordSize
 
std::unique_ptr< uint8[]> _recordBuffer
 
std::unique_ptr< DB2SectionHeader[]> _sections
 
std::unique_ptr< DB2FieldEntry[]> _fields
 
std::unique_ptr< std::size_t[]> _fieldAndArrayOffsets
 
std::vector< uint32 > _catalogIds
 
std::vector< DB2CatalogEntry > _catalog
 
std::vector< DB2RecordCopy > _copyTable
 
std::vector< std::vector< DB2IndexData > > _parentIndexes
 

Detailed Description

Definition at line 269 of file DB2FileLoader.cpp.

Constructor & Destructor Documentation

◆ DB2FileLoaderSparseImpl() [1/3]

DB2FileLoaderSparseImpl::DB2FileLoaderSparseImpl ( char const *  fileName,
DB2FileLoadInfo const *  loadInfo,
DB2Header const *  header,
DB2FileSource *  source 
)

Definition at line 990 of file DB2FileLoader.cpp.

◆ DB2FileLoaderSparseImpl() [2/3]

DB2FileLoaderSparseImpl::DB2FileLoaderSparseImpl ( DB2FileLoaderSparseImpl const &  other)
delete

◆ DB2FileLoaderSparseImpl() [3/3]

DB2FileLoaderSparseImpl::DB2FileLoaderSparseImpl ( DB2FileLoaderSparseImpl &&  other)
deletenoexcept

◆ ~DB2FileLoaderSparseImpl()

DB2FileLoaderSparseImpl::~DB2FileLoaderSparseImpl ( )
default

Member Function Documentation

◆ AutoProduceData()

◆ AutoProduceRecordCopies()

void DB2FileLoaderSparseImpl::AutoProduceRecordCopies ( uint32  records,
char **  indexTable,
char *  dataTable 
)
overridevirtual

◆ AutoProduceStrings()

◆ CalculateAndStoreFieldOffsets()

void DB2FileLoaderSparseImpl::CalculateAndStoreFieldOffsets ( uint8 const *  rawRecord) const
private

◆ FillParentLookup()

◆ GetFieldOffset()

uint16 DB2FileLoaderSparseImpl::GetFieldOffset ( uint32  field,
uint32  arrayIndex 
) const
private

◆ GetFieldSize()

uint16 DB2FileLoaderSparseImpl::GetFieldSize ( uint32  field) const
private

Definition at line 1507 of file DB2FileLoader.cpp.

References _fields, and ASSERT.

Referenced by CalculateAndStoreFieldOffsets(), and RecordGetVarInt().

◆ GetLoadInfo()

DB2FileLoadInfo const * DB2FileLoaderSparseImpl::GetLoadInfo ( ) const
overridevirtual

Implements DB2FileLoaderImpl.

Definition at line 1588 of file DB2FileLoader.cpp.

References _loadInfo.

◆ GetMaxId()

uint32 DB2FileLoaderSparseImpl::GetMaxId ( ) const
overridevirtual

Implements DB2FileLoaderImpl.

Definition at line 1583 of file DB2FileLoader.cpp.

References _header, and DB2Header::MaxId.

◆ GetMinId()

uint32 DB2FileLoaderSparseImpl::GetMinId ( ) const
overridevirtual

Implements DB2FileLoaderImpl.

Definition at line 1578 of file DB2FileLoader.cpp.

References _header, and DB2Header::MinId.

◆ GetRawRecordData()

unsigned char const * DB2FileLoaderSparseImpl::GetRawRecordData ( uint32  recordNumber,
uint32 const *  section 
) const
overrideprivatevirtual

◆ GetRecord()

DB2Record DB2FileLoaderSparseImpl::GetRecord ( uint32  recordNumber) const
overridevirtual

Implements DB2FileLoaderImpl.

Definition at line 1319 of file DB2FileLoader.cpp.

References _fieldAndArrayOffsets, and DB2FileLoaderImpl::DB2Record.

◆ GetRecordCopy()

DB2RecordCopy DB2FileLoaderSparseImpl::GetRecordCopy ( uint32  copyNumber) const
overridevirtual

Implements DB2FileLoaderImpl.

Definition at line 1324 of file DB2FileLoader.cpp.

References _copyTable, and GetRecordCopyCount().

Referenced by AutoProduceRecordCopies().

◆ GetRecordCopyCount()

uint32 DB2FileLoaderSparseImpl::GetRecordCopyCount ( ) const
overridevirtual

Implements DB2FileLoaderImpl.

Definition at line 1337 of file DB2FileLoader.cpp.

References _copyTable.

Referenced by AutoProduceRecordCopies(), and GetRecordCopy().

◆ GetRecordCount()

uint32 DB2FileLoaderSparseImpl::GetRecordCount ( ) const
overridevirtual

Implements DB2FileLoaderImpl.

Definition at line 1332 of file DB2FileLoader.cpp.

References _catalog.

◆ GetRecordSection()

uint32 DB2FileLoaderSparseImpl::GetRecordSection ( uint32  recordNumber) const
private

◆ GetSection()

DB2SectionHeader & DB2FileLoaderSparseImpl::GetSection ( uint32  section) const
overridevirtual

◆ LoadCatalogData()

bool DB2FileLoaderSparseImpl::LoadCatalogData ( DB2FileSource *  source,
uint32  section 
)
overridevirtual

◆ LoadColumnData()

void DB2FileLoaderSparseImpl::LoadColumnData ( std::unique_ptr< DB2SectionHeader[]>  sections,
std::unique_ptr< DB2FieldEntry[]>  fields,
std::unique_ptr< DB2ColumnMeta[]>  columnMeta,
std::unique_ptr< std::unique_ptr< DB2PalletValue[]>[]>  palletValues,
std::unique_ptr< std::unique_ptr< DB2PalletValue[]>[]>  palletArrayValues,
std::unique_ptr< std::unordered_map< uint32, uint32 >[]>  commonValues 
)
overridevirtual

Implements DB2FileLoaderImpl.

Definition at line 1003 of file DB2FileLoader.cpp.

References _fields, and _sections.

◆ LoadTableData()

bool DB2FileLoaderSparseImpl::LoadTableData ( DB2FileSource *  ,
uint32   
)
inlineoverridevirtual

Implements DB2FileLoaderImpl.

Definition at line 283 of file DB2FileLoader.cpp.

◆ operator=() [1/2]

DB2FileLoaderSparseImpl & DB2FileLoaderSparseImpl::operator= ( DB2FileLoaderSparseImpl &&  other)
deletenoexcept

◆ operator=() [2/2]

DB2FileLoaderSparseImpl & DB2FileLoaderSparseImpl::operator= ( DB2FileLoaderSparseImpl const &  other)
delete

◆ RecordCopyDetachedFieldOffsets()

std::size_t * DB2FileLoaderSparseImpl::RecordCopyDetachedFieldOffsets ( std::size_t *  oldOffsets) const
overrideprivatevirtual

◆ RecordCreateDetachedFieldOffsets()

std::size_t * DB2FileLoaderSparseImpl::RecordCreateDetachedFieldOffsets ( std::size_t *  oldOffsets) const
overrideprivatevirtual

◆ RecordDestroyFieldOffsets()

void DB2FileLoaderSparseImpl::RecordDestroyFieldOffsets ( std::size_t *&  fieldOffsets) const
overrideprivatevirtual

Implements DB2FileLoaderImpl.

Definition at line 1535 of file DB2FileLoader.cpp.

References _fieldAndArrayOffsets.

◆ RecordGetFloat()

float DB2FileLoaderSparseImpl::RecordGetFloat ( uint8 const *  record,
uint32  field,
uint32  arrayIndex 
) const
overrideprivatevirtual

Implements DB2FileLoaderImpl.

Definition at line 1476 of file DB2FileLoader.cpp.

References ASSERT, EndianConvert(), and GetFieldOffset().

Referenced by AutoProduceData().

◆ RecordGetId()

uint32 DB2FileLoaderSparseImpl::RecordGetId ( uint8 const *  record,
uint32  recordIndex 
) const
overrideprivatevirtual

◆ RecordGetInt32()

int32 DB2FileLoaderSparseImpl::RecordGetInt32 ( uint8 const *  record,
uint32  field,
uint32  arrayIndex 
) const
overrideprivatevirtual

Implements DB2FileLoaderImpl.

Definition at line 1463 of file DB2FileLoader.cpp.

References RecordGetVarInt().

◆ RecordGetString()

char const * DB2FileLoaderSparseImpl::RecordGetString ( uint8 const *  record,
uint32  field,
uint32  arrayIndex 
) const
overrideprivatevirtual

Implements DB2FileLoaderImpl.

Definition at line 1484 of file DB2FileLoader.cpp.

References ASSERT, and GetFieldOffset().

Referenced by AutoProduceStrings().

◆ RecordGetUInt16()

uint16 DB2FileLoaderSparseImpl::RecordGetUInt16 ( uint8 const *  record,
uint32  field,
uint32  arrayIndex 
) const
overrideprivatevirtual

Implements DB2FileLoaderImpl.

Definition at line 1450 of file DB2FileLoader.cpp.

References ASSERT, EndianConvert(), and GetFieldOffset().

Referenced by AutoProduceData().

◆ RecordGetUInt32()

uint32 DB2FileLoaderSparseImpl::RecordGetUInt32 ( uint8 const *  record,
uint32  field,
uint32  arrayIndex 
) const
overrideprivatevirtual

Implements DB2FileLoaderImpl.

Definition at line 1458 of file DB2FileLoader.cpp.

References RecordGetVarInt().

◆ RecordGetUInt64()

uint64 DB2FileLoaderSparseImpl::RecordGetUInt64 ( uint8 const *  record,
uint32  field,
uint32  arrayIndex 
) const
overrideprivatevirtual

Implements DB2FileLoaderImpl.

Definition at line 1468 of file DB2FileLoader.cpp.

References ASSERT, EndianConvert(), and GetFieldOffset().

Referenced by AutoProduceData().

◆ RecordGetUInt8()

uint8 DB2FileLoaderSparseImpl::RecordGetUInt8 ( uint8 const *  record,
uint32  field,
uint32  arrayIndex 
) const
overrideprivatevirtual

Implements DB2FileLoaderImpl.

Definition at line 1444 of file DB2FileLoader.cpp.

References ASSERT, and GetFieldOffset().

Referenced by AutoProduceData().

◆ RecordGetVarInt()

uint32 DB2FileLoaderSparseImpl::RecordGetVarInt ( uint8 const *  record,
uint32  field,
uint32  arrayIndex,
bool  isSigned 
) const
private

◆ SetAdditionalData()

void DB2FileLoaderSparseImpl::SetAdditionalData ( std::vector< uint32 >  idTable,
std::vector< DB2RecordCopy >  copyTable,
std::vector< std::vector< DB2IndexData > >  parentIndexes 
)
overridevirtual

Implements DB2FileLoaderImpl.

Definition at line 1047 of file DB2FileLoader.cpp.

References _maxRecordSize, _parentIndexes, and _recordBuffer.

◆ SkipEncryptedSection()

void DB2FileLoaderSparseImpl::SkipEncryptedSection ( uint32  section)
overridevirtual

Implements DB2FileLoaderImpl.

Definition at line 1011 of file DB2FileLoader.cpp.

References _catalog, _catalogIds, and _sections.

Member Data Documentation

◆ _catalog

std::vector<DB2CatalogEntry> DB2FileLoaderSparseImpl::_catalog
private

◆ _catalogIds

std::vector<uint32> DB2FileLoaderSparseImpl::_catalogIds
private

◆ _copyTable

std::vector<DB2RecordCopy> DB2FileLoaderSparseImpl::_copyTable
private

◆ _fieldAndArrayOffsets

std::unique_ptr<std::size_t[]> DB2FileLoaderSparseImpl::_fieldAndArrayOffsets
private

◆ _fields

std::unique_ptr<DB2FieldEntry[]> DB2FileLoaderSparseImpl::_fields
private

Definition at line 326 of file DB2FileLoader.cpp.

Referenced by GetFieldSize(), LoadColumnData(), and RecordGetVarInt().

◆ _fileName

char const* DB2FileLoaderSparseImpl::_fileName
private

◆ _header

DB2Header const* DB2FileLoaderSparseImpl::_header
private

◆ _loadInfo

◆ _maxRecordSize

uint16 DB2FileLoaderSparseImpl::_maxRecordSize
private

Definition at line 323 of file DB2FileLoader.cpp.

Referenced by LoadCatalogData(), and SetAdditionalData().

◆ _parentIndexes

std::vector<std::vector<DB2IndexData> > DB2FileLoaderSparseImpl::_parentIndexes
private

Definition at line 331 of file DB2FileLoader.cpp.

Referenced by FillParentLookup(), and SetAdditionalData().

◆ _recordBuffer

std::unique_ptr<uint8[]> DB2FileLoaderSparseImpl::_recordBuffer
private

Definition at line 324 of file DB2FileLoader.cpp.

Referenced by GetRawRecordData(), and SetAdditionalData().

◆ _sections

std::unique_ptr<DB2SectionHeader[]> DB2FileLoaderSparseImpl::_sections
private

◆ _source

DB2FileSource* const DB2FileLoaderSparseImpl::_source
private

Definition at line 321 of file DB2FileLoader.cpp.

Referenced by GetRawRecordData().

◆ _totalRecordSize

std::size_t DB2FileLoaderSparseImpl::_totalRecordSize
private

Definition at line 322 of file DB2FileLoader.cpp.

Referenced by AutoProduceStrings(), and LoadCatalogData().


The documentation for this class was generated from the following file: