本文整理汇总了C++中WordList::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ WordList::begin方法的具体用法?C++ WordList::begin怎么用?C++ WordList::begin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WordList
的用法示例。
在下文中一共展示了WordList::begin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getBoolValue
int tellstdfunc::stdREPORTLAY::execute() {
bool recursive = getBoolValue();
std::string cellname = getStringValue();
WordList ull;
DATC->lockDB();
bool success = DATC->TEDLIB()->collect_usedlays(cellname, recursive, ull);
DATC->unlockDB();
telldata::ttlist* tllull = DEBUG_NEW telldata::ttlist(telldata::tn_int);
if (success) {
ull.sort();ull.unique();
std::ostringstream ost;
ost << "used layers: {";
for(WordList::const_iterator CL = ull.begin() ; CL != ull.end();CL++ )
ost << " " << *CL << " ";
ost << "}";
tell_log(console::MT_INFO, ost.str());
for(WordList::const_iterator CL = ull.begin() ; CL != ull.end();CL++ )
tllull->add(DEBUG_NEW telldata::ttint(*CL));
ull.clear();
}
else {
std::string news = "cell \"";
news += cellname; news += "\" doesn't exists";
tell_log(console::MT_ERROR,news);
}
OPstack.push(tllull);
return EXEC_NEXT;
}
示例2: parseLayTypeString
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;
}