2015-07-25 23:01:02 +00:00
|
|
|
/* Include this file once in the main translation unit of any executable file
|
|
|
|
* using HECL's database functionality (see driver/main.cpp)
|
|
|
|
*/
|
|
|
|
#ifdef DATA_SPEC_REGISTRY_HPP
|
|
|
|
#error DataSpecRegistry.hpp may only be included once
|
|
|
|
#endif
|
|
|
|
#define DATA_SPEC_REGISTRY_HPP
|
|
|
|
|
2015-07-22 19:14:50 +00:00
|
|
|
#include "HECL/Database.hpp"
|
|
|
|
|
|
|
|
namespace HECL
|
|
|
|
{
|
|
|
|
namespace Database
|
|
|
|
{
|
|
|
|
/* Centralized registry for DataSpec lookup */
|
|
|
|
std::vector<const struct DataSpecEntry*> DATA_SPEC_REGISTRY;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* RetroCommon specs */
|
|
|
|
namespace Retro
|
|
|
|
{
|
|
|
|
extern HECL::Database::DataSpecEntry SpecEntMP1;
|
|
|
|
extern HECL::Database::DataSpecEntry SpecEntMP2;
|
|
|
|
extern HECL::Database::DataSpecEntry SpecEntMP3;
|
|
|
|
}
|
|
|
|
|
2015-08-08 23:33:55 +00:00
|
|
|
/* Please Call Me! */
|
|
|
|
void HECLRegisterDataSpecs()
|
2015-07-22 19:14:50 +00:00
|
|
|
{
|
2015-08-08 23:33:55 +00:00
|
|
|
HECL::Database::DATA_SPEC_REGISTRY.push_back(&Retro::SpecEntMP1);
|
|
|
|
HECL::Database::DATA_SPEC_REGISTRY.push_back(&Retro::SpecEntMP2);
|
|
|
|
HECL::Database::DATA_SPEC_REGISTRY.push_back(&Retro::SpecEntMP3);
|
2015-07-22 19:14:50 +00:00
|
|
|
}
|