12#include <QXmlStreamReader>
13#include <QXmlStreamWriter>
23 <<
" pointCount=" << m_pointIdentifiers.count();
25 return m_pointIdentifiers.contains (pointIdentifier);
30 return m_pointIdentifiers.count();
37 QList<QString> keys = m_pointIdentifiers.keys();
46 return m_pointIdentifiers [pointIdentifier];
56 if (reader.atEnd() || reader.hasError ()) {
61 if ((reader.tokenType() == QXmlStreamReader::EndElement) &&
67 if ((reader.tokenType() == QXmlStreamReader::StartElement) &&
71 QXmlStreamAttributes attributes = reader.attributes();
81 m_pointIdentifiers [identifier] = value;
87 reader.raiseError (QObject::tr (
"Cannot read point identifiers"));
94 PointIdentifiersInternal::const_iterator itr;
95 for (itr = m_pointIdentifiers.begin(); itr != m_pointIdentifiers.end (); itr++) {
96 QString identifier = itr.key();
97 bool value = itr.value();
102 writer.writeEndElement();
104 writer.writeEndElement();
110 m_pointIdentifiers [pointIdentifier] = value;
const QString DOCUMENT_SERIALIZE_POINT_IDENTIFIERS
const QString DOCUMENT_SERIALIZE_POINT_IDENTIFIER
const QString DOCUMENT_SERIALIZE_POINT_IDENTIFIER_VALUE
const QString DOCUMENT_SERIALIZE_POINT_IDENTIFIER_NAME
const QString DOCUMENT_SERIALIZE_BOOL_TRUE
const QString DOCUMENT_SERIALIZE_BOOL_FALSE
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT.
log4cpp::Category * mainCat
QXmlStreamReader::TokenType loadNextFromReader(QXmlStreamReader &reader)
Load next token from xml reader.
bool contains(const QString &pointIdentifier) const
True if specified entry exists in the table.
PointIdentifiers()
Single constructor.
QString getKey(int i) const
Get key for index.
void loadXml(QXmlStreamReader &reader)
Load from serialized xml.
int count() const
Number of entries.
bool getValue(const QString &pointIdentifier) const
Get value for key.
void setKeyValue(const QString &pointIdentifier, bool value)
Set key/value pair.
void saveXml(QXmlStreamWriter &writer) const
Serialize table to xml.
#define LOG4CPP_DEBUG_S(logger)