2021-12-05 17:54:36 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "CDTable.h"
|
|
|
|
|
2023-03-17 14:36:21 +00:00
|
|
|
#include "Singleton.h"
|
2021-12-05 17:54:36 +00:00
|
|
|
|
2023-03-17 14:36:21 +00:00
|
|
|
/**
|
|
|
|
* Initialize the CDClient tables so they are all loaded into memory.
|
2021-12-05 17:54:36 +00:00
|
|
|
*/
|
2023-03-17 14:36:21 +00:00
|
|
|
class CDClientManager : public Singleton<CDClientManager> {
|
2021-12-05 17:54:36 +00:00
|
|
|
public:
|
2023-03-17 14:36:21 +00:00
|
|
|
CDClientManager();
|
2022-07-28 13:39:57 +00:00
|
|
|
|
2023-03-17 14:36:21 +00:00
|
|
|
/**
|
|
|
|
* Fetch a table from CDClient
|
|
|
|
*
|
|
|
|
* @tparam Table type to fetch
|
|
|
|
* @return A pointer to the requested table.
|
2022-07-28 13:39:57 +00:00
|
|
|
*/
|
|
|
|
template<typename T>
|
2023-03-17 14:36:21 +00:00
|
|
|
T* GetTable() {
|
|
|
|
return &T::Instance();
|
2022-07-28 13:39:57 +00:00
|
|
|
}
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|