summaryrefslogtreecommitdiff
path: root/view/kernelcache/core/KernelCacheBuilder.h
blob: 756d069baf0cad5ae557abad665e3ef3dd52da5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include "binaryninjaapi.h"
#include "KernelCache.h"

// This constructs a Cache
class KernelCacheBuilder
{
	BinaryNinja::Ref<BinaryNinja::BinaryView> m_view;
	BinaryNinja::Ref<BinaryNinja::Logger> m_logger;
	// This cache is what is returned via `Finalize`.
	KernelCache m_cache;

public:
	explicit KernelCacheBuilder(BinaryNinja::Ref<BinaryNinja::BinaryView> view);

	KernelCache& GetCache() { return m_cache; };
	// Returns a shared cache that is ready for processing, this should include all the required shared cache entries.
	KernelCache Finalize();
};