本文整理汇总了C++中PolicyRule::getLogging方法的典型用法代码示例。如果您正苦于以下问题:C++ PolicyRule::getLogging方法的具体用法?C++ PolicyRule::getLogging怎么用?C++ PolicyRule::getLogging使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PolicyRule
的用法示例。
在下文中一共展示了PolicyRule::getLogging方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getNext
bool PolicyCompiler_ipf::eliminateDuplicateRules::processNext()
{
PolicyCompiler *pcomp = dynamic_cast<PolicyCompiler*>(compiler);
PolicyRule *rule = getNext(); if (rule==NULL) return false;
// Note that if rule has "any" in Interface column, it is
// implemented as reference to the AnyNetwork object. In this case
// Compiler::getFirstItf() returns NULL.
Interface *intf_rule = compiler->getFirstItf(rule);
int intf_id_rule = (intf_rule) ? intf_rule->getId() : -1;
if ( ! rule->getBool("skip_check_for_duplicates"))
{
for (deque<PolicyRule*>::iterator i=rules_seen_so_far.begin(); i!=rules_seen_so_far.end(); ++i)
{
PolicyRule *r=(*i);
if (r->getBool("skip_check_for_duplicates") ) continue;
if (r->getAction()==PolicyRule::Continue ||
r->getAction()==PolicyRule::Skip) continue;
Interface *intf_r = compiler->getFirstItf(r);
int intf_id_r = (intf_r) ? intf_r->getId() : -1;
if (intf_id_r==intf_id_rule &&
r->getAction()==rule->getAction() &&
r->getLogging()==rule->getLogging() &&
pcomp->cmpRules(*r,*rule) )
{
// cout << "---------------------------------------" << endl;
// cout << pcomp->debugPrintRule(r) << endl;
// cout << pcomp->debugPrintRule(rule) << endl;
return true;
}
}
}
tmp_queue.push_back(rule);
rules_seen_so_far.push_back(rule);
return true;
}