#pragma once #include #include #include #include // internal id enum class FragmentID : uint32_t {}; using FragmentRegistry = entt::basic_registry; using FragmentHandle = entt::basic_handle; namespace Fragment::Events { struct FragmentConstruct { const FragmentHandle e; }; struct FragmentUpdated { const FragmentHandle e; }; //struct MessageDestory { //const Message3Handle e; //}; } // Fragment::Events enum class FragmentStore_Event : uint32_t { fragment_construct, fragment_updated, //message_destroy, MAX }; struct FragmentStoreEventI { using enumType = FragmentStore_Event; virtual ~FragmentStoreEventI(void) {} virtual bool onEvent(const Fragment::Events::FragmentConstruct&) { return false; } virtual bool onEvent(const Fragment::Events::FragmentUpdated&) { return false; } //virtual bool onEvent(const Fragment::Events::MessageDestory&) { return false; } // mm3 // send text // send file path }; using FragmentStoreEventProviderI = EventProviderI; struct FragmentStoreI : public FragmentStoreEventProviderI { static constexpr const char* version {"1"}; FragmentRegistry _reg; virtual ~FragmentStoreI(void) {} void throwEventConstruct(const FragmentID fid); void throwEventUpdate(const FragmentID fid); //void throwEventDestroy(); };