void InputCell::accept(Visitor &v) { v.visitInputCellNodeBefore(this); if(hasChilds()) child()->accept(v); v.visitInputCellNodeAfter(this); if(hasNext()) next()->accept(v); }
QString XmlDomElement::getText<QString>(bool throwIfEmpty, const QString& defaultValue) const throw (Exception) { Q_UNUSED(defaultValue); Q_ASSERT(defaultValue == QString()); // defaultValue makes no sense in this method if (hasChilds()) { throw FileParseError(__FILE__, __LINE__, getDocFilePath(), -1, -1, mName, tr("A node with child elements cannot have a text.")); } if (mText.isEmpty() && throwIfEmpty) { throw FileParseError(__FILE__, __LINE__, getDocFilePath(), -1, -1, mName, tr("The node text must not be empty.")); } return mText; }