forked from Green-Sky/tomato
settle on content store for now
This commit is contained in:
parent
8a55c0f763
commit
b8132afabb
@ -9,11 +9,21 @@
|
|||||||
|
|
||||||
#include <solanaceae/file/file2.hpp>
|
#include <solanaceae/file/file2.hpp>
|
||||||
|
|
||||||
enum class Content1 : uint32_t {};
|
enum class Content : uint32_t {};
|
||||||
using ContentRegistry = entt::basic_registry<Content1>;
|
using ContentRegistry = entt::basic_registry<Content>;
|
||||||
using ContentHandle = entt::basic_handle<ContentRegistry>;
|
using ContentHandle = entt::basic_handle<ContentRegistry>;
|
||||||
|
|
||||||
namespace Content::Components {
|
struct ContentStore {
|
||||||
|
static constexpr const char* version {"1"};
|
||||||
|
|
||||||
|
ContentRegistry _reg;
|
||||||
|
|
||||||
|
ContentRegistry& registry(void);
|
||||||
|
ContentHandle objectHandle(const Content e);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
namespace Content1::Components {
|
||||||
|
|
||||||
// TODO: design it as a tree?
|
// TODO: design it as a tree?
|
||||||
|
|
||||||
|
@ -65,6 +65,8 @@ MainScreen::MainScreen(SDL_Renderer* renderer_, Theme& theme_, std::string save_
|
|||||||
g_provideInstance<RegistryMessageModel>("RegistryMessageModel", "host", &rmm);
|
g_provideInstance<RegistryMessageModel>("RegistryMessageModel", "host", &rmm);
|
||||||
g_provideInstance<MessageSerializerNJ>("MessageSerializerNJ", "host", &msnj);
|
g_provideInstance<MessageSerializerNJ>("MessageSerializerNJ", "host", &msnj);
|
||||||
|
|
||||||
|
g_provideInstance<ContentStore>("ContentStore", "host", &cs);
|
||||||
|
|
||||||
g_provideInstance<ToxI>("ToxI", "host", &tc);
|
g_provideInstance<ToxI>("ToxI", "host", &tc);
|
||||||
g_provideInstance<ToxPrivateI>("ToxPrivateI", "host", &tpi);
|
g_provideInstance<ToxPrivateI>("ToxPrivateI", "host", &tpi);
|
||||||
g_provideInstance<ToxEventProviderI>("ToxEventProviderI", "host", &tc);
|
g_provideInstance<ToxEventProviderI>("ToxEventProviderI", "host", &tc);
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
#include <solanaceae/toxcore/tox_event_logger.hpp>
|
#include <solanaceae/toxcore/tox_event_logger.hpp>
|
||||||
#include "./tox_private_impl.hpp"
|
#include "./tox_private_impl.hpp"
|
||||||
|
|
||||||
|
#include "./content/content.hpp"
|
||||||
|
|
||||||
#include <solanaceae/tox_contacts/tox_contact_model2.hpp>
|
#include <solanaceae/tox_contacts/tox_contact_model2.hpp>
|
||||||
#include <solanaceae/tox_messages/tox_message_manager.hpp>
|
#include <solanaceae/tox_messages/tox_message_manager.hpp>
|
||||||
#include <solanaceae/tox_messages/tox_transfer_manager.hpp>
|
#include <solanaceae/tox_messages/tox_transfer_manager.hpp>
|
||||||
@ -53,6 +55,8 @@ struct MainScreen final : public Screen {
|
|||||||
MessageSerializerNJ msnj;
|
MessageSerializerNJ msnj;
|
||||||
MessageTimeSort mts;
|
MessageTimeSort mts;
|
||||||
|
|
||||||
|
ContentStore cs;
|
||||||
|
|
||||||
ToxEventLogger tel{std::cout};
|
ToxEventLogger tel{std::cout};
|
||||||
ToxClient tc;
|
ToxClient tc;
|
||||||
ToxPrivateImpl tpi;
|
ToxPrivateImpl tpi;
|
||||||
|
Loading…
Reference in New Issue
Block a user