As of one week, support for Copper has completely ended. Some time ago, I declared an end to the updates some time ago, but now I won’t be updating this blog anymore (unless I hand over the blog to someone else). But before you think that’s a bad thing…
Good news! CupricBridge and Curri are now online! CupricBridge is a wrapper for the Irrlicht engine GUI system, but it also provides a serialization interface implementation that will work with scene objects. Curri is a project containing the boilerplate code for creating applications with Copper, CupricBridge, and Irrlicht engine.
New changes this week in Copper fill in some of the gaps that show up when trying to use Copper for real-world projects. The first of these is the indication of the support of multiple interfaces, which solves the dilemma of distinguishing between polymorphic objects turned into Copper objects. The second is the addition of a system function that enables the sharing of user-created function bodies.
In other notes, the string_map extension received a bug fix for not correctly returning when “exit” was called in the middle of the callback function it was given.
After some critical debugging of the recently changed runFunctionObject() (used for callbacks), I decided to add a new boolean function in the spirit of doing things fast and efficiently: xall(). This function is the equivalent of any(all(…), nall(…)) where “…” represents the same arguments. Using xall() is much less error prone (since you only need to type the argument names once) and much faster because it’s all on the C++ side.
In other news…
Up to this point, the foreign function system did not allow using callbacks via Engine::runFunctionObject() until after Engine::execute() or Engine::run() (which calls Engine::execute()) had completed. My recent update changes that and makes recursive execution of opcodes easier.
Recently, I utilized the serialization interface in Irrlicht to allow Copper to create GUIs. The code for this is part of my project “Cupric Bridge”. Also in this project are bindings that allow for callbacks from different types of GUI elements.
Branch 6, version 0.51 has a couple of important bug fixes.
An old bug in Copper that had gone under the radar for a while: The system functions “all” and “any” had been flipped in functionality. Each one was doing the other’s job. The bug was probably introduced during a rewrite of those functions.
CallbackWrapper was also fixed. The Copper callback is now disowned in the destructor so its lifetime is now correctly tied to the CallbackWrapper.