Comment 2 for bug 655164

Revision history for this message
Markus Korn (thekorn) wrote :

One way which just came into my mind to make things easier to understand is to use a flag system, like

MostRecent = 0x01
LeastRecent = 0x02
MostPopular = 0x04
LeastPopular = 0x08
[...]
Events = 0x0100
Subjects = 0x0200
Actor = 0x0400
[...]

This way the ResultTypes we have right now can be written as

MostRecentEvents => MostRecent | Events
LeastRecentSubjects => LeastRecent | Subjects

And when we feel like adding a new `target` like Interpretation or Manifestation all we have to do is to add two new values

Interpretation = 0x0800
Manifestation = 0x01000