2019-06-14 12:59:38 +00:00
|
|
|
|
|
|
|
#include "UserData.hpp"
|
2019-06-14 20:21:33 +00:00
|
|
|
#include "UserDataStorage.hpp"
|
|
|
|
|
|
|
|
extern "C"{
|
|
|
|
void RegisterUserDataType(uint32_t id){
|
|
|
|
auto ud = new UserData({});
|
|
|
|
UserDataStorage::RegisterType(id, ud);
|
|
|
|
}
|
|
|
|
|
|
|
|
void RegisterUserDataField(uint32_t typeId, uint32_t fieldId, UserDataField* field){
|
|
|
|
auto ud = UserDataStorage::GetUserDataType(typeId);
|
|
|
|
ud -> CreateField(fieldId, field);
|
|
|
|
}
|
|
|
|
|
|
|
|
int32_t GetUserDataFieldCount(uint32_t typeId){
|
|
|
|
auto ud = UserDataStorage::GetUserDataType(typeId);
|
|
|
|
return ud ->GetFieldCount();
|
|
|
|
}
|
|
|
|
}
|