minor frag store refactor
This commit is contained in:
parent
8b17ed195f
commit
f22f523774
@ -67,10 +67,6 @@ FragmentStore::FragmentStore(
|
|||||||
registerSerializers();
|
registerSerializers();
|
||||||
}
|
}
|
||||||
|
|
||||||
FragmentHandle FragmentStore::fragmentHandle(FragmentID fid) {
|
|
||||||
return {_reg, fid};
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<uint8_t> FragmentStore::generateNewUID(std::array<uint8_t, 16>& uuid_namespace) {
|
std::vector<uint8_t> FragmentStore::generateNewUID(std::array<uint8_t, 16>& uuid_namespace) {
|
||||||
std::vector<uint8_t> new_uid(uuid_namespace.cbegin(), uuid_namespace.cend());
|
std::vector<uint8_t> new_uid(uuid_namespace.cbegin(), uuid_namespace.cend());
|
||||||
new_uid.resize(new_uid.size() + 16);
|
new_uid.resize(new_uid.size() + 16);
|
||||||
|
@ -31,9 +31,6 @@ struct FragmentStore : public FragmentStoreI {
|
|||||||
FragmentStore(void);
|
FragmentStore(void);
|
||||||
FragmentStore(std::array<uint8_t, 16> session_uuid_namespace);
|
FragmentStore(std::array<uint8_t, 16> session_uuid_namespace);
|
||||||
|
|
||||||
// HACK: get access to the reg
|
|
||||||
FragmentHandle fragmentHandle(FragmentID fid);
|
|
||||||
|
|
||||||
// TODO: make the frags ref counted
|
// TODO: make the frags ref counted
|
||||||
|
|
||||||
// TODO: check for exising
|
// TODO: check for exising
|
||||||
|
@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
FragmentRegistry& FragmentStoreI::registry(void) {
|
||||||
|
return _reg;
|
||||||
|
}
|
||||||
|
|
||||||
|
FragmentHandle FragmentStoreI::fragmentHandle(const FragmentID fid) {
|
||||||
|
return {_reg, fid};
|
||||||
|
}
|
||||||
|
|
||||||
void FragmentStoreI::throwEventConstruct(const FragmentID fid) {
|
void FragmentStoreI::throwEventConstruct(const FragmentID fid) {
|
||||||
std::cout << "FSI debug: event construct " << entt::to_integral(fid) << "\n";
|
std::cout << "FSI debug: event construct " << entt::to_integral(fid) << "\n";
|
||||||
dispatch(
|
dispatch(
|
||||||
|
@ -52,8 +52,12 @@ struct FragmentStoreI : public FragmentStoreEventProviderI {
|
|||||||
|
|
||||||
virtual ~FragmentStoreI(void) {}
|
virtual ~FragmentStoreI(void) {}
|
||||||
|
|
||||||
|
FragmentRegistry& registry(void);
|
||||||
|
FragmentHandle fragmentHandle(const FragmentID fid);
|
||||||
|
|
||||||
void throwEventConstruct(const FragmentID fid);
|
void throwEventConstruct(const FragmentID fid);
|
||||||
void throwEventUpdate(const FragmentID fid);
|
void throwEventUpdate(const FragmentID fid);
|
||||||
|
// TODO
|
||||||
//void throwEventDestroy();
|
//void throwEventDestroy();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user