本文整理汇总了C++中DynArray::empty方法的典型用法代码示例。如果您正苦于以下问题:C++ DynArray::empty方法的具体用法?C++ DynArray::empty怎么用?C++ DynArray::empty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DynArray
的用法示例。
在下文中一共展示了DynArray::empty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetBreakpoints
bool CFlowGraphDebugger::GetBreakpoints(DynArray<SBreakPoint>& breakpointsDynArray)
{
if (m_DebugInfo.empty())
{
return false;
}
TDebugInfo::const_iterator iterDebugInfo = m_DebugInfo.begin();
for (iterDebugInfo; iterDebugInfo != m_DebugInfo.end(); ++iterDebugInfo)
{
TFlowNodesDebugInfo flownodesDebugInfo = (*iterDebugInfo).second;
TFlowNodesDebugInfo::const_iterator iterNodesDebugInfo = flownodesDebugInfo.begin();
for (iterNodesDebugInfo; iterNodesDebugInfo != flownodesDebugInfo.end(); ++iterNodesDebugInfo)
{
SBreakPoints breakpoints = (*iterNodesDebugInfo).second;
// Fill with INPUT port breakpoints
FillDynArray(breakpointsDynArray, breakpoints.inputPorts, (*iterDebugInfo).first, (*iterNodesDebugInfo).first, false);
// Fill with OUTPUT port breakpoints
FillDynArray(breakpointsDynArray, breakpoints.outputPorts, (*iterDebugInfo).first, (*iterNodesDebugInfo).first, true);
}
}
if (breakpointsDynArray.empty())
{
return false;
}
return true;
}
示例2: main
int main (int argl, char ** argc) {
DynArray <char *> files;
for (int i=1; i<argl; ++i) {
if (argc [i][0] == '-') {
if (string (argc [i]) == "--help") {
printHelp (argc [0]);
return 0;
}
} else {
files.push_back (argc [i]);
}
}
if (files.empty ()) {
string line, prog;
while (std::getline (std::cin, line)) {
if (not line.empty ()) {
prog += line + "\n";
} else if (not prog.empty ()) {
auto n = parse (prog);
print (n);
delete n;
std::cout << std::endl;
prog = line;
}
}
if (not prog.empty()) {
auto n = parse (prog);
print (n);
delete n;
}
} else {
for (char * f : files) {
std::ifstream fin (f);
string buff, prog;
while (std::getline (fin, buff)) prog += buff + "\n";
std::cout << "########" << f << "########" << std::endl;
auto n = parse (prog);
print (n);
delete n;
std::cout << "########" << f << "########" << std::endl;
}
}
return 0;
}