23namespace shamrock::solvergraph {
44 template<
class Tin,
class Tout>
47 std::function<void(
const Tin &, Tout &)> map_edge;
55 NodeMapEdge(std::function<
void(
const Tin &, Tout &)> map_edge)
56 : map_edge(std::move(map_edge)) {}
68 inline void set_edges(std::shared_ptr<Tin> in_edge, std::shared_ptr<Tout> out_edge) {
101 std::string tex = R
"tex(
102 Map edge ${in_edge}$ to ${out_edge}$
T & get_rw_edge(int slot)
Get a read write edge and cast it to the type T.
void __internal_set_rw_edges(std::vector< std::shared_ptr< IEdge > > new_rw_edges)
Set the read write edges.
IEdge & get_rw_edge_base(int slot)
Get a reference to a read write edge and cast it to the type IEdge.
void __internal_set_ro_edges(std::vector< std::shared_ptr< IEdge > > new_ro_edges)
Set the read only edges.
const T & get_ro_edge(int slot)
Get a read only edge and cast it to the type T.
const IEdge & get_ro_edge_base(int slot)
Get a reference to a read only edge.
virtual std::string _impl_get_tex() const
Get the TeX representation of the node.
void _impl_evaluate_internal()
Evaluate the node.
NodeMapEdge(std::function< void(const Tin &, Tout &)> map_edge)
Construct a new NodeMapEdge object.
virtual std::string _impl_get_label() const
Get the label of the node.
void set_edges(std::shared_ptr< Tin > in_edge, std::shared_ptr< Tout > out_edge)
Set the edges of the node.
void replace_all(std::string &inout, std::string_view what, std::string_view with)
replace all occurence of a search string with another
This file contains the definition for the stacktrace related functionality.
#define __shamrock_stack_entry()
Macro to create a stack entry.