Add boolean expression SelectionAccessor
So far, SelectionAccessor was only able to handle simple AND expressions like a,as_char&&b,as_char
. This is implemented by just splitting the components and maintaining a list.
With this MR there is another class SelectionAccessorExpr
, that will be invoked in case an expression given to makeSelectionAccessor
is more complex than that. It will parse the expression and build a tree structure, that can then be used to evaluate the expression against an SG::AuxElement
. This is transparent behind the ISelectionAccessor
interface. The parser supports operators &&
, ||
, !
, as well as grouping with ()
and any hierarchy of them. It can also handle true
and false
literals.
SelectionAccessorExpr
doesn't support setting values, and will return either CP::selectionAccept
or CP::selectionReject
when getBits()
is called on it.