예제 #1
0
void laydata::tdtlibrary::collect_usedlays(WordList& laylist) const
{
   for (cellList::const_iterator CC = _cells.begin(); CC != _cells.end(); CC++)
   {
      CC->second->collect_usedlays(NULL, false,laylist);
   }
   laylist.sort();
   laylist.unique();
   if ( (0 < laylist.size()) && (0 == laylist.front()) )
      laylist.pop_front();
}
예제 #2
0
bool LayerMapGds::parseLayTypeString(wxString exp, word tdtLay)
{
   wxString lay_exp, type_exp;
   if (!separateQuickLists(exp, lay_exp, type_exp)) return false;


   WordList llst;
   // get the listed layers
   getList(  lay_exp , llst);

   if (NULL != _alist)
   {// GDS to TDT conversion
      // ... for every listed layer
      for ( WordList::const_iterator CL = llst.begin(); CL != llst.end(); CL++ )
      {
         // if the layer is listed among the GDS used layers
         if ( _alist->end() != _alist->find(*CL) )
         {
            if (wxT('*') == type_exp)
            { // for all data types
            // get all GDS data types for the current layer and copy them
            // to the map
               for ( WordList::const_iterator CT = (*_alist)[*CL].begin(); CT != (*_alist)[*CL].end(); CT++)
                  _theMap[*CL].insert(std::make_pair(*CT, tdtLay));
            }
            else
            {// for particular (listed) data type
               WordList dtlst;
               getList( type_exp , dtlst);
               for ( WordList::const_iterator CT = dtlst.begin(); CT != dtlst.end(); CT++)
                  _theMap[*CL].insert(std::make_pair(*CT, tdtLay));
            }
         }
         // else ignore the mapped GDS layer
      }
   }
   else
   {// TDT to GDS conversion
      if (1 < llst.size())
      {
         wxString wxmsg;
         wxmsg << wxT("Can't export to multiple layers. Expression \"")
               << lay_exp << wxT("\"")
               << wxT(" is coerced to a single layer ")
               << llst.front();
         std::string msg(wxmsg.mb_str(wxConvUTF8));
         tell_log(console::MT_ERROR,msg);
      }
      if (wxT('*') == type_exp)
      { // for all data types - same as data type = 0
         _theMap[tdtLay].insert(std::make_pair(0, llst.front()));
      }
      else
      {// for particular (listed) data type
         WordList dtlst;
         getList( type_exp , dtlst);
         if (1 < dtlst.size())
         {
            wxString wxmsg;
            wxmsg << wxT("Can't export to multiple types. Expression \"")
                  << type_exp << wxT("\"")
                  << wxT(" for layer ") << tdtLay
                  << wxT(" is coerced to a single data type ")
                  << dtlst.front();
            std::string msg(wxmsg.mb_str(wxConvUTF8));
            tell_log(console::MT_ERROR,msg);
         }
         _theMap[tdtLay].insert(std::make_pair(dtlst.front(), llst.front()));
      }
   }

   return true;
}