26 std::shared_ptr<mf::MultiFunction> owned_built_fn_;
27 const mf::MultiFunction *built_fn_ =
nullptr;
32 std::shared_ptr<const bNodeTree> shared_tree_;
34 friend NodeMultiFunctions;
39 std::shared_ptr<const bNodeTree>
shared_tree =
nullptr);
71 const std::shared_ptr<const bNodeTree> &
shared_tree();
80 const mf::MultiFunction *
fn =
nullptr;
89 const std::shared_ptr<const bNodeTree> &shared_tree =
nullptr);
134template<
typename T,
typename... Args>
137 owned_built_fn_ = std::make_shared<T>(std::forward<Args>(args)...);
138 built_fn_ = &*owned_built_fn_;
144 using T =
decltype(create_multi_function());
145 T *allocated_function =
new T(create_multi_function());
146 owned_built_fn_ = std::shared_ptr<T>(allocated_function);
147 built_fn_ = &*owned_built_fn_;
158 static Item empty_item;
159 const Item *item = map_.lookup_ptr(&
node);
160 if (item ==
nullptr) {
NonCopyable(const NonCopyable &other)=delete
NonMovable(NonMovable &&other)=delete
void set_matching_fn(const mf::MultiFunction *fn)
NodeMultiFunctionBuilder(const bNode &node, const bNodeTree &tree, std::shared_ptr< const bNodeTree > shared_tree=nullptr)
const mf::MultiFunction & function()
void construct_and_set_matching_fn_cb(Fn &&create_multi_function)
void construct_and_set_matching_fn(Args &&...args)
const std::shared_ptr< const bNodeTree > & shared_tree()
const Item & try_get(const bNode &node) const
NodeMultiFunctions(const bNodeTree &tree, const std::shared_ptr< const bNodeTree > &shared_tree=nullptr)
std::shared_ptr< mf::MultiFunction > owned_fn
const mf::MultiFunction * fn