The actiongraph has all actions including the dependencies among them to get from one devicegraph to another. More...
#include <Actiongraph.h>
Public Member Functions | |
Actiongraph (const Storage &storage, Devicegraph *lhs, Devicegraph *rhs) | |
Calculate the actiongraph to get from the LHS (left-hand side) to the RHS (right-hand side) devicegraph. | |
const Storage & | get_storage () const |
Get the storage object for which the actiongraph was constructed. | |
const Devicegraph * | get_devicegraph (Side side) const |
Get the left or right devicegraph for which the actiongraph was constructed. | |
bool | empty () const |
Check whether the actiongraph is empty. | |
size_t | num_actions () const |
Return the number of actions in the actiongraph. | |
uf_t | used_features () const |
Calculates a bit-field with the used features of the actiongraph. | |
void | print_graph () const |
Print the actiongraph on cout. | |
void | print_order () const |
Print the order of the actions on cout. | |
void | write_graphviz (const std::string &filename, ActiongraphStyleCallbacks *style_callbacks) const |
Writes the actiongraph in graphviz format. | |
void | write_graphviz (const std::string &filename, GraphvizFlags flags=GraphvizFlags::NAME, GraphvizFlags tooltip_flags=GraphvizFlags::NONE) const |
Writes the actiongraph in graphviz format. | |
std::vector< const Action::Base * > | get_commit_actions () const |
Sorted according to dependencies among actions. | |
std::vector< std::string > | get_commit_actions_as_strings () const ST_DEPRECATED |
void | generate_compound_actions () |
Already called inside of Storage::calculate_actiongraph(). | |
std::vector< const CompoundAction * > | get_compound_actions () const |
Impl & | get_impl () |
const Impl & | get_impl () const |
The actiongraph has all actions including the dependencies among them to get from one devicegraph to another.
storage::Actiongraph::Actiongraph | ( | const Storage & | storage, |
Devicegraph * | lhs, | ||
Devicegraph * | rhs ) |
Calculate the actiongraph to get from the LHS (left-hand side) to the RHS (right-hand side) devicegraph.
Throws an exception if unsupported actions are required (e.g. create a disk or rename an LVM volume group) or if the resulting graph has cycles.
Exception |
std::vector< const Action::Base * > storage::Actiongraph::get_commit_actions | ( | ) | const |
Sorted according to dependencies among actions.
So there can be some randomness in the sorting.
void storage::Actiongraph::print_graph | ( | ) | const |
Print the actiongraph on cout.
Not for production code.
void storage::Actiongraph::print_order | ( | ) | const |
Print the order of the actions on cout.
Not for production code.
void storage::Actiongraph::write_graphviz | ( | const std::string & | filename, |
ActiongraphStyleCallbacks * | style_callbacks ) const |
Writes the actiongraph in graphviz format.
The style_callbacks are used to define graphviz attributes for the graph, nodes and edges, e.g. label, color and shape.
Exception |
void storage::Actiongraph::write_graphviz | ( | const std::string & | filename, |
GraphvizFlags | flags = GraphvizFlags::NAME, | ||
GraphvizFlags | tooltip_flags = GraphvizFlags::NONE ) const |
Writes the actiongraph in graphviz format.
Deprecated in favor of write_graphviz(const std::string&, ActiongraphStyleCallbacks*).
Exception |