Based on discussion over here (
http://forum.openframeworks.cc/index.php/topic,641.0.html), I've been exploring using vectors of pointers instead of vectors that copy objects.
It works great (no copy constructors) but the problem is that this solution is far more complex than just using a simple vector, because it involves using
new, and therefore
delete, as well as the added complexity of dereferencing pointers of dereferenced pointers (iterators are just a form of pointer) -- which is totally unworkable (in my opinion) for even intermediate programmers because it requires far too much knowledge.
On the other hand, using the vector<> and list<> examples, as in my two examples online, is unworkable in the real world because of the copies that are made of the object when adding them to the collector, thereby bringing in the problem of copy constructors.
So this is all kinda ugly. Should we make it all easier by introducing a wrapper that might simplify the process, along the lines of Processing's
append(),
expand() and
shorten() methods?