bool KEduVocKvtml2Reader::readPersonalPronoun(QDomElement & pronounElement, KEduVocPersonalPronoun & pronoun)
{
+ pronoun.setMaleFemaleDifferent(!pronounElement.firstChildElement(
+ KVTML_THIRD_PERSON_MALE_FEMALE_DIFFERENT).isNull());
+ pronoun.setNeuterExists( !pronounElement.firstChildElement(
+ KVTML_THIRD_PERSON_NEUTER_EXISTS).isNull() );
+ pronoun.setDualExists( !pronounElement.firstChildElement(
+ KVTML_DUAL_EXISTS).isNull() );
+
QDomElement personElement = pronounElement.firstChildElement( KVTML_SINGULAR );
if ( !personElement.isNull() ) {
readPersonalPronounChild( personElement, pronoun, KEduVocConjugation::Singular );
currentElement = personElement.firstChildElement( KVTML_THIRD_NEUTER_COMMON );
pronoun.setPersonalPronoun( currentElement.text(),
KEduVocConjugation::ThirdNeuterCommon, number );
-
- if ( !personElement.firstChildElement(KVTML_THIRD_PERSON_MALE_FEMALE_DIFFERENT).isNull() ){
- pronoun.setMaleFemaleDifferent(true);
- if ( !personElement.firstChildElement(KVTML_THIRD_PERSON_NEUTER_EXISTS).isNull() ){
- pronoun.setNeuterExists(true);
- } else {
- pronoun.setNeuterExists(false);
- }
- } else {
- pronoun.setMaleFemaleDifferent(false);
- pronoun.setNeuterExists(false);
- }
}
if ( pronoun.neuterExists() ) {
pronounElement.appendChild( m_domDoc.createElement( KVTML_THIRD_PERSON_NEUTER_EXISTS ) );
}
+ if ( pronoun.dualExists() ) {
+ pronounElement.appendChild( m_domDoc.createElement( KVTML_DUAL_EXISTS ) );
+ }
for ( KEduVocConjugation::ConjugationNumber num = KEduVocConjugation::Singular; num < KEduVocConjugation::NumberMAX; num = KEduVocConjugation::ConjugationNumber(num +1) ) {
QString first = pronoun.personalPronoun(
bool m_maleFemaleDifferent;
bool m_neuterExists;
+ bool m_dualExists;
QMap<int, QString> m_personalpronouns;
};
{
m_maleFemaleDifferent = false;
m_neuterExists = false;
+ m_dualExists = false;
}
KEduVocPersonalPronoun::KEduVocPersonalPronoun()
d->m_maleFemaleDifferent = other.d->m_maleFemaleDifferent;
d->m_neuterExists = other.d->m_neuterExists;
d->m_personalpronouns = other.d->m_personalpronouns;
+ d->m_dualExists = other.d->m_dualExists;
}
d->m_maleFemaleDifferent = other.d->m_maleFemaleDifferent;
d->m_neuterExists = other.d->m_neuterExists;
d->m_personalpronouns = other.d->m_personalpronouns;
+ d->m_dualExists = other.d->m_dualExists;
return *this;
}
+
bool KEduVocPersonalPronoun::operator ==(const KEduVocPersonalPronoun& other) const
{
return d->m_personalpronouns == other.d->m_personalpronouns &&
d->m_maleFemaleDifferent == other.d->m_maleFemaleDifferent &&
d->m_neuterExists == other.d->m_neuterExists;
+ d->m_dualExists == other.d->m_dualExists;
}
{
d->m_neuterExists = exists;
}
+
+bool KEduVocPersonalPronoun::dualExists() const
+{
+ return d->m_dualExists;
+}
+
+void KEduVocPersonalPronoun::setDualExists(bool exists)
+{
+ d->m_dualExists = exists;
+}
+
bool neuterExists() const;
void setNeuterExists(bool exists);
+
+ bool dualExists() const;
+ void setDualExists(bool exists);
private:
class Private;
Private* const d;
#define KVTML_THIRD_PERSON_MALE_FEMALE_DIFFERENT "malefemaledifferent"
// if this tag exists conjugations even have a neuter form for the third person
#define KVTML_THIRD_PERSON_NEUTER_EXISTS "neuterexists"
+#define KVTML_DUAL_EXISTS "dualexists"
// word types
#define KVTML_WORDTYPEDEFINITIONS "wordtypedefinitions"