Merge branch 'main' into cdclient-rework

This commit is contained in:
David Markowitz
2023-07-27 20:03:12 -07:00
1177 changed files with 21192 additions and 13777 deletions

View File

@@ -5,12 +5,6 @@
#include <unordered_map>
#include <unordered_set>
/*!
\file CDBehaviorTemplateTable.hpp
\brief Contains data for the BehaviorTemplate table
*/
//! BehaviorTemplate Entry Struct
struct CDBehaviorTemplate {
unsigned int behaviorID; //!< The Behavior ID
unsigned int templateID; //!< The Template ID (LOT)
@@ -19,22 +13,17 @@ struct CDBehaviorTemplate {
};
//! BehaviorTemplate table
class CDBehaviorTemplateTable : public CDTable {
class CDBehaviorTemplateTable : public CDTable<CDBehaviorTemplateTable> {
private:
std::vector<CDBehaviorTemplate> entries;
std::unordered_map<uint32_t, CDBehaviorTemplate> entriesMappedByBehaviorID;
std::unordered_set<std::string> m_EffectHandles;
public:
void LoadHost() override;
//! Constructor
CDBehaviorTemplateTable(void);
//! Destructor
~CDBehaviorTemplateTable(void);
//! Returns the table's name
/*!
\return The table name
*/
std::string GetName(void) const override;
const CDBehaviorTemplate& GetByBehaviorID(const uint32_t behaviorID) const;
CDBehaviorTemplateTable();
// Queries the table with a custom "where" clause
std::vector<CDBehaviorTemplate> Query(std::function<bool(CDBehaviorTemplate)> predicate);
std::vector<CDBehaviorTemplate> GetEntries(void) const;
const CDBehaviorTemplate GetByBehaviorID(uint32_t behaviorID);
};