45 using namespace boost;
49 class GraphVertexCopier {
51 typedef graph_traits<Graph>::vertex_descriptor VertexDesc;
52 std::map<const base::DataSourceBase*, base::DataSourceBase*>& rdss;
53 property_map<Graph, vertex_command_t>::const_type commandmap1;
54 property_map<Graph, vertex_exec_t>::const_type allmap1;
55 property_map<Graph, vertex_command_t>::type commandmap2;
56 property_map<Graph, vertex_exec_t>::type allmap2;
58 GraphVertexCopier(
const Graph& g1, Graph& g2,
59 std::map<const base::DataSourceBase*, base::DataSourceBase*>& replacementdss )
60 : rdss( replacementdss ),
65 void operator()(
const VertexDesc& a, VertexDesc& b )
68 put( allmap2, b,
get( allmap1, a ) );
70 put( commandmap2, b,
get( commandmap1, a ).copy( rdss ) );
74 class GraphEdgeCopier {
76 typedef graph_traits<Graph>::edge_descriptor EdgeDesc;
77 std::map<const base::DataSourceBase*, base::DataSourceBase*>& rdss;
78 property_map<Graph, edge_condition_t>::const_type conditionmap1;
79 property_map<Graph, edge_condition_t>::type conditionmap2;
83 GraphEdgeCopier(
const Graph& g1, Graph& g2,
84 std::map<const base::DataSourceBase*, base::DataSourceBase*>& replacementdss )
85 : rdss( replacementdss ),
90 void operator()(
const EdgeDesc& a,
const EdgeDesc& b )
93 put( conditionmap2, b,
get( conditionmap1, a ).copy( rdss ) );
boost::adjacency_list< boost::vecS, boost::listS, boost::directedS, VertProperty, EdgeProperty > Graph
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.