This is a bit of a vague question and I apologise in advance for it. However, that's why I need help as I'm not sure where to start looking.
Here's the problem. I need to be able to construct a somewhat simple query. This will start off as a string and look something like this:
(A && B) || (C && D)
This will be defined in a configuration file. What I then need to do is pull out those "variables" (The A, B, C and D) and display them to the user as a list of tickboxes. They'll never see the config file, but said file will just be a text document (With other bits and pieces mixed in). That bit I can do easily enough.
Where I'm not sure how to proceed is taking the results of those tickboxes and plugging them back into the query, then "running" the query. What exactly is this query? Is there a library in .net for this kind of thing?
So for example, in the above query the end user will see 4 tick boxes. If they tick A, B and C but leave D blank, then the query turns into this:
(true && true) || (true && false)
Which should, ultimately, return true. However at the moment it's just a string and I'm not sure what the best way would be to turn the above string into something that can be processed. I could write some code and kludge it together myself, but I get the feeling that this isn't a new issue and there's probably either a library of some sort that can already do this, or something built into .net itself, or a "defined way" to process this kind of thing. It's almost as though I'm trying to write a really tiny scripting language.
Can someone point me in the right direction? I'm not really sure what I'm googling for, but "decision trees" and "expression trees" keeps cropping up, but as near as I can tell that's something to do with LINQ and I'm not even sure what that is.
The catch is, this needs to be available in C++/Cli - not C# or VB.net.
Once again, I apologise for the vague question but I appreciate any help or pointers someone can give.