]> Git trees. - libqmvoc.git/commit
NOTE: Breaks binary compatibility. Make sure to make install after you make this.
authorDavid Capel <wot.narg@gmail.com>
Wed, 30 Jul 2008 08:07:53 +0000 (08:07 +0000)
committerDavid Capel <wot.narg@gmail.com>
Wed, 30 Jul 2008 08:07:53 +0000 (08:07 +0000)
commit8ce4e5df8c9cc7b86b550ab9528a88d8c0d6d0f6
tree1686c3c28c8eb678ecf95e4f108aac7b8b6b3f09
parentc00c4c74fe84fdeda7d02422fe046bc2165b3aa9
NOTE: Breaks binary compatibility. Make sure to make install after you make this.

This consolidates various enums of word properties into one: KEduVocWordFlags

This stores the following sets of properties:
Number
Part of Speech
Gender
Definiteness
Regularity
Phrase (if it is actually a phrase and not a word)

Others may come later, but those work for now.

Instead of having functions accept multiple parameters for each type (gender, number, etc), they accept one KEduVocWordFlags parameter.
You can pass as many flags as you want by bitwise ORing (a|b) them together, similar to how Qt accepts various flags. QFlags is a handy helper class that does
this magic for us.

This implementation has the following benefits over the previous one:
(The previous had multiple enums floating around in various classes, new combinations were frequently made by making a new enum entry.)
* All the flags are in one place, instead of scattered and duplicated.
* You only need to set the flags you care about -- no dummy parameter-filling flags needed.
* We can extend the flags without breaking binary compatibility.
* It allows optional extra flags like verb regularity.

svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=839519
keduvocdocument/CMakeLists.txt
keduvocdocument/keduvocarticle.cpp
keduvocdocument/keduvocarticle.h
keduvocdocument/keduvockvtml2reader.cpp
keduvocdocument/keduvockvtml2writer.cpp
keduvocdocument/keduvockvtmlcompability.cpp
keduvocdocument/keduvockvtmlwriter.cpp
keduvocdocument/keduvocwordflags.h [new file with mode: 0644]
keduvocdocument/keduvocwordtype.cpp
keduvocdocument/keduvocwordtype.h