void traversDesignSpaceForMorphMatrix(const CyPhyML::DesignSpace &ds, MorphMatrix& morphMatrix, set<CyPhyML::DesignEntity>& allEntities)
{
	const set<CyPhyML::DesignSpace> &dsfdrs = ds.DesignSpace_kind_children();
	for(set<CyPhyML::DesignSpace>::const_iterator di=dsfdrs.begin();di!=dsfdrs.end();++di)
	{
		traversDesignSpaceForMorphMatrix(*di, morphMatrix, allEntities);
	}	
	
	const set<CyPhyML::DesignContainer> &containers = ds.DesignContainer_kind_children();
	for(set<CyPhyML::DesignContainer>::iterator ci=containers.begin();ci!=containers.end();++ci)
	{	
		CyPhyML::DesignContainer container = *ci;
		traverseContainerForMorphMatrix(container, morphMatrix, allEntities);
	}
	
}
예제 #2
0
void CDSERootSelDialog::FillDSETree(CyPhyML::DesignSpace &cyphy_ds, HTREEITEM parent)
{
	std::string iname = (std::string)cyphy_ds.name()+" [Folder]";

	HTREEITEM dse_node = m_dstree.InsertItem(utf82cstring(iname), parent, TVI_LAST);
	//m_dstree.SetItemState( dse_node, TVIS_BOLD, TVIS_BOLD ); //bold
	dseTreeMap[dse_node] = cyphy_ds;

	set<CyPhyML::DesignSpace> c_dsfdrs = cyphy_ds.DesignSpace_kind_children();
	for(set<CyPhyML::DesignSpace>::iterator ci=c_dsfdrs.begin();ci!=c_dsfdrs.end();++ci)
	{		
		FillDSETree((CyPhyML::DesignSpace)*ci, dse_node);
	}
	set<CyPhyML::DesignContainer> c_dscons = cyphy_ds.DesignContainer_kind_children();
	for(set<CyPhyML::DesignContainer>::iterator con_it=c_dscons.begin();con_it!=c_dscons.end();++con_it)
	{
		FillDSETree((CyPhyML::DesignContainer)*con_it, dse_node);
		root_dcs.insert((CyPhyML::DesignContainer)*con_it);
	}
//	m_dstree.SortChildren(dse_node);
	m_dstree.Expand(dse_node,TVE_EXPAND);
}