|
From: Geoffrey H. <ge...@ge...> - 2006-12-13 13:24:40
|
On Dec 13, 2006, at 4:44 AM, Noel O'Boyle wrote: > that Geoff has renamed some methods to good(), deref() and inc(). > Using these, it's possible to create a class that behaves as an > iterator. Don't look at me. Those were contributed. :-) > classes at runtime (or have a Factory method) as there are now about > 10 iterators of similar structure in obiter.h. As both Rich and Noel have mentioned, iterating doesn't necessarily work the same in C++ as in scripting languages. (Heck, in C++ people often have different ways of doing iteration.) If you think it would be a good idea to have methods to just pass a list of atoms or bonds, residues, etc. please let me know. Many of these methods already exist, although I haven't checked for "completeness" in the API. SWIG doesn't always make it easy to inject code into the C++ interface file or the scripting language module that it generates. Of course that's why we've put hacks into the Makefiles. So if there are bits we'd like to put in either place, let me know and I'll figure out an appropriate way to get it done. Cheers, -Geoff |