History on the users list:
The patch I attached to the previous mail causes compile error with Visual C++. Probably there is a name collision with a macro.
To get it work, you have to rename the static data members from FALSE to False and from TRUE to True, respectively. (In both files.)
I mean if somebody cares... ;-)
I attached a patch, consider if it fits into your design principles or if you need it at all. It is a minor issue, really.
Have a nice weekend!
unfortunately, assigning a 0 to a predicate smart pointer causes crash. (Line 334 in QmitkDataStorageTreeModel.cpp)
I am not thinking of complex predicates, since if a formula contains these constants you can always simplify it. The case is that currently you can create an always true formula only with the "or" and "not"
I started to maintain my own branch of MITK that I will rebase on the official master regularly. If I will have anything that can be interesting for the community, I will share it. If it is not like that, I won't force you to include. ;-)
the predicates are exclusively used in the mitk::DataStorage, as far as I know. All methods that use predicates there can be supplied with a NULL Pointer instead of a predicate, which leads to the same behavior as a "true" predicate. Right now, I can't think of a use case where one would need to build a complex predicate that includes a "true" or "false" predicate. But on the other hand, it certainly wouldn't hurt to have them in MITK.
Do you want to contribute these predicates to MITK?
the API of node predicates is incomplete. There are "not", "and" and "or" node predicates, but there is no "true" or "false". They could be useful to turn off or on filtering nodes depending on a preference.
There is a simple workaround, a "true" predicate can be simulated e.g.
by "or(<some condition>, not(<some condition>))", but it is not really nice and efficient. And one could also derive his/her own class, of course, but it might be useful to provide them by MITK.
What do you think?