本文整理汇总了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;
}
示例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;
}
示例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 "";
}
}
示例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);
}
示例5: Delete
void CTopologyNodeList::Delete (CTopologyNode *pNode)
// Delete
//
// Delete the given node
{
int iIndex;
if (FindNode(pNode, &iIndex))
m_List.Delete(iIndex);
}
示例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));
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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 );
}
示例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 );
}
}
}
}
示例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;
}
示例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();
}