本文整理汇总了C++中FindNode函数的典型用法代码示例。如果您正苦于以下问题:C++ FindNode函数的具体用法?C++ FindNode怎么用?C++ FindNode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FindNode函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: FindNode
int Trees::BuildTree(int start, int end, Node* &proot, Node* parent)
{
int tmp = 0;
proot = NodesofTheTrees[CurTree]->at(start);
proot->Parent = parent;
tmp = FindNode(start+2,end,proot->Depth+1);
if(tmp != -1)
{
BuildTree(start+1, tmp-1, proot->LeftC, proot);
BuildTree(tmp, end, proot->RightC, proot);
}
return 0;
}
开发者ID:JiehuaChen,项目名称:Ethiopia-geostat,代码行数:13,代码来源:Trees.cpp
示例17: Trie_Get
unsigned long Trie_Get(TTrie *hTrie, unsigned long key)
{
LOG("[%s():%d] key=%08X\n", __func__, __LINE__, key);
assert(hTrie->isDead == false);
TNode *root = hTrie->root;
const unsigned int dir = key & 0x1;
assert(root->childNode[dir] != NULL);
TNode *node = FindNode(root->childNode[dir], key, KEY_LEN);
assert(node != NULL);
return node->value;
}
开发者ID:ryochack,项目名称:Patricia_Trie,代码行数:13,代码来源:PatriciaTrie.c
示例18: FindNode
void BomKeyNode::addComponent(MapNode *pNode) {
MapNode *mn;
KeyValNode *kvn;
StringNode *svn;
mn = FindNode(pNode, "pid");
if(mn->nodeType() == 2) {
kvn = (KeyValNode *) mn;
svn = (StringNode*) kvn->value();
//printf("Bom: %s\n", svn->value());
buildItem(svn->value(),(KeyValNode*) pNode);
}
mList->append(pNode);
}
开发者ID:vxmdesign,项目名称:gvxm,代码行数:13,代码来源:BomKeyNode.cpp
示例19: ASSERT
BOOL CTxParamString::SetSubNodeString( LPCTSTR szRoot, CTxParamString& subParamIn )
{
if (!subParamIn.m_bInited)
{
ASSERT(FALSE);
return FALSE;
}
BOOL bRet = FALSE;
if (szRoot == NULL)
{
//return all
m_kvData = subParamIn.m_kvData;
m_bInited = TRUE;
bRet = TRUE;
}
else
{
std::vector<std::string> vOut;
SplitteStrings(szRoot, vOut, '\\');
if (vOut.size() == 0 || vOut[0].compare(".") != 0)
{
_RPT1(0, TEXT("path not illegual, %s"), szRoot);
}
else
{
VECSTRINGS tmpPath;
for (size_t i = 0; i < vOut.size(); ++i)
{
tmpPath.push_back(vOut[i].c_str());
}
ST_MARKITEM* pItem =FindNode(tmpPath);
if (pItem)
{
MAPKEYVALUE& mapchild = pItem->mapChildItem;
MAPKEYVALUE& subChild = subParamIn.m_kvData.mapChildItem;
MAPKEYVALUE::iterator itcb = subChild.begin();
MAPKEYVALUE::iterator itce = subChild.end();
for (; itcb != itce; ++itcb)
{
mapchild[itcb->first] = itcb->second;
}
m_bInited = TRUE;
bRet = TRUE;
}
}
}
return bRet;
}
开发者ID:tianyx,项目名称:TxUIProject,代码行数:51,代码来源:TxParamString.cpp
示例20: FindNode
void ERSHdrNode::Set( const char *pszPath, const char *pszValue )
{
CPLString osPath = pszPath;
size_t iDot = osPath.find_first_of('.');
/* -------------------------------------------------------------------- */
/* We have an intermediate node, find or create it and */
/* recurse. */
/* -------------------------------------------------------------------- */
if( iDot != std::string::npos )
{
CPLString osPathFirst = osPath.substr(0,iDot);
CPLString osPathRest = osPath.substr(iDot+1);
ERSHdrNode *poFirst = FindNode( osPathFirst );
if( poFirst == nullptr )
{
poFirst = new ERSHdrNode();
MakeSpace();
papszItemName[nItemCount] = CPLStrdup(osPathFirst);
papszItemValue[nItemCount] = nullptr;
papoItemChild[nItemCount] = poFirst;
nItemCount++;
}
poFirst->Set( osPathRest, pszValue );
return;
}
/* -------------------------------------------------------------------- */
/* This is the final item name. Find or create it. */
/* -------------------------------------------------------------------- */
for( int i = 0; i < nItemCount; i++ )
{
if( EQUAL(osPath,papszItemName[i])
&& papszItemValue[i] != nullptr )
{
CPLFree( papszItemValue[i] );
papszItemValue[i] = CPLStrdup( pszValue );
return;
}
}
MakeSpace();
papszItemName[nItemCount] = CPLStrdup(osPath);
papszItemValue[nItemCount] = CPLStrdup(pszValue);
papoItemChild[nItemCount] = nullptr;
nItemCount++;
}
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:51,代码来源:ershdrnode.cpp
注:本文中的FindNode函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论