Alexey Parshin wrote:
Aha. Now I understand somewhat better what you meant, and like it far more :)Topic is a UMO, with a name, type, and title. Any other fields are not essintial for this example. topics is ether std::vector<CUMO> as in current approach, or CRecordSet<CUmo> as I propose to do it. In that case, CRecordSet class should implement forEach() method. There is an interesting flaw that my current idea doesn't cover yet. forEach() works ideally for one-level loops, such as a recordset converted to some html. However, it doesn't yet provide the method for embedded loops.
Re: embedded loops, we can either solve it by making a complex ways ofdefining which substitutions cause calls to sub-objects forEach(), or just by going
back to good old C++ iterators, in those rare cases that need it.
Authoright © Total Knowledge: 2001-2008