Commit 812ed090 authored by Floris Berendsen's avatar Floris Berendsen
Browse files

ENH: removed depricated code in Blueprint

parent 19b23a09
......@@ -46,7 +46,6 @@ public:
>,
ComponentNameType > GraphType;
//typedef GraphType::label_type ComponentNameType;
typedef std::vector<ComponentNameType> ComponentNamesType;
typedef boost::graph_traits< GraphType >::vertex_descriptor ComponentIndexType;
......@@ -63,7 +62,6 @@ public:
typedef boost::graph_traits< GraphType >::out_edge_iterator OutputIteratorType;
typedef std::pair< OutputIteratorType, OutputIteratorType > OutputIteratorPairType;
// Interface for managing components
bool AddComponent( ComponentNameType name);
bool AddComponent(ComponentNameType name, ParameterMapType parameterMap);
......@@ -77,12 +75,10 @@ public:
// interface procedurally.
// void DeleteComponent( ComponentIndexType );
// Returns a vector of the all Component names in the graph.
// TODO: should this be an iterator over the names?
ComponentNamesType GetComponentNames(void);
ComponentIteratorPairType GetComponentIterator( void ) {
return boost::vertices( this->m_Graph );
}
// Interface for managing connections between components in which we
// deliberately avoid using connection indexes, but instead force
// the user to think in terms of components (which is conceptually simpler)
......@@ -93,15 +89,6 @@ public:
bool DeleteConnection(ComponentNameType upstream, ComponentNameType downstream);
bool ConnectionExists(ComponentNameType upstream, ComponentNameType downstream);
// TODO: can we really regard this as deprecated? Remove then.
// Returns iterator for all connections in the graph
//ConnectionIteratorPairType GetConnectionIterator(void);
// Returns the outgoing connections from a component in the graph,
// i.e. all components that reads data from given component
//OutputIteratorPairType GetOutputIterator(const ComponentNameType name);
// Returns a vector of the Component names at the outgoing direction
// TODO: should this be an iterator over the names?
ComponentNamesType GetOutputNames(const ComponentNameType name);
......
......@@ -83,6 +83,7 @@ Blueprint::ParameterMapType
Blueprint
::GetComponent(ComponentNameType name)
{
//TODO check if component exists: this->m_Graph[name] != graph_traits<GraphType>::null_vertex()
this->Modified();
return this->m_Graph[name].parameterMap;
}
......@@ -188,28 +189,12 @@ Blueprint
return boost::edge_by_label( upstream, downstream, this->m_Graph).second;
}
// TODO: can we really regard this as deprecated? Remove then.
/*
Blueprint::ConnectionIteratorPairType
Blueprint
::GetConnectionIterator(void) {
return boost::edges(this->m_Graph);
}
Blueprint::OutputIteratorPairType
Blueprint
::GetOutputIterator(const ComponentNameType name) {
return boost::out_edges(this->m_Graph.vertex(name), this->m_Graph);
}
*/
Blueprint::ComponentNamesType
Blueprint
::GetOutputNames(const ComponentNameType name) {
ComponentNamesType container;
OutputIteratorPairType outputIteratorPair = boost::out_edges(this->m_Graph.vertex(name), this->m_Graph);
for (auto it = outputIteratorPair.first; it != outputIteratorPair.second; ++it){
//boost::vertex()
//boost::edge_by_label(upstream, downstream, this->m_Graph).first
container.push_back(this->m_Graph.graph()[it->m_target].name);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment