DarkflameServer/dDatabase/Tables/CDBehaviorParameterTable.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.1 KiB
C
Raw Permalink Normal View History

#pragma once
// Custom Classes
#include "CDTable.h"
#include <unordered_map>
#include <unordered_set>
/*!
\file CDBehaviorParameterTable.hpp
\brief Contains data for the BehaviorParameter table
*/
//! BehaviorParameter Entry Struct
struct CDBehaviorParameter {
unsigned int behaviorID; //!< The Behavior ID
std::unordered_set<std::string>::iterator parameterID; //!< The Parameter ID
float value; //!< The value of the behavior template
};
//! BehaviorParameter table
class CDBehaviorParameterTable : public CDTable {
private:
std::unordered_map<size_t, CDBehaviorParameter> m_Entries;
std::unordered_set<std::string> m_ParametersList;
public:
2022-07-28 13:39:57 +00:00
//! Constructor
CDBehaviorParameterTable(void);
2022-07-28 13:39:57 +00:00
//! Destructor
~CDBehaviorParameterTable(void);
2022-07-28 13:39:57 +00:00
//! Returns the table's name
/*!
\return The table name
*/
std::string GetName(void) const override;
2022-07-28 13:39:57 +00:00
CDBehaviorParameter GetEntry(const uint32_t behaviorID, const std::string& name, const float defaultValue = 0);
std::map<std::string, float> GetParametersByBehaviorID(uint32_t behaviorID);
};