本文整理汇总了C++中XmlElement::getBoolAttribute方法的典型用法代码示例。如果您正苦于以下问题:C++ XmlElement::getBoolAttribute方法的具体用法?C++ XmlElement::getBoolAttribute怎么用?C++ XmlElement::getBoolAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XmlElement
的用法示例。
在下文中一共展示了XmlElement::getBoolAttribute方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getImages
bool SmugMug::getImages(OwnedArray<ImageItem>& images, SmugID albumId)
{
StringPairArray params;
params.set(("AlbumID"), String(albumId.id));
params.set(("AlbumKey"), albumId.key);
params.set(("Heavy"), ("1"));
XmlElement* n = smugMugRequest(("smugmug.images.get"), params);
if (n)
{
XmlElement* a = n->getChildByName(("Album"));
if (a)
{
XmlElement* i = a->getChildByName(("Images"));
if (i)
{
XmlElement* img = i->getChildByName(("Image"));
while (img)
{
ImageItem* itm = new ImageItem();
itm->id.id = img->getIntAttribute(("id"));
itm->id.key = img->getStringAttribute(("Key"));
itm->filename = img->getStringAttribute(("FileName"));
itm->caption = img->getStringAttribute((""));
itm->keywords = img->getStringAttribute((""));
itm->position = img->getIntAttribute(("Position"));
itm->date = img->getStringAttribute(("Date"));
itm->format = img->getStringAttribute(("Format"));
itm->serial = img->getIntAttribute(("Serial"));
itm->watermark = img->getBoolAttribute(("Watermark"));
itm->size = img->getIntAttribute(("Size"));
itm->width = img->getIntAttribute(("Width"));
itm->height = img->getIntAttribute(("Height"));
itm->md5sum = img->getStringAttribute(("MD5Sum"));
itm->lastUpdated = img->getStringAttribute(("LastUpdated"));
itm->originalURL = img->getStringAttribute(("OriginalURL"));
itm->largeURL = img->getStringAttribute(("LargeURL"));
itm->mediumURL = img->getStringAttribute(("MediumURL"));
itm->smallURL = img->getStringAttribute(("SmallURL"));
itm->tinyURL = img->getStringAttribute(("TinyURL"));
itm->thumbURL = img->getStringAttribute(("ThumbURL"));
itm->albumURL = img->getStringAttribute(("AlbumURL"));
images.add(itm);
img = img->getNextElementWithTagName(("Image"));
}
}
}
delete n;
return images.size() > 0;
}
return false;
}
示例2: loadColourAttributes
bool ColouredElement::loadColourAttributes (const XmlElement& xml)
{
fillType.restoreFromString (xml.getStringAttribute ("fill", String::empty));
isStrokePresent = showOutline && xml.getBoolAttribute ("hasStroke", false);
strokeType.restoreFromString (xml.getStringAttribute ("stroke", String::empty));
strokeType.fill.restoreFromString (xml.getStringAttribute ("strokeColour", String::empty));
return true;
}
示例3: setFromXML
virtual void setFromXML(const XmlElement& inXML) override
{
// DBGM("In DecibelParameter::setFromXML(inXML) ");
XmlElement* thisXML = inXML.getChildByName(this->name);
setValue(thisXML->getDoubleAttribute("parameterValue", -9876.5));
setDefaultValue(thisXML->getDoubleAttribute("defaultValue", -9876.5));
setShouldBeSmoothed(thisXML->getBoolAttribute("isSmoothed", false));
setMinDecibels(thisXML->getDoubleAttribute("minDecibels", -9876.5));
setMaxDecibels(thisXML->getDoubleAttribute("maxDecibels", -9876.5));
setUnityDecibels(thisXML->getDoubleAttribute("unityDecibels", -9876.5));
setMidValue(thisXML->getDoubleAttribute("midValue", -9876.5));
}
示例4: loadFromXml
bool JucerDocument::loadFromXml (const XmlElement& xml)
{
if (xml.hasTagName (jucerCompXmlTag)
&& getTypeName().equalsIgnoreCase (xml.getStringAttribute ("documentType")))
{
className = xml.getStringAttribute ("className", defaultClassName);
templateFile = xml.getStringAttribute ("template", String::empty);
componentName = xml.getStringAttribute ("componentName", String::empty);
parentClasses = xml.getStringAttribute ("parentClasses", defaultParentClasses);
constructorParams = xml.getStringAttribute ("constructorParams", String::empty);
variableInitialisers = xml.getStringAttribute ("variableInitialisers", String::empty);
fixedSize = xml.getBoolAttribute ("fixedSize", false);
initialWidth = xml.getIntAttribute ("initialWidth", 300);
initialHeight = xml.getIntAttribute ("initialHeight", 200);
snapGridPixels = xml.getIntAttribute ("snapPixels", snapGridPixels);
snapActive = xml.getBoolAttribute ("snapActive", snapActive);
snapShown = xml.getBoolAttribute ("snapShown", snapShown);
componentOverlayOpacity = (float) xml.getDoubleAttribute ("overlayOpacity", 0.0);
activeExtraMethods.clear();
if (XmlElement* const methods = xml.getChildByName ("METHODS"))
forEachXmlChildElementWithTagName (*methods, e, "METHOD")
activeExtraMethods.addIfNotAlreadyThere (e->getStringAttribute ("name"));
activeExtraMethods.trim();
activeExtraMethods.removeEmptyStrings();
changed();
getUndoManager().clearUndoHistory();
return true;
}
return false;
}
示例5: loadFromXml
bool PluginDescription::loadFromXml (const XmlElement& xml)
{
if (xml.hasTagName ("PLUGIN"))
{
name = xml.getStringAttribute ("name");
descriptiveName = xml.getStringAttribute ("descriptiveName", name);
pluginFormatName = xml.getStringAttribute ("format");
category = xml.getStringAttribute ("category");
manufacturerName = xml.getStringAttribute ("manufacturer");
version = xml.getStringAttribute ("version");
fileOrIdentifier = xml.getStringAttribute ("file");
uid = xml.getStringAttribute ("uid").getHexValue32();
isInstrument = xml.getBoolAttribute ("isInstrument", false);
lastFileModTime = Time (xml.getStringAttribute ("fileTime").getHexValue64());
numInputChannels = xml.getIntAttribute ("numInputs");
numOutputChannels = xml.getIntAttribute ("numOutputs");
hasSharedContainer = xml.getBoolAttribute ("isShell", false);
return true;
}
return false;
}
示例6: 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;
}
示例7: restoreFromXml
//==============================================================================
bool KeyPressMappingSet::restoreFromXml (const XmlElement& xmlVersion)
{
if (xmlVersion.hasTagName ("KEYMAPPINGS"))
{
if (xmlVersion.getBoolAttribute ("basedOnDefaults", true))
{
// if the XML was created as a set of differences from the default mappings,
// (i.e. by calling createXml (true)), then we need to first restore the defaults.
resetToDefaultMappings();
}
else
{
// if the XML was created calling createXml (false), then we need to clear all
// the keys and treat the xml as describing the entire set of mappings.
clearAllKeyPresses();
}
forEachXmlChildElement (xmlVersion, map)
{
const CommandID commandId = map->getStringAttribute ("commandId").getHexValue32();
if (commandId != 0)
{
const KeyPress key (KeyPress::createFromDescription (map->getStringAttribute ("key")));
if (map->hasTagName ("MAPPING"))
{
addKeyPress (commandId, key);
}
else if (map->hasTagName ("UNMAPPING"))
{
for (int i = mappings.size(); --i >= 0;)
if (mappings.getUnchecked(i)->commandID == commandId)
mappings.getUnchecked(i)->keypresses.removeAllInstancesOf (key);
}
}
}
return true;
}
return false;
}