CCF
Loading...
Searching...
No Matches
module_loader_interface.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
6
7#include <memory>
8#include <optional>
9#include <vector>
10
11namespace ccf::js
12{
13 namespace core
14 {
15 class Context;
16 }
17
18 namespace modules
19 {
21 {
22 public:
23 virtual ~ModuleLoaderInterface() = default;
24
25 virtual std::optional<js::core::JSWrappedValue> get_module(
26 std::string_view module_name, js::core::Context& ctx) = 0;
27 };
28
29 using ModuleLoaderPtr = std::shared_ptr<ModuleLoaderInterface>;
30 using ModuleLoaders = std::vector<ModuleLoaderPtr>;
31 }
32}
Definition context.h:46
Definition module_loader_interface.h:21
virtual std::optional< js::core::JSWrappedValue > get_module(std::string_view module_name, js::core::Context &ctx)=0
std::vector< ModuleLoaderPtr > ModuleLoaders
Definition module_loader_interface.h:30
std::shared_ptr< ModuleLoaderInterface > ModuleLoaderPtr
Definition module_loader_interface.h:29
Definition bundle.h:12