2021-12-05 17:54:36 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Custom Classes
|
|
|
|
#include "CDTable.h"
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\file CDBrickIDTableTable.hpp
|
|
|
|
\brief Contains data for the BrickIDTable table
|
|
|
|
*/
|
|
|
|
|
|
|
|
//! BrickIDTable Entry Struct
|
|
|
|
struct CDBrickIDTable {
|
|
|
|
unsigned int NDObjectID;
|
|
|
|
unsigned int LEGOBrickID;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//! BrickIDTable table
|
2023-03-17 14:36:21 +00:00
|
|
|
class CDBrickIDTableTable : public CDTable<CDBrickIDTableTable> {
|
2021-12-05 17:54:36 +00:00
|
|
|
private:
|
|
|
|
std::vector<CDBrickIDTable> entries;
|
|
|
|
|
|
|
|
public:
|
2023-07-25 08:26:52 +00:00
|
|
|
void LoadValuesFromDatabase();
|
2023-03-17 14:36:21 +00:00
|
|
|
// Queries the table with a custom "where" clause
|
2021-12-05 17:54:36 +00:00
|
|
|
std::vector<CDBrickIDTable> Query(std::function<bool(CDBrickIDTable)> predicate);
|
|
|
|
|
2023-07-25 08:26:52 +00:00
|
|
|
const std::vector<CDBrickIDTable>& GetEntries() const;
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|