File indexing completed on 2024-04-14 03:46:40

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