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


C++ wxXmlNode::GetChildren方法代码示例

本文整理汇总了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();
		}
	}
开发者ID:nocturnal,项目名称:FragmentShader,代码行数:15,代码来源:xml.cpp

示例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);
}
开发者ID:nocturnal,项目名称:FragmentShader,代码行数:18,代码来源:method.cpp

示例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();
	}
}
开发者ID:lsegal,项目名称:Twittle,代码行数:38,代码来源:twitter_user.cpp

示例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();
    }
}
开发者ID:aminvafaei,项目名称:fibernavigator,代码行数:61,代码来源:SelectionVOI.cpp


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