• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ rootNode函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中rootNode函数的典型用法代码示例。如果您正苦于以下问题:C++ rootNode函数的具体用法?C++ rootNode怎么用?C++ rootNode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: clientRect

void QFormulatorEditWidget::MovePG( int fUp, int fSel )
{
	RectFde rcf = clientRect();
	SizeFde ofs( 0, 0 );
	CFmlDrawEngineQt::DPtoLPEx( rcf, scale(), scale() );
	CFmlDrawEngineQt::DPtoLPEx( ofs, scale(), scale() );
	if( rootNode()->MovePgUpDown( rcf, ofs, fUp, fSel ) == 0 )
		updateFormulatorWidget();
}
开发者ID:Nilis640,项目名称:formulator-mathml,代码行数:9,代码来源:fmleditwidget.cpp


示例2: SERIALIZER

osgDB::ReaderWriter::ReadResult
ReaderWriterDAE::readNode(const std::string& fname,
        const osgDB::ReaderWriter::Options* options) const
{
    SERIALIZER();

    bool bOwnDAE = false;
    DAE* pDAE = NULL;
   
    if ( options )
        pDAE = (DAE*) options->getPluginData("DAE");        
    
    std::string ext( osgDB::getLowerCaseFileExtension(fname) );
    if( ! acceptsExtension(ext) ) return ReadResult::FILE_NOT_HANDLED;

    std::string fileName( osgDB::findDataFile( fname, options ) );
    if( fileName.empty() ) return ReadResult::FILE_NOT_FOUND;

    osg::notify(osg::INFO) << "ReaderWriterDAE( \"" << fileName << "\" )" << std::endl;

    if (NULL == pDAE)
    {
        bOwnDAE = true;
        pDAE = new DAE;
    }

    osgdae::daeReader daeReader(pDAE) ;

    // Convert file name to URI
    std::string fileURI = ConvertFilePathToColladaCompatibleURI(fileName);

    if ( ! daeReader.convert( fileURI ) )
    {
        osg::notify( osg::WARN ) << "Load failed in COLLADA DOM conversion" << std::endl;
        return ReadResult::ERROR_IN_READING_FILE;
    }

    if ( options )
    {
        // Return the document URI
        if (options->getPluginData("DAE-DocumentURI"))
            *(std::string*)options->getPluginData("DAE-DocumentURI") = fileURI;
        // Return some additional information about the document
        if (options->getPluginData("DAE-AssetUnitName"))
             *(std::string*)options->getPluginData("DAE-AssetUnitName") = daeReader.m_AssetUnitName;
        if (options->getPluginData("DAE-AssetUnitMeter"))
            *(float*)options->getPluginData("DAE-AssetUnitMeter") = daeReader.m_AssetUnitMeter;
        if (options->getPluginData("DAE-AssetUp_axis"))
            *(domUpAxisType*)options->getPluginData("DAE-AssetUp_axis") = daeReader.m_AssetUp_axis;
   }

    if (bOwnDAE)
        delete pDAE;

    osg::Node* rootNode( daeReader.getRootNode() );
    return rootNode;
}
开发者ID:joevandyk,项目名称:osg,代码行数:57,代码来源:ReaderWriterDAE.cpp


示例3: appendChildNode

void SatellitesItem::recreateList() {
    QList<SatelliteGroup*> list = m_satComp->groups();
    for(int i = 0; i < list.size(); ++i) {
        SatelliteGroup *group = list.at(i);
        for(int c = 0; c < group->size(); ++c) {
            appendChildNode(new SatelliteNode(group->at(c), rootNode()));
        }
    }
}
开发者ID:KDE,项目名称:kstars,代码行数:9,代码来源:satellitesitem.cpp


示例4: rootNode

Element* FocusNavigationScope::owner() const
{
    Node* root = rootNode();
    if (root->isShadowRoot()) {
        ShadowRoot* shadowRoot = toShadowRoot(root);
        return shadowRoot->host();
    }
    return 0;
}
开发者ID:takaaptech,项目名称:sky_engine,代码行数:9,代码来源:FocusController.cpp


示例5: ptf

void QFormulatorEditWidget::dropEvent( QDropEvent *event )
{
	if( event->mimeData() && (event->dropAction() == Qt::CopyAction || event->dropAction() == Qt::MoveAction) )
	{
		PointFde ptf( event->pos().x(), event->pos().y() );
		RectFde rcf = clientRect();
		CFmlDrawEngineQt::DPtoLPEx( ptf, scale(), scale() );
		CFmlDrawEngineQt::DPtoLPEx( rcf, scale(), scale() );
		if( rootNode()->DrInSelection() == 0 || rootNode()->PtInSelection( rcf, ptf ) == 0 )
		{
			setBlinkingCursorEnabled( true );
			rootNode()->GetDrag().SetEmpty();
			rootNode()->GetSelectInfo().SetEmpty();
			rootNode()->MoveCaret( rcf, ptf, 0 );
			updateFormulatorWidget();
		}
		else
		{
			if( event->dropAction() == Qt::MoveAction && isRemovedSelection() == 0 )
			{
				CFrameNode *pFrameNode = rootNode()->RemoveOrCopySelection( 1 );
				if( pFrameNode )
				{
					delete pFrameNode;
					setRemovedSelection();
				}
			}
			else if( event->dropAction() == Qt::CopyAction )
			{
				rootNode()->GetSelectInfo().SetEmpty();
			}

			int iRet = document()->paste( event->mimeData(), false );

			setBlinkingCursorEnabled( true );
			rootNode()->GetDrag().SetEmpty();
			updateViewDocument();

			if( !hasFocus() ) setFocus();
			if( iRet ) event->acceptProposedAction();
		}
	}
	else
	{
		setBlinkingCursorEnabled( true );
		rootNode()->GetDrag().SetEmpty();
		updateFormulatorWidget();
	}
}
开发者ID:Nilis640,项目名称:formulator-mathml,代码行数:49,代码来源:fmleditwidget.cpp


示例6: rootNode

QString CFormulatorDoc::exportPureContentMathML( bool ignoreCache )
{
	if( !ignoreCache )
	{
		if( isMmlChanged() )
		{
			QString sRet = rootNode()->to_mathml_pureContent();
			::hstr_0a_to_0d0a( sRet );
			::hstr_del_redundant_0d0a( sRet );
			m_cmmlCache = sRet;
			setMmlChanged( false );
		}
		return m_cmmlCache;
	}
	QString sRet = rootNode()->to_mathml_pureContent();
	::hstr_0a_to_0d0a( sRet );
	::hstr_del_redundant_0d0a( sRet );
	return sRet;
}
开发者ID:Nilis640,项目名称:formulator-mathml,代码行数:19,代码来源:fmldocument.cpp


示例7: rootNode

void NetworkView::updateAccountDependents() {
	ZLBlockTreeNode::List rootChildren = rootNode().children();

	ZLBlockTreeNode::List::iterator nodeIt = rootChildren.begin();
	while (nodeIt != rootChildren.end() && (*nodeIt)->isInstanceOf(NetworkCatalogNode::TYPE_ID)) {
		NetworkCatalogNode &node = (NetworkCatalogNode &) **nodeIt;
		updateAccountDependents(node);
		++nodeIt;
	}
}
开发者ID:ALEXGUOQ,项目名称:FBReader,代码行数:10,代码来源:NetworkView.cpp


示例8: scrollingTreeNodeDidScroll

void ScrollingTreeIOS::scrollingTreeNodeDidScroll(ScrollingNodeID nodeID, const FloatPoint& scrollPosition, SetOrSyncScrollingLayerPosition scrollingLayerPositionAction)
{
    if (!m_scrollingCoordinator)
        return;

    if (nodeID == rootNode()->scrollingNodeID())
        setMainFrameScrollPosition(scrollPosition);

    callOnMainThread(bind(&AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll, m_scrollingCoordinator.get(), nodeID, scrollPosition, isHandlingProgrammaticScroll(), scrollingLayerPositionAction));
}
开发者ID:MYSHLIFE,项目名称:webkit,代码行数:10,代码来源:ScrollingTreeIOS.cpp


示例9: ASSERT

void TreeScope::setParentTreeScope(TreeScope& newParentScope)
{
    // A document node cannot be re-parented.
    ASSERT(!rootNode().isDocumentNode());

    newParentScope.guardRef();
    if (m_parentTreeScope)
        m_parentTreeScope->guardDeref();
    m_parentTreeScope = &newParentScope;
    setDocument(newParentScope.document());
}
开发者ID:kublaj,项目名称:blink,代码行数:11,代码来源:TreeScope.cpp


示例10: beginInsertRows

int DeviceExplorerModel::addDevice(const Device::Node& deviceNode)
{
    int row = m_rootNode.childCount();
    QModelIndex parent; //invalid

    beginInsertRows(parent, row, row);
    rootNode().push_back(deviceNode);
    endInsertRows();

    return row;
}
开发者ID:rperrot,项目名称:i-score,代码行数:11,代码来源:DeviceExplorerModel.cpp


示例11: OGDF_ASSERT

//
// embed original graph according to embedding of skeletons
//
// The procedure also handles the case when some (real or virtual)
// edges are reversed (used in upward-planarity algorithms)
void PlanarSPQRTree::embed(Graph &G)
{
	OGDF_ASSERT(&G == &originalGraph());

	const Skeleton &S = skeleton(rootNode());
	const Graph &M = S.getGraph();

	for (node v : M.nodes)
	{
		node vOrig = S.original(v);
		SListPure<adjEntry> adjEdges;

		for (adjEntry adj : v->adjEdges) {
			edge e = adj->theEdge();
			edge eOrig = S.realEdge(e);

			if (eOrig != nullptr) {
				adjEntry adjOrig = (vOrig == eOrig->source()) ?
					eOrig->adjSource() : eOrig->adjTarget();
				OGDF_ASSERT(adjOrig->theNode() == S.original(v));
				adjEdges.pushBack(adjOrig);

			} else {
				node wT    = S.twinTreeNode(e);
				edge eTwin = S.twinEdge(e);
				expandVirtualEmbed(wT,
					(vOrig == skeleton(wT).original(eTwin->source())) ?
					eTwin->adjSource() : eTwin->adjTarget(),
					adjEdges);
			}
		}

		G.sort(vOrig,adjEdges);
	}

	edge e;
	forall_adj_edges(e,rootNode()) {
		node wT = e->target();
		if (wT != rootNode())
			createInnerVerticesEmbed(G, wT);
	}
开发者ID:lncosie,项目名称:ogdf,代码行数:46,代码来源:PlanarSPQRTree.cpp


示例12: scrollingTreeNodeDidScroll

void ThreadedScrollingTree::scrollingTreeNodeDidScroll(ScrollingNodeID nodeID, const FloatPoint& scrollPosition, const std::optional<FloatPoint>& layoutViewportOrigin, ScrollingLayerPositionAction scrollingLayerPositionAction)
{
    if (!m_scrollingCoordinator)
        return;

    if (nodeID == rootNode()->scrollingNodeID())
        setMainFrameScrollPosition(scrollPosition);

    RunLoop::main().dispatch([scrollingCoordinator = m_scrollingCoordinator, nodeID, scrollPosition, layoutViewportOrigin, localIsHandlingProgrammaticScroll = isHandlingProgrammaticScroll(), scrollingLayerPositionAction] {
        scrollingCoordinator->scheduleUpdateScrollPositionAfterAsyncScroll(nodeID, scrollPosition, layoutViewportOrigin, localIsHandlingProgrammaticScroll, scrollingLayerPositionAction);
    });
}
开发者ID:eocanha,项目名称:webkit,代码行数:12,代码来源:ThreadedScrollingTree.cpp


示例13: createNodeStack

Node *buildExpressionTree(char *expression) {

	NodeStack *operands = createNodeStack();
	NodeStack *result = createNodeStack();
	
	char *start = expression;
	char *end; // = expression;	
	char *beginning = expression;

	Stack *target;
	Node *node;
	Node *operand1;
	Node *operand2;
	
	while((start - beginning) < strlen(expression)) {
		if(start[0] - 0 == 39) {
			end = strstr(start + 1, "'") + 1;
		} else {
			end = strstr(start, " ");	
			if(!end) {
				end = start;
				while(end[0] != '\0')
					++end;
			}
		}
		
		char *token = malloc((end - start) + 1);
		strlcpy(token, start, (end - start) + 1);
		start = end + 1;	

		node = createNode(token);

		if(isBinaryOperator(token)) {
			target = result;
		} else if(isLogicalOperator(token)) { 
			target = operands;
		} else { 
			pushNode(operands, node);		
			continue;
		}		
	
		operand1 = popNode(target);
		operand2 = popNode(target);		
		node->right = operand1;
		node->left = operand2;

		// add this to stack
		pushNode(result, node);
	}

	// return the first node in the list (not the top)
    	return rootNode(result);
}
开发者ID:ConorLambert,项目名称:sql-database,代码行数:53,代码来源:utility.c


示例14: doc

void XmlParser::parseInputFile(const string& file) {
	/* Open document */
	ticpp::Document doc(file.c_str());
	try {
		/* Load document */
		doc.LoadFile();
		rootNode(doc.GetTiXmlPointer(),file);
	} catch(ticpp::Exception& ex) {
		throw(ParserError(ex.details.description + " at line " +
				toString(ex.details.line) + " in column " + toString(ex.details.column)));
	}
}
开发者ID:makeclean,项目名称:helios,代码行数:12,代码来源:XmlParser.cpp


示例15: ar

int CFormulatorDoc::paste( const QMimeData *mimeData, bool deleteOldSelection )
{
	int iRet = 0;
	if( mimeData->hasFormat( FORMULATOR_MIME_FORMAT ) )
	{
		//QByteArray mmlBinaryData = mimeData->data( FORMULATOR_MIME_FORMAT );
		QDataStream ar( mimeData->data( FORMULATOR_MIME_FORMAT ) );
		CRootNode *pNode = new CRootNode( m_owner );
		pNode->Load( ar );
		if( deleteOldSelection && rootNode()->IsSelection() )
			rootNode()->MoveDel( 0 );
		iRet = (rootNode()->Insert( pNode ) == 0 ? 1 : 0);
		delete pNode;
	}
	else if( mimeData->hasText() )
	{
		iRet = (rootNode()->InsertMathML( __FMLCORE_Product_Title, mimeData->text(), 1 ) == 0 ? 1 : 0);
	}
	//else if( mimeData->hasImage() )
	//	setPixmap(qvariant_cast<QPixmap>(mimeData->imageData()));
	return iRet;
}
开发者ID:Nilis640,项目名称:formulator-mathml,代码行数:22,代码来源:fmldocument.cpp


示例16: followRemainder

	const LLHTTPNode* followRemainder(const LLSD& remainder) const
	{
		const LLHTTPNode* node = rootNode();
		
		LLSD::array_const_iterator i = remainder.beginArray();
		LLSD::array_const_iterator end = remainder.endArray();
		for (; node  &&  i != end; ++i)
		{
			node = node->findNode(*i);
		}
		
		return node;
	}
开发者ID:Boy,项目名称:rainbow,代码行数:13,代码来源:llsdhttpserver.cpp


示例17: rootNode

bool DeviceExplorerModel::checkDeviceInstantiatable(
        Device::DeviceSettings& n)
{
    // Request from the protocol factory the protocol to see
    // if it is compatible.
    auto& context = m_devicePlugin.context().app.components;
    auto prot = context.factory<Device::DynamicProtocolList>().get(n.protocol);
    if(!prot)
        return false;

    // Look for other childs in the same protocol.
    return std::none_of(rootNode().begin(), rootNode().end(),
                       [&] (const Device::Node& child) {

        ISCORE_ASSERT(child.is<Device::DeviceSettings>());
        const auto& set = child.get<Device::DeviceSettings>();
        return (set.name == n.name)
                || (set.protocol == n.protocol
                    && !prot->checkCompatibility(n, child.get<Device::DeviceSettings>()));

    });
}
开发者ID:rperrot,项目名称:i-score,代码行数:22,代码来源:DeviceExplorerModel.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ rootObject函数代码示例发布时间:2022-05-30
下一篇:
C++ rootLayer函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap