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


C++ FindNode函数代码示例

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


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

示例1: FindNode

CTSTR LocaleStringLookup::LookupString(CTSTR lookupVal)
{
    StringLookupNode *child = FindNode(lookupVal);
    if(!child)
        return TEXT("(string not found)");

    if(!child->leaf)
        return TEXT("(lookup error)");

    return child->leaf->strValue;
}
开发者ID:373137461,项目名称:OBS,代码行数:11,代码来源:XTLocalization.cpp

示例2: FindNode

VOID Map<K,V,KeyElementTraits, ValueElementTraits, ThreadingModel>::Add( CONST K& Key, CONST V& Value )
{
	Node* pNode = FindNode(Key);
	if( pNode == 0 )
  {
    m_NodeCount++;
		Insert( Key, Value );
  }
  else
		pNode->m_Value = Value;
}
开发者ID:anareboucas,项目名称:nanook,代码行数:11,代码来源:MapImpl.hpp

示例3: FindNode

string XMLFile::Get( const string& path ) {
	xmlNodePtr cur;

	// Look for the Node
	cur = FindNode( path );
	if( cur ) { // Found the path
		return NodeToString(xmlPtr,cur);;
	} else {
		return "";
	}
}
开发者ID:akollias,项目名称:Epiar,代码行数:11,代码来源:xml.cpp

示例4: time

MySensorsBase::_tMySensorNode* MySensorsBase::InsertNode(const int nodeID)
{
	_tMySensorNode mNode;
	mNode.nodeID = nodeID;
	mNode.SketchName = "Unknown";
	mNode.SketchVersion = "1.0";
	mNode.lastreceived = time(NULL);
	m_nodes[mNode.nodeID] = mNode;
	Add2Database(mNode.nodeID, mNode.SketchName, mNode.SketchVersion);
	return FindNode(nodeID);
}
开发者ID:saeedhadi,项目名称:domoticz,代码行数:11,代码来源:MySensorsBase.cpp

示例5: Delete

void CTopologyNodeList::Delete (CTopologyNode *pNode)

//	Delete
//
//	Delete the given node

	{
	int iIndex;
	if (FindNode(pNode, &iIndex))
		m_List.Delete(iIndex);
	}
开发者ID:Sdw195,项目名称:Transcendence,代码行数:11,代码来源:CTopologyNodeList.cpp

示例6: LogMsg

void XMLFile::Set( const string& path, const int value ) {
	// Convert the int to a string before saving it.
	string stringvalue;
	stringstream val_ss;
	val_ss << value;
	val_ss >> stringvalue;
	LogMsg(INFO,"Overriding Option['%s'] from '%s' to '%s'",path.c_str(),Get(path).c_str(),stringvalue.c_str());
	xmlNodePtr p =  FindNode(path,true);
	xmlNodeSetContent(p, BAD_CAST stringvalue.c_str() );
	assert( stringvalue == Get(path));
}
开发者ID:markettwp,项目名称:Epiar,代码行数:11,代码来源:xml.cpp

示例7: FindNode

BOOL Set<K,ElementTraits>::Remove( CONST K& Key )
{
	Node* pNode = FindNode(Key);
	
	if (pNode == 0)
		return false;

  m_NodeCount--;
	Delete(pNode);
	return true;
}
开发者ID:anareboucas,项目名称:nanook,代码行数:11,代码来源:SetImpl.hpp

示例8: FindValue

Node* FindValue(HashTable* hashTable, char* key)
{
    if(hashTable != NULL)
    {
        int hashOffset = GenerateHash((char*)key) % hashTable->totalBucketCount;
        if(hashTable->nodeTable[hashOffset] != NULL)
        {
            return FindNode(hashTable->nodeTable[hashOffset], key);
        }
    }
    return NULL;
}
开发者ID:sefbkn,项目名称:Randoms,代码行数:12,代码来源:HashTable.cpp

示例9: FindNode

//-----------------------------------------------------------------------------
bool ConicModel::Read(TiXmlNode* node)
{
    TiXmlNode* sensor = FindNode(node,"sensor");
    TiXmlNode* image_size =  FindNode(sensor,"image_size");
    m_width = ReadNodeAs<unsigned int>(image_size,"width");
    m_height= ReadNodeAs<unsigned int>(image_size,"height");

    TiXmlNode* ppa = FindNode(sensor,"ppa");
    m_cPPA = ReadNodeAs<double>(ppa,"c");
    m_lPPA = ReadNodeAs<double>(ppa,"l");
    m_focal= ReadNodeAs<double>(ppa,"focale");

    TiXmlNode* disto = FindNode(sensor,"distortion");
    if(m_distortion) delete m_distortion;
    if(disto)
    {
        m_distortion = new DistortionPolynom;
        m_distortion->Read(disto);
    }
    return true;
}
开发者ID:IGNF,项目名称:libOri,代码行数:22,代码来源:ConicModel.cpp

示例10: FindNode

SpatialGraphKDNode* SpatialGraph::FindNode(SpatialGraphKDNode* node, const BoundingBox& bbox)
{
	if (node == NULL)
		return NULL;
	//check if this bbox fits entirely within our node
	if (node->BBox.Contains(bbox) == Within)
	{
		//Check our children
		SpatialGraphKDNode* retVal = FindNode(node->LHC, bbox );
		if (retVal != NULL)
			return retVal;
		retVal = FindNode(node->RHC, bbox);
		if( retVal != NULL )
			return retVal;

		//otherwise, return ourselves
		return node;

	}
	return NULL;
}
开发者ID:MrSnowman,项目名称:angel2d,代码行数:21,代码来源:SpatialGraph.cpp

示例11: FullFindNode

node* FullFindNode(HWND hwnd)
{
  unsigned short tag;
  node *found;

  for (tag=0; tag<TAGS; tag++) {
    found = FindNode(hwnd, tag);
    if (found) return found;
  }

  return NULL;
}
开发者ID:Jasu,项目名称:HashTWM,代码行数:12,代码来源:main.c

示例12: GetKiCadLayer

void PCB_TEXT::Parse( XNODE*        aNode,
                      int           aLayer,
                      wxString      aDefaultMeasurementUnit,
                      wxString      aActualConversion )
{
    XNODE*      lNode;
    wxString    str;

    m_PCadLayer     = aLayer;
    m_KiCadLayer    = GetKiCadLayer();
    m_positionX     = 0;
    m_positionY     = 0;
    m_name.mirror   = 0;    // Normal, not mirrored
    lNode = FindNode( aNode, wxT( "pt" ) );

    if( lNode )
        SetPosition( lNode->GetNodeContent(), aDefaultMeasurementUnit,
                     &m_positionX, &m_positionY, aActualConversion );

    lNode = FindNode( aNode, wxT( "rotation" ) );

    if( lNode )
    {
        str = lNode->GetNodeContent();
        str.Trim( false );
        m_rotation = StrToInt1Units( str );
    }

    aNode->GetAttribute( wxT( "Name" ), &m_name.text );

    str = FindNodeGetContent( aNode, wxT( "isFlipped" ) );

    if( str == wxT( "True" ) )
        m_name.mirror = 1;

    lNode = FindNode( aNode, wxT( "textStyleRef" ) );

    if( lNode )
        SetFontProperty( lNode, &m_name, aDefaultMeasurementUnit, aActualConversion );
}
开发者ID:Caerbannog,项目名称:kicad-git-bzr,代码行数:40,代码来源:pcb_text.cpp

示例13: SetFontProperty

void SetFontProperty( XNODE*        aNode,
                      TTEXTVALUE*   aTextValue,
                      wxString      aDefaultMeasurementUnit,
                      wxString      aActualConversion )
{
    wxString n, propValue;

    aNode->GetAttribute( wxT( "Name" ), &n );

    while( aNode->GetName() != wxT( "www.lura.sk" ) )
        aNode = aNode->GetParent();

    aNode = FindNode( aNode, wxT( "library" ) );

    if( aNode )
        aNode = FindNode( aNode, wxT( "textStyleDef" ) );

    if( aNode )
    {
        while( true )
        {
            aNode->GetAttribute( wxT( "Name" ), &propValue );
            propValue.Trim( false );
            propValue.Trim( true );

            if( propValue == n )
                break;

            aNode = aNode->GetNext();
        }

        if( aNode )
        {
            aNode = FindNode( aNode, wxT( "font" ) );

            if( aNode )
            {
                if( FindNode( aNode, wxT( "fontHeight" ) ) )
                    // // SetWidth(iNode.ChildNodes.FindNode('fontHeight').Text,
                    // //          DefaultMeasurementUnit,tv.TextHeight);
                    // Fixed By Lubo, 02/2008
                    SetHeight( FindNode( aNode, wxT(
                                             "fontHeight" ) )->GetNodeContent(),
                               aDefaultMeasurementUnit, &aTextValue->textHeight,
                               aActualConversion );

                if( FindNode( aNode, wxT( "strokeWidth" ) ) )
                    SetWidth( FindNode( aNode, wxT(
                                            "strokeWidth" ) )->GetNodeContent(),
                              aDefaultMeasurementUnit, &aTextValue->textstrokeWidth,
                              aActualConversion );
            }
        }
    }
}
开发者ID:kinnison,项目名称:kicad-source-mirror,代码行数:55,代码来源:pcad2kicad_common.cpp

示例14: DelData

/**************************************************************************
	//Function:			DelData
	//Description:		根据关键字删除一条记录
	//Calls:
	//Called by:
	//Input:
						tKey				记录关键字
	//Output:
	//Return:
						返回值				说明
						0					成功
						负值				失败
	//Others:
	//Author:	fanyh	Email: [email protected]
	//Date:		2008-06-16
	**************************************************************************/
int
DelData(CMiniCache *cache, map_key_t tKey)
{
  pthread_mutex_lock(&cache->lock);

  CMiniCacheNode *pOldNode = NULL;
  if(0==FindNode(cache, tKey, &pOldNode)) {
    DelNode(cache, pOldNode, 1);
  }

  pthread_mutex_unlock(&cache->lock);
  return 0;
}
开发者ID:tanec,项目名称:fcache,代码行数:29,代码来源:CMiniCache.c

示例15: GUIObject

GUIProgressBar::GUIProgressBar(xml_node<>* node) : GUIObject(node)
{
	xml_attribute<>* attr;
	xml_node<>* child;

	mEmptyBar = NULL;
	mFullBar = NULL;
	mLastPos = 0;
	mSlide = 0.0;
	mSlideInc = 0.0;

	if (!node)
	{
		LOGERR("GUIProgressBar created without XML node\n");
		return;
	}

	child = FindNode(node, "resource");
	if (child)
	{
		mEmptyBar = LoadAttrImage(child, "empty");
		mFullBar = LoadAttrImage(child, "full");
	}

	// Load the placement
	LoadPlacement(FindNode(node, "placement"), &mRenderX, &mRenderY);

	// Load the data
	child = FindNode(node, "data");
	if (child)
	{
		mMinValVar = LoadAttrString(child, "min");
		mMaxValVar = LoadAttrString(child, "max");
		mCurValVar = LoadAttrString(child, "name");
	}

	mRenderW = mEmptyBar->GetWidth();
	mRenderH = mEmptyBar->GetHeight();
}
开发者ID:AntaresOne,项目名称:MultiROM-TWRP,代码行数:39,代码来源:progressbar.cpp


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