#pragma once
#include <string>
#include <vector>
#include <map>
namespace engineapi {
	using std::string;
	using std::vector;
	using std::map;
	class Property {
	public:
		enum {
			ActorPropertyType = 1,
		};
	public:
		uint32_t id = 0;
		uint32_t types = 0;
		uint32_t flags = 0;
		string path = "";
	public:
		static map<uint32_t, Property> PropertyMap;

		template<typename TProperty>
		static TProperty* GetProperty(uint32_t id) {
			auto it = PropertyMap.find(id);
			if (it != PropertyMap.end() && it->second.types & TProperty::Type) {
				return (TProperty*)(&it->second);
			}
			return nullptr;
		}
	};
}