File indexing completed on 2022-10-04 13:56:36

0001 /*
0002  * SPDX-FileCopyrightText: 2008 David Capel <wot.narg@gmail.com>
0003  * SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef KEDUVOCWORDFLAGS_H
0007 #define KEDUVOCWORDFLAGS_H
0008 
0009 
0010 class KEduVocWordFlag
0011 {
0012 public:
0013     enum Flags
0014     {
0015         // This is used for both empty flags and to denote no flags of the correct type were set.
0016         NoInformation = 0x0,
0017 
0018         // Gender
0019         Masculine = 0x1,
0020         Feminine = 0x2,
0021         Neuter = 0x4,
0022 
0023         // Plurality
0024         Singular = 0x10,
0025         Dual = 0x20,
0026         Plural = 0x40,
0027 
0028         // Part of Speech
0029         Verb = 0x100,
0030         Noun = 0x200,
0031         Pronoun = 0x400,
0032         Adjective = 0x800,
0033         Adverb = 0x1000,
0034         Article = 0x2000,
0035         Conjunction = 0x4000,
0036 
0037         // Person
0038         First = 0x10000,
0039         Second = 0x20000,
0040         Third = 0x40000,
0041 
0042         // Declension Case
0043         Nominative = 0x80000,
0044         Genitive = 0x100000,
0045         Dative = 0x200000,
0046         Accusative = 0x400000,
0047         Ablative = 0x800000,
0048         Locative = 0x1000000,
0049         Vocative = 0x2000000,
0050 
0051         // Other assorted flags
0052         Definite = 0x4000000, // The article is definite
0053         Indefinite = 0x8000000, // The article is indefinite
0054         Regular = 0x10000000,
0055         Irregular = 0x20000000
0056     };
0057 
0058     static const Flags genders = (Flags)(Masculine | Feminine | Neuter);
0059     static const Flags partsOfSpeech =(Flags)(Noun | Verb | Article | Pronoun | Adjective | Adverb | Conjunction);
0060     static const Flags numbers = (Flags)(Singular | Plural | Dual);
0061     static const Flags cases = (Flags)(Nominative|Genitive|Dative|Accusative|Ablative|Locative|Vocative);
0062     static const Flags persons = (Flags)(First | Second | Third);
0063 
0064 };
0065 
0066 Q_DECLARE_FLAGS(KEduVocWordFlags, KEduVocWordFlag::Flags)
0067 Q_DECLARE_OPERATORS_FOR_FLAGS(KEduVocWordFlags)
0068 
0069 #endif