Ejemplo n.º 1
0
bool Circuit::insertLayout(CLayout& tmp){
	// map<string, CLayout>::iterator cells_it=layouts.find(tmp.getName());
	//	if(cells_it!=layouts.end())
	//		cout << "-> Cell layout " << tmp.getName() << " already exists. Overwriting..." << endl;
	layouts[tmp.getName()]=tmp;
	return true;
}
Ejemplo n.º 2
0
/* =============================================================================
 =============================================================================== */
bool CWorld::addLayout(CLayout &Layout, int iNdx)
{
	if (!Layout.getName().size()) 
		Layout.setName(getFileNameBase(Layout.getLink()));
	if (!Layout.getName().size()) 
		Layout.setName("New Layout");
	if (getLayoutSet().getLayoutIndex(Layout.getName()) != -1)
	{
		string	str;
		for (int i = 1; getLayoutSet().getLayoutIndex(str = getNewName(Layout.getName(), i)) != -1; i++);
		Layout.setName(str);
	}

	bool	bRet = getLayoutSet().addLayout(Layout, iNdx);
	return bRet;
}