From: fred Date: Sun, 25 May 1997 19:21:11 +0000 (+0000) Subject: lilypond-0.0.65 X-Git-Tag: release/1.5.59~6132 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a1e5288bd688745244973a84dfeedfbe17bd496c;p=lilypond.git lilypond-0.0.65 --- diff --git a/flower/include/directed-graph.hh b/flower/include/directed-graph.hh new file mode 100644 index 0000000000..73f8a926e5 --- /dev/null +++ b/flower/include/directed-graph.hh @@ -0,0 +1,51 @@ +/* + edge_out.hh -- declare Directed_graph_node + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + + +#ifndef DEPENDENCY_HH +#define DEPENDENCY_HH + +#include "parray.hh" + +/** + Class to handle two-sided connections between nodes (the Dependencies) + */ +class Directed_graph_node { + Link_arrayedge_out_l_arr_; + /// targets + Link_array edge_in_l_arr_; + +public: + + /** remove i-th edge_out (and exactly one ref to me in the edge_out) + */ + void remove_edge_out_idx(int i); + void copy_edges_out(Directed_graph_node const&); + bool linked_b() const; + void unlink(); + void junk_links(); + void add(Directed_graph_node*); + void remove_edge_in(Directed_graph_node *); + void remove_edge_out(Directed_graph_node*); + bool contains_b(Directed_graph_node const*) const; + + Directed_graph_node(Directed_graph_node const &); + void OK()const; + Directed_graph_node(); + + ~Directed_graph_node(); + + /** + ensure that no edge_out exists doubly. + */ + void uniq(); + Link_array const& get_out_edge_arr() const; + Link_array const& get_in_edge_arr() const; +}; + +#endif // DEPENDENCY_HH