本文整理汇总了C++中XmlElement::createNewChildElement方法的典型用法代码示例。如果您正苦于以下问题:C++ XmlElement::createNewChildElement方法的具体用法?C++ XmlElement::createNewChildElement怎么用?C++ XmlElement::createNewChildElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XmlElement
的用法示例。
在下文中一共展示了XmlElement::createNewChildElement方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DumpXml
XmlElement* Track::DumpXml(int formatVersion) const
{
XmlElement* node = new XmlElement(tag::kTrack);
node->setAttribute(tag::kFileFormat, formatVersion);
node->setAttribute(tag::kName, fName);
node->setAttribute(tag::kMuted, fMuted);
node->setAttribute(tag::kSoloed, (this == fScumbler->GetSoloTrack()));
//node->setAttribute("active", this->IsActive());
node->setAttribute(tag::kInputGain, fInputGain);
node->setAttribute(tag::kPan, fPan);
node->setAttribute(tag::kOutputVolume, fOutputVolume);
node->setAttribute(tag::kChannels, static_cast<int>(this->GetEnabledChannels()));
// store the pre-loop plugins
XmlElement* preNode = node->createNewChildElement(tag::kPreBlock);
preNode->addChildElement(fPreEffects->DumpXml(formatVersion));
// !!! store the loop info
XmlElement* loopNode = node->createNewChildElement(tag::kLoop);
loopNode->setAttribute(tag::kLoopDuration, fLoop->GetLoopDuration());
loopNode->setAttribute(tag::kLoopFeedback, fLoop->GetFeedback());
LoopProcessor::LoopInfo info;
fLoop->GetLoopInfo(info);
loopNode->setAttribute(tag::kLoopPosition, info.fLoopSample);
XmlElement* postNode = node->createNewChildElement(tag::kPostBlock);
postNode->addChildElement(fPostEffects->DumpXml(formatVersion));
return node;
}
示例2: writeToXML
virtual void writeToXML(XmlElement& inXML) override
{
// DBGM("In DecibelParameter::writeToXML(inXML) ");
XmlElement* thisXML = inXML.createNewChildElement(this->name);
thisXML->setAttribute("parameterValue", getValue());
thisXML->setAttribute("defaultValue", getDefaultValue());
thisXML->setAttribute("isSmoothed", getShouldBeSmoothed());
thisXML->setAttribute("minDecibels", getMinDecibels());
thisXML->setAttribute("maxDecibels", getMaxDecibels());
thisXML->setAttribute("unityDecibels", getUnityDecibels());
thisXML->setAttribute("midValue", getMidValue());
}
示例3: saveVisualizerParameters
void SpikeDisplayCanvas::saveVisualizerParameters(XmlElement* xml)
{
XmlElement* xmlNode = xml->createNewChildElement("SPIKEDISPLAY");
xmlNode->setAttribute("LockThresholds",lockThresholdsButton->getToggleState());
xmlNode->setAttribute("InvertSpikes",invertSpikesButton->getToggleState());
for (int i = 0; i < spikeDisplay->getNumPlots(); i++)
{
XmlElement* plotNode = xmlNode->createNewChildElement("PLOT");
for (int j = 0; j < spikeDisplay->getNumChannelsForPlot(i); j++)
{
XmlElement* axisNode = plotNode->createNewChildElement("AXIS");
axisNode->setAttribute("thresh",spikeDisplay->getThresholdForWaveAxis(i,j));
axisNode->setAttribute("range",spikeDisplay->getRangeForWaveAxis(i,j));
}
}
}
示例4: prepareExporter
void prepareExporter (ProjectExporter& exporter) const
{
exporter.xcodeIsBundle = true;
exporter.xcodeCreatePList = true;
exporter.xcodeFileType = "wrapper.cfbundle";
exporter.xcodeBundleExtension = ".plugin";
exporter.xcodeProductType = "com.apple.product-type.bundle";
exporter.xcodeProductInstallPath = "$(HOME)/Library/Internet Plug-Ins//";
{
XmlElement mimeTypesKey ("key");
mimeTypesKey.setText ("WebPluginMIMETypes");
XmlElement mimeTypesEntry ("dict");
const String exeName (exporter.getProject().getProjectFilenameRoot().toLowerCase());
mimeTypesEntry.createNewChildElement ("key")->setText ("application/" + exeName + "-plugin");
XmlElement* d = mimeTypesEntry.createNewChildElement ("dict");
d->createNewChildElement ("key")->setText ("WebPluginExtensions");
d->createNewChildElement ("array")
->createNewChildElement ("string")->setText (exeName);
d->createNewChildElement ("key")->setText ("WebPluginTypeDescription");
d->createNewChildElement ("string")->setText (exporter.getProject().getTitle());
exporter.xcodeExtraPListEntries.add (mimeTypesKey);
exporter.xcodeExtraPListEntries.add (mimeTypesEntry);
}
exporter.msvcTargetSuffix = ".dll";
exporter.msvcIsDLL = true;
exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", "");
exporter.makefileIsDLL = true;
}
示例5: saveStateToXml
void ProcessorList::saveStateToXml(XmlElement* xml)
{
XmlElement* processorListState = xml->createNewChildElement("PROCESSORLIST");
for (int i = 0; i < 5; i++)
{
XmlElement* colorState = processorListState->createNewChildElement("COLOR");
int id;
switch (i)
{
case 0:
id = PROCESSOR_COLOR;
break;
case 1:
id = SOURCE_COLOR;
break;
case 2:
id = FILTER_COLOR;
break;
case 3:
id = SINK_COLOR;
break;
case 4:
id = UTILITY_COLOR;
break;
default:
// do nothing
;
}
Colour c = findColour(id);
colorState->setAttribute("ID", (int) id);
colorState->setAttribute("R", (int) c.getRed());
colorState->setAttribute("G", (int) c.getGreen());
colorState->setAttribute("B", (int) c.getBlue());
}
}
示例6: saveStateToXml
void ControlPanel::saveStateToXml(XmlElement* xml)
{
XmlElement* controlPanelState = xml->createNewChildElement("CONTROLPANEL");
controlPanelState->setAttribute("isOpen",open);
controlPanelState->setAttribute("recordPath", filenameComponent->getCurrentFile().getFullPathName());
controlPanelState->setAttribute("prependText",prependText->getText());
controlPanelState->setAttribute("appendText",appendText->getText());
controlPanelState->setAttribute("recordEngine",recordSelector->getSelectedId());
audioEditor->saveStateToXml(xml);
XmlElement* recordEnginesState = xml->createNewChildElement("RECORDENGINES");
for (int i=0; i < recordEngines.size(); i++)
{
XmlElement* reState = recordEnginesState->createNewChildElement("ENGINE");
reState->setAttribute("id",recordEngines[i]->getID());
reState->setAttribute("name",recordEngines[i]->getName());
recordEngines[i]->saveParametersToXml(reState);
}
}
示例7: writeToXML
void ZenTime::writeToXML(XmlElement& inXML)
{
// DBG("In ZenParameter::writeToXML(inXML) ");
XmlElement* thisXML = inXML.createNewChildElement(paramID);
thisXML->setAttribute("valueInMS", (int)getValueInMS());
}