I am developing GUI application via wxWidgets. It has 2 parts: GUI part and "Logic" part. I want to have Logic part totally independent on wxWidgets. But one component in the GUI returning wxVariant and I need to use it in the Logic part.
So I am looking for a way to "convert" wxVariant to boost::variant
wxVariant works like this:
wxVariant v("37");
int i = v.GetInteger(); //i==37
So I am thinking something like
string s = methodReturningWxVariant().GetString();
boost::variant bV(s);
//later in code e.g
bV.GetInt();
bV.GetBool();
Is it possible to use boost::Variant (or boost::Any) like this?