13 using namespace fn::multi_function_types;
15 class NodeMultiFunctions;
24 std::shared_ptr<MultiFunction> owned_built_fn_;
25 const MultiFunction *built_fn_ =
nullptr;
36 void set_matching_fn(
const MultiFunction *fn);
37 void set_matching_fn(
const MultiFunction &fn);
43 template<
typename T,
typename... Args>
void construct_and_set_matching_fn(Args &&...args);
97 template<
typename T,
typename... Args>
100 owned_built_fn_ = std::make_shared<T>(std::forward<Args>(args)...);
101 built_fn_ = &*owned_built_fn_;
112 static Item empty_item;
113 const Item *item = map_.lookup_ptr(
node->bnode());
114 if (item ==
nullptr) {
void set_matching_fn(const MultiFunction *fn)
NodeMultiFunctionBuilder(bNode &node, bNodeTree &tree)
void construct_and_set_matching_fn(Args &&...args)
const Item & try_get(const DNode &node) const
std::shared_ptr< MultiFunction > owned_fn