I have a custom C++ class
Rectangle that I’ve added to chaiscript. I also have a list of those rectangles in the chaiscript VM that I want to access and manipulate/access, but in C++, so:
// In chaiscript
var redRects = ;
vec.push_back(Rectangle(0, 0, 10, 10));
vec.push_back(Rectangle(5, 5, 20, 20));
void DrawRectangles(const std::vector<Boxed_Value> &rectangles, int color)
// Drawing code
I’m able to get this far where
rectangles.size() in the function will return the correct number of rectangles in the vector. Doing
When I tried to do
chaiscript::boxed_cast<Rectangle *>(rectangles) an exception was throw.
So my question is, how do I accessa
Boxed_Value of a user defined type?