Brief description of class still missing. More...
#include <XMLSaveAttributes.h>
Public Member Functions | |
| QString & | add (QString key, QString value=QString::null) |
| void | clear () |
| bool | isEmpty () const |
| bool | isSimilar (const XMLSaveAttributes &o) const |
| const QString & | key (int index) const |
| QString & | key (int index) |
| bool | operator== (const XMLSaveAttributes &o) const |
| QString | toEncodedString () const |
| QString | toString () const |
| const QString & | value (int index) const |
| QString & | value (int index) |
| QString | value (const QString &key) |
| XMLSaveAttributes () | |
| XMLSaveAttributes (const XMLSaveAttributes &o) | |
Brief description of class still missing.
Full description of class still missing
| QGpCoreTools::XMLSaveAttributes::XMLSaveAttributes | ( | ) | [inline] |
{}
| QGpCoreTools::XMLSaveAttributes::XMLSaveAttributes | ( | const XMLSaveAttributes & | o | ) | [inline] |
: QList<XMLSaveAttribute>(o) {}
| QString & QGpCoreTools::XMLSaveAttributes::add | ( | QString | key, |
| QString | value = QString::null |
||
| ) | [inline] |
Add key associated to value in the list of attributes. It returns a reference to the value, usefull if a null value is passed for future modifications.
Referenced by GeopsyCore::TimePick::writeProperties(), GeopsyCore::MetaArray< valueType >::writeProperties(), QGpCoreTools::XMLGenericItem::xml_setAttributes(), GeopsyCore::XMLSubSignalPool::xml_writeChildren(), GeopsyCore::SharedMetaData::xml_writeChildren(), SciFigs::XMLSciFigs::xml_writeChildren(), QGpCoreWave::AutocorrCurves::xml_writeChildren(), GeopsyGui::TimeWindowLayer::xml_writeChildren(), QGpCompatibility::CompatModalCurves::xml_writeChildren(), SciFigs::AxisWindow::xml_writeChildren(), DinverDCCore::TargetList::xml_writeChildren(), DinverDCCore::ParamProfile::xml_writeChildren(), SciFigs::LineLayer::xml_writeChildren(), QGpCoreTools::ColumnTextParser::xml_writeChildren(), QGpCompatibility::CompatDataPointVector::xml_writeChildren(), QGpCompatibility::CompatVDataPointVector::xml_writeChildren(), SciFigs::GraphicSheet::xml_writeChildren(), SciFigs::GraphContent::xml_writeChildren(), GeopsyCore::MetaData::xml_writeLink(), QGpCoreTools::XMLMap< Key, T >::xml_writeProperties(), GeopsyGui::PickFormat::xml_writeProperties(), GeopsyCore::SharedMetaData::xml_writeProperties(), GeopsyCore::AsciiSignalFormatRule::xml_writeProperties(), and GeopsyGui::SignalLayer::xml_writeProperties().
| void QGpCoreTools::XMLSaveAttributes::clear | ( | ) | [inline] |
| bool QGpCoreTools::XMLSaveAttributes::isEmpty | ( | ) | const [inline] |
Referenced by QGpCoreTools::XMLGenericItem::find().
{return QList<XMLSaveAttribute>::isEmpty();}
| bool QGpCoreTools::XMLSaveAttributes::isSimilar | ( | const XMLSaveAttributes & | o | ) | const |
Returns true if it has all attributes of o. If o has no values for keys only the existence of the keys is checked (the values are not considered).
References TRACE.
Referenced by QGpCoreTools::XMLGenericItem::find().
{
TRACE;
// Cache available keys in a map
QMap<QString, QString> map;
for(const_iterator it=begin(); it!=end();it++) {
map.insert(it->key(), it->value());
}
QMap<QString, QString>::iterator itmap;
for(const_iterator it=o.begin(); it!=o.end();it++) {
itmap=map.find(it->key());
if(itmap==map.end() || ( !it->value().isEmpty() && itmap.value()!=it->value())) {
return false;
}
}
return true;
}
| const QString& QGpCoreTools::XMLSaveAttributes::key | ( | int | index | ) | const [inline] |
Referenced by value().
{return (*this)[index].key();}
| QString& QGpCoreTools::XMLSaveAttributes::key | ( | int | index | ) | [inline] |
{return (*this)[index].key();}
| bool QGpCoreTools::XMLSaveAttributes::operator== | ( | const XMLSaveAttributes & | o | ) | const [inline] |
{return QList<XMLSaveAttribute>::operator==(o);}
| QString QGpCoreTools::XMLSaveAttributes::toEncodedString | ( | ) | const [inline] |
References QGpCoreTools::XMLClass::saveSpecChar().
Referenced by QGpCoreTools::XMLClass::writeChildren(), and QGpCoreTools::XMLClass::xml_save().
{
QString tmp;
for(const_iterator it=begin();it!=end();it++) {
tmp += " ";
tmp += it->key();
tmp += "=\"";
tmp += XMLClass::saveSpecChar(it->value());
tmp += "\"";
}
return tmp;
}
| QString QGpCoreTools::XMLSaveAttributes::toString | ( | ) | const |
References TRACE.
Referenced by QGpGuiTools::XMLItem::data().
{
TRACE;
QString tmp;
for(const_iterator it=begin();it!=end();it++) {
tmp += " ";
tmp += it->key();
tmp += "=\"";
tmp += it->value();
tmp += "\"";
}
return tmp;
}
| const QString& QGpCoreTools::XMLSaveAttributes::value | ( | int | index | ) | const [inline] |
Referenced by GeopsyCore::TimePick::writeProperties(), GeopsyGui::TimeWindowLayer::xml_writeChildren(), QGpCoreTools::XMLMap< Key, T >::xml_writeProperties(), and GeopsyGui::SignalLayer::xml_writeProperties().
{return (*this)[index].value();}
| QString& QGpCoreTools::XMLSaveAttributes::value | ( | int | index | ) | [inline] |
{return (*this)[index].value();}
| QString QGpCoreTools::XMLSaveAttributes::value | ( | const QString & | key | ) |