mirror of
https://github.com/DarwinAnim8or/DarkflameServerNostalgiaMax.git
synced 2025-12-21 13:29:37 -06:00
53 lines
1.7 KiB
C++
53 lines
1.7 KiB
C++
#include "CDExhibitComponentTable.h"
|
|
//Generated by xmlDb2dDatabaseGenerator on 2022-03-04 00:23:32.974894
|
|
//DO NOT EDIT THIS FILE MANUALLY!
|
|
|
|
CDExhibitComponentTable::CDExhibitComponentTable() {
|
|
unsigned int size = 0;
|
|
auto tableSize = CDClientDatabase::ExecuteQuery("SELECT COUNT(*) FROM ExhibitComponent");
|
|
while (!tableSize.eof()) {
|
|
size = tableSize.getIntField(0, 0);
|
|
tableSize.nextRow();
|
|
}
|
|
|
|
tableSize.finalize();
|
|
this->m_entries.reserve(size);
|
|
|
|
auto tableData = CDClientDatabase::ExecuteQuery("SELECT * FROM ExhibitComponent");
|
|
while (!tableData.eof()) {
|
|
CDExhibitComponent entry;
|
|
entry.id = tableData.getIntField(0, int{});
|
|
entry.length = tableData.getFloatField(1, float{});
|
|
entry.width = tableData.getFloatField(2, float{});
|
|
entry.height = tableData.getFloatField(3, float{});
|
|
entry.offsetX = tableData.getFloatField(4, float{});
|
|
entry.offsetY = tableData.getFloatField(5, float{});
|
|
entry.offsetZ = tableData.getFloatField(6, float{});
|
|
entry.fReputationSizeMultiplier = tableData.getFloatField(7, float{});
|
|
entry.fImaginationCost = tableData.getFloatField(8, float{});
|
|
this->m_entries.push_back(entry);
|
|
tableData.nextRow();
|
|
}
|
|
|
|
tableData.finalize();
|
|
}
|
|
|
|
CDExhibitComponentTable::~CDExhibitComponentTable() {
|
|
}
|
|
|
|
std::string CDExhibitComponentTable::GetName(void) const {
|
|
return "ExhibitComponent";
|
|
}
|
|
|
|
std::vector<CDExhibitComponent> CDExhibitComponentTable::Query(std::function<bool(CDExhibitComponent)> predicate) {
|
|
std::vector<CDExhibitComponent> data = cpplinq::from(this->m_entries)
|
|
>> cpplinq::where(predicate)
|
|
>> cpplinq::to_vector();
|
|
|
|
return data;
|
|
}
|
|
|
|
std::vector<CDExhibitComponent> CDExhibitComponentTable::GetEntries(void) const {
|
|
return this->m_entries;
|
|
}
|