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


C++ XmlElement::getAllSubText方法代码示例

本文整理汇总了C++中XmlElement::getAllSubText方法的典型用法代码示例。如果您正苦于以下问题:C++ XmlElement::getAllSubText方法的具体用法?C++ XmlElement::getAllSubText怎么用?C++ XmlElement::getAllSubText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XmlElement的用法示例。


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

示例1: returnSpeciesName

String BirdID::returnSpeciesName(int predictedClass)
{
	XmlDocument myDocument (File ("C:/Users/Aneesh/Desktop/BirdID_Data/species.xml"));
	ScopedPointer<XmlElement> element = myDocument.getDocumentElement();

	XmlElement* speciesElement = element->getChildElement(0);
	int numSpecies = speciesElement->getAllSubText().getIntValue();
	
	speciesElement = element->getChildElement(1);
	String speciesText = speciesElement->getAllSubText();
	int startIndex = 0;
	String tempString;

	for(int i=0;i<numSpecies;i++)
	{
		int endIndex = speciesText.indexOfChar(startIndex+1,',');
		if(i==predictedClass-1)
			{
				tempString = speciesText.substring(startIndex,endIndex);
				break;
			}
		startIndex = endIndex+1;
	}

	element = nullptr;
	
	
	return tempString;
}
开发者ID:aneeshvartakavi,项目名称:birdID,代码行数:29,代码来源:BirdID.cpp

示例2: restoreFromXml

void CDPlayer::restoreFromXml(const XmlElement& element, const File& /*projectDirectory*/)
{
    setColor(Colour::fromString(element.getStringAttribute("color", "0xffffffff")));
    repaint();

    XmlElement* boundsXml = element.getChildByName("Bounds");

    if (boundsXml)
    {
        String x = boundsXml->getStringAttribute("x", "0");
        String y = boundsXml->getStringAttribute("y", "0");
        String width = boundsXml->getStringAttribute("width", "150");
        String height = boundsXml->getStringAttribute("height", "150");
        getParentComponent()->setBounds(x.getIntValue(), y.getIntValue(), width.getIntValue(), height.getIntValue());
    }
    else
    {
        XmlElement* mdiDocumentPosXml = element.getChildByName("MdiDocumentPos");
        if (mdiDocumentPosXml->getNumChildElements() > 0 && mdiDocumentPosXml->getFirstChildElement()->isTextElement())
        {
            getProperties().set("mdiDocumentPos_", mdiDocumentPosXml->getFirstChildElement()->getText());
        }
    }

    XmlElement* nameXml = element.getChildByName("Name");
    setName(nameXml->getAllSubText().trim());

    XmlElement* driveXml = element.getChildByName("Drive");
    m_availableCDsComboBox.selectDrive(driveXml->getAllSubText().trim());
}
开发者ID:ServiusHack,项目名称:MStarPlayer,代码行数:30,代码来源:CDPlayer.cpp

示例3: restoreFromXml

void SoloBusMixer::restoreFromXml(const XmlElement& element)
{
    XmlElement* leftElement = element.getChildByName("Left");
    if (leftElement)
    {
        m_leftFader.setValue(leftElement->getAllSubText().trim().getFloatValue());
    }

    XmlElement* rightElement = element.getChildByName("Left");
    if (rightElement)
    {
        m_rightFader.setValue(rightElement->getAllSubText().trim().getFloatValue());
    }
}
开发者ID:ServiusHack,项目名称:MStarPlayer,代码行数:14,代码来源:SoloBusMixer.cpp

示例4: loadPresetFromXml

void WrappedJucePlugin::loadPresetFromXml(XmlElement* element)
{
   if (instance)
   {
      XmlElement* chunk = element->getChildByName (T("juceVSTPluginData"));
      if (chunk)
      {
         MemoryBlock mb;
         mb.fromBase64Encoding (chunk->getAllSubText ());
         instance->setStateInformation (mb.getData(), mb.getSize ());
      }
   }
}
开发者ID:christianscheuer,项目名称:jivemodular,代码行数:13,代码来源:WrappedJucePlugin.cpp

示例5: loadFromXml

bool PaintElementPath::loadFromXml (const XmlElement& xml)
{
    if (xml.hasTagName (getTagName()))
    {
        position.restoreFromXml (xml, position);
        loadColourAttributes (xml);
        nonZeroWinding = xml.getBoolAttribute ("nonZeroWinding", true);

        restorePathFromString (xml.getAllSubText().trim());

        return true;
    }

    jassertfalse;
    return false;
}
开发者ID:Krewn,项目名称:LIOS,代码行数:16,代码来源:jucer_PaintElementPath.cpp

示例6: typeString

Test *Test::Create(XmlElement *xe, int input, int output, bool &ok, ProductionUnit *unit_)
{
	XmlElement *typeElement;
	Test *test = nullptr;

	typeElement = xe->getChildByName("type");
	if (typeElement)
	{
        String typeString(typeElement->getAllSubText());
        
		if (typeString == "THD+N")
			test = new ThdnTest(xe, ok, unit_);

		if (typeString == "Differential THD+N")
			test = new DiffThdnTest(xe, ok, unit_);

		if (typeString == "Dynamic range")
			test = new DynRangeTest(xe, ok, unit_);

		if (typeString == "Differential Dynamic range")
			test = new DiffDynRangeTest(xe, ok, unit_);

		if (typeString == "Frequency response")
			test = new FrequencyResponseTest(xe, ok, unit_);
    
        if (typeString == "Frequency sweep response")
            test = new FrequencySweepResponseTest(xe, ok, unit_);

		if (typeString == "Level check")
			test = new LevelCheckTest(xe, ok, unit_);
        
        if (typeString == "Relative level check")
			test = new RelativeLevelTest(xe, ok, unit_);
		
#if ECHO1394
		if (typeString == "Guitar hex input crosstalk")
			test = new HexInputCrosstalkTest(xe,ok);

		if (typeString == "Saturation")
			test = new SaturationTest(xe,ok);
#endif

		if (typeString == "Phase")
			test = new PhaseTest(xe, ok, unit_);
        
        if (typeString == "Reference voltage test")
            test = new ReferenceVoltageTest(xe, ok, unit_);
        
        if (typeString == "Silence")
            test = new SilenceTest(xe, ok, unit_);
        
        if (typeString == "Frequency isolation")
            test = new FrequencyIsolationTest(xe, ok, unit_);

		if (typeString == "USB sync")
			test = new USBSyncTest(xe, ok, unit_);
	}

	if (test)
	{
		if (test->input < 0)
			test->input = input;
		if (test->output < 0)
			test->output = input;
	}

	return test;
}
开发者ID:mattgonzalez,项目名称:ProductionTest,代码行数:68,代码来源:Test.cpp


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