本文整理汇总了C++中wxXmlNode::GetChildren方法的典型用法代码示例。如果您正苦于以下问题:C++ wxXmlNode::GetChildren方法的具体用法?C++ wxXmlNode::GetChildren怎么用?C++ wxXmlNode::GetChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxXmlNode
的用法示例。
在下文中一共展示了wxXmlNode::GetChildren方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
DeleteChild(wxXmlNode& node, wxXmlNodeType type)
{
wxXmlNode *child = node.GetChildren();
while (child != NULL)
{
if (child->GetType() == type)
{
node.RemoveChild(child);
DESTROY(child);
return;
}
child = child->GetNext();
}
}
示例2: Compile
void
MethodVarParse::Deserialize(const wxXmlNode& root)
{
m_pattern = root.GetNodeContent();
m_source = Compile(m_pattern);
wxXmlNode *child = root.GetChildren();
while (child != NULL)
{
if (child->GetType() == wxXML_TEXT_NODE || child->GetType() == wxXML_CDATA_SECTION_NODE)
{
break;
}
child = child->GetNext();
}
child->SetContent(m_source);
MethodLua::Deserialize(root);
child->SetContent(m_pattern);
}
示例3: ParseXmlNode
void TwitterUser::ParseXmlNode(const wxXmlNode& node)
{
wxXmlNode *child = node.GetChildren();
while (child) {
const wxString& tagName = child->GetName();
wxString value = child->GetNodeContent();
if (tagName == _T("id")) {
id = strtoull(value.mb_str(), NULL, 10);
// value.ToULongLong(&id); (GCC doesn't like this)
}
else if (tagName == _T("name")) {
name = value;
}
else if (tagName == _T("screen_name")) {
screen_name = value;
}
else if (tagName == _T("description")) {
description = value;
}
else if (tagName == _T("location")) {
location = value;
}
else if (tagName == _T("profile_image_url")) {
profile_image_url = value;
}
else if (tagName == _T("url")) {
url = value;
}
else if (tagName == _T("protected")) {
protected_ = value == _T("true") ? true : false;
}
else if (tagName == _T("followers_count")) {
value.ToULong(&followers_count);
}
child = child->GetNext();
}
}
示例4: fullAnatPath
SelectionVOI::SelectionVOI( const wxXmlNode selObjNode, const wxString &rootPath )
: SelectionObject( selObjNode ),
m_voiSize( 0 ),
m_generationThreshold( 0.0f ),
m_thresType( THRESHOLD_INVALID ),
m_pIsoSurface( NULL ),
m_sourceAnatIndex( 0 )
{
m_objectType = VOI_TYPE;
wxXmlNode *pChildNode = selObjNode.GetChildren();
while( pChildNode != NULL )
{
wxString nodeName = pChildNode->GetName();
wxString propVal;
if( nodeName == wxT("voi_properties") )
{
double temp;
pChildNode->GetAttribute( wxT("gen_threshold"), &propVal );
propVal.ToDouble(&temp);
m_generationThreshold = temp;
pChildNode->GetAttribute( wxT("thres_op_type"), &propVal );
m_thresType = Helper::getThresholdingTypeFromString( propVal );
wxXmlNode *pAnatNode = pChildNode->GetChildren();
if( pAnatNode->GetName() == wxT("generation_anatomy") )
{
wxString anatPath = pAnatNode->GetNodeContent();
// Get full path, since this is how it is stored in the dataset.
wxFileName fullAnatPath( rootPath + wxFileName::GetPathSeparator() + anatPath );
// Find the anatomy related to this file.
vector< Anatomy* > anats = DatasetManager::getInstance()->getAnatomies();
for( vector< Anatomy* >::iterator anatIt( anats.begin() ); anatIt != anats.end(); ++anatIt )
{
if( (*anatIt)->getPath() == fullAnatPath.GetFullPath() )
{
m_sourceAnatIndex = (*anatIt)->getDatasetIndex();
break;
}
}
if( !m_sourceAnatIndex.isOk() )
{
wxString err( wxT("Anatomy: ") );
err << anatPath << wxT(" does not exist when creating VOI called: ") << getName() << wxT(".");
throw err;
}
Anatomy *pCurAnat = dynamic_cast< Anatomy* >( DatasetManager::getInstance()->getDataset( m_sourceAnatIndex ) );
buildSurface( pCurAnat );
}
}
pChildNode = pChildNode->GetNext();
}
}