当前位置: 首页>>代码示例>>C++>>正文


C++ Interpreter::getNodeSetForXPath方法代码示例

本文整理汇总了C++中Interpreter::getNodeSetForXPath方法的典型用法代码示例。如果您正苦于以下问题:C++ Interpreter::getNodeSetForXPath方法的具体用法?C++ Interpreter::getNodeSetForXPath怎么用?C++ Interpreter::getNodeSetForXPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Interpreter的用法示例。


在下文中一共展示了Interpreter::getNodeSetForXPath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: matches

bool Breakpoint::matches(Interpreter interpreter, const Breakpoint& other) const {
	// would we match the given breakpoint?

	if (subject != UNDEF_SUBJECT &&
			other.subject != subject)
		return false; // subject does not match
	
	if (when != UNDEF_WHEN &&
			other.when != when)
		return false; // time does not match
	
	if (action != UNDEF_ACTION &&
			other.action != action)
		return false; // action does not match

	// when we have a qualifier it has to match
	if(invokeId.length() > 0 && invokeId != other.invokeId) {
		return false;
	}

	if(invokeType.length() > 0 && invokeType != other.invokeType) {
		return false;
	}

	if(stateId.length() > 0 && stateId != other.stateId) {
		return false;
	}

	if(eventName.length() > 0 && !InterpreterImpl::nameMatch(eventName, other.eventName)) {
		return false;
	}

	if(executableName.length() > 0 && executableName != other.executableName) {
		return false;
	}

	if(executableXPath.length()) {
		Arabica::XPath::NodeSet<std::string> nodes;
		try {
			nodes = interpreter.getNodeSetForXPath(executableXPath);
		} catch (...) {
			return false;
		}
		return Interpreter::isMember(other.element, nodes);
	}

	if(transSourceId.length() > 0 && transSourceId != other.transSourceId) {
		return false;
	}

	if(transTargetId.length() > 0 && transTargetId != other.transTargetId) {
		return false;
	}
	
	if (condition.length() > 0) {
		try {
			DataModel dm = interpreter.getDataModel();
			if (!dm || !dm.evalAsBool(condition)) {
				return false;
			}
		} catch (...) {
			return false;
		}
	}

	return true;
}
开发者ID:enricop,项目名称:uscxml,代码行数:67,代码来源:Breakpoint.cpp


注:本文中的Interpreter::getNodeSetForXPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。