本文整理汇总了C++中TreeWalker类的典型用法代码示例。如果您正苦于以下问题:C++ TreeWalker类的具体用法?C++ TreeWalker怎么用?C++ TreeWalker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TreeWalker类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: switch
JSValue* JSTreeWalker::getValueProperty(ExecState* exec, int token) const
{
switch (token) {
case RootAttrNum: {
TreeWalker* imp = static_cast<TreeWalker*>(impl());
return toJS(exec, WTF::getPtr(imp->root()));
}
case WhatToShowAttrNum: {
TreeWalker* imp = static_cast<TreeWalker*>(impl());
return jsNumber(exec, imp->whatToShow());
}
case FilterAttrNum: {
TreeWalker* imp = static_cast<TreeWalker*>(impl());
return toJS(exec, WTF::getPtr(imp->filter()));
}
case ExpandEntityReferencesAttrNum: {
TreeWalker* imp = static_cast<TreeWalker*>(impl());
return jsBoolean(imp->expandEntityReferences());
}
case CurrentNodeAttrNum: {
TreeWalker* imp = static_cast<TreeWalker*>(impl());
return toJS(exec, WTF::getPtr(imp->currentNode()));
}
}
return 0;
}
开发者ID:achellies,项目名称:ISeeBrowser,代码行数:26,代码来源:JSTreeWalker.cpp
示例2: parentNodeCallback
static v8::Handle<v8::Value> parentNodeCallback(const v8::Arguments& args)
{
TreeWalker* imp = V8TreeWalker::toNative(args.Holder());
ScriptState* currentState = ScriptState::current();
if (!currentState)
return v8Undefined();
ScriptState& state = *currentState;
RefPtr<Node> result = imp->parentNode(&state);
if (state.hadException()) {
v8::Local<v8::Value> exception = state.exception();
state.clearException();
return throwError(exception, args.GetIsolate());
}
return toV8(result.release(), args.Holder(), args.GetIsolate());
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:15,代码来源:V8TreeWalker.cpp
示例3: currentNodeAttrGetter
static v8::Handle<v8::Value> currentNodeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
TreeWalker* imp = V8TreeWalker::toNative(info.Holder());
return toV8Fast(imp->currentNode(), info, imp);
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:5,代码来源:V8TreeWalker.cpp
示例4: expandEntityReferencesAttrGetter
static v8::Handle<v8::Value> expandEntityReferencesAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
TreeWalker* imp = V8TreeWalker::toNative(info.Holder());
return v8Boolean(imp->expandEntityReferences(), info.GetIsolate());
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:5,代码来源:V8TreeWalker.cpp
示例5: whatToShowAttrGetter
static v8::Handle<v8::Value> whatToShowAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
TreeWalker* imp = V8TreeWalker::toNative(info.Holder());
return v8UnsignedInteger(imp->whatToShow(), info.GetIsolate());
}
开发者ID:sanyaade-embedded-systems,项目名称:armhf-node-webkit,代码行数:5,代码来源:V8TreeWalker.cpp
注:本文中的TreeWalker类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论