DarkflameServer/dDatabase/CDClientDatabase/CDClientManager.h
jadebenn 4a50c60559
chore: Assorted pet improvements (#1402)
* Assorted pet improvements

* remove unecessary include

* updates to address some feedback

* fixed database code for testing

* Removed reference member (for now)

* Removed cmake flag
2024-01-08 15:32:09 -08:00

30 lines
522 B
C++

#pragma once
#include "CDTable.h"
#include "Singleton.h"
#define UNUSED_TABLE(v)
/**
* Initialize the CDClient tables so they are all loaded into memory.
*/
class CDClientManager : public Singleton<CDClientManager> {
public:
CDClientManager() = default;
void LoadValuesFromDatabase();
void LoadValuesFromDefaults();
/**
* Fetch a table from CDClient
*
* @tparam Table type to fetch
* @return A pointer to the requested table.
*/
template<typename T>
T* GetTable() {
return &T::Instance();
}
};