aboutsummaryrefslogtreecommitdiff
path: root/ProjectBrussel/CodegenRuntime/Metadata.hpp
blob: e89fd8f28e722e6e95910140a805052a3e964197 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once

#include "MacrosCodegen.hpp"
#include "MetadataBase.hpp"

namespace Metadata {

struct TypeInfoList {
	struct Sentinel {
	};

	struct Iterator {
		void* data;

		const TypeInfo& operator*() const;
		Iterator& operator++();
		Iterator operator++(int);

		bool operator==(const Iterator&) const;
		bool operator==(const Sentinel&) const;
	};

	Iterator begin() const;
	Sentinel end() const;
};

/// Get a list of all type infos present.
const TypeInfoList& GetTypeInfoList();

const TypeInfo* QueryTypeInfo(TypeId id);
const TypeInfo* QueryTypeInfo(std::string_view name);

} // namespace Metadata