File indexing completed on 2024-04-14 03:46:38
0001 /* 0002 * C++ Interface: keduvocdeclension 0003 * SPDX-FileCopyrightText: 2007 Frederik Gladhorn <frederik.gladhorn@kdemail.net> 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KEDUVOCDECLENSION_H 0008 #define KEDUVOCDECLENSION_H 0009 0010 #include "keduvocdocument_export.h" 0011 0012 #include "keduvoctext.h" 0013 #include "keduvocwordflags.h" 0014 0015 /** 0016 A declension contains all forms that a NOUN possibly can have. 0017 0018 @author Frederik Gladhorn <frederik.gladhorn@kdemail.net> 0019 */ 0020 class KEDUVOCDOCUMENT_EXPORT KEduVocDeclension 0021 { 0022 public: 0023 /** 0024 * The constructor without arguments 0025 */ 0026 explicit KEduVocDeclension(); 0027 0028 /** copy constructor 0029 * @param other comparison object to copy 0030 */ 0031 KEduVocDeclension(const KEduVocDeclension &other); 0032 0033 ~KEduVocDeclension(); 0034 0035 /** equality operator 0036 * @param a object to compare to 0037 * @returns true if comparisons are the same, false otherwise 0038 */ 0039 // will probably not be necessary 0040 // bool operator == ( const KEduVocDeclension& a ) const; 0041 0042 /** assignment operator for d-pointer copying 0043 * @param other object to copy from 0044 * @returns reference to this object 0045 */ 0046 KEduVocDeclension &operator=(const KEduVocDeclension &other); 0047 0048 /** 0049 * The grammatical number, there is singular and plural for english, some languages have dual for exactly two items. 0050 * @param flags 0051 * @return 0052 */ 0053 KEduVocText &declension(KEduVocWordFlags flags); 0054 0055 /** 0056 * Set a declension 0057 * @param declension 0058 * @param flags 0059 */ 0060 void setDeclension(const KEduVocText &declension, KEduVocWordFlags flags); 0061 0062 bool isEmpty(); 0063 0064 /** 0065 * Create xml for this declension 0066 * @param parent 0067 */ 0068 void toKVTML2(QDomElement &parent); 0069 0070 /** 0071 * Reads a declension from xml, returns 0 if it is empty 0072 * @param parent 0073 * @return 0074 */ 0075 static KEduVocDeclension *fromKVTML2(QDomElement &parent); 0076 0077 private: 0078 class Private; 0079 Private *const d; 0080 }; 0081 0082 #endif