On Friday 10 June 2011 20:28:55 Jos van den Oever wrote: > On Friday, June 10, 2011 20:24:08 PM Pierre wrote: > > On Friday 10 June 2011 12:49:18 Jos van den Oever wrote: > > > On Friday, June 10, 2011 08:22:04 AM Jos van den Oever wrote: > > > > Can you think of a reason why this would not work? > > > > > > I can now. The circular nature of element nesting make is harder to > > > create these classes. E.g. office:document can have (at some depth) a > > > "office:image" which can have an "office:document" inside. > > > > > > Who can think of an elegant solution for this? > > > > > > Find my first attempt attached. > > > > > > Cheers, > > > Jos > > > > I can't see that as a problem, with a good class definition... > > What is the problem exactly ? > > I had code like this: > > class B; > public: > class A { > B startB(); > }; > > class B { > public: > A startA(); > }; > > which is not possible. I changed it now to > > class B; > class A { > public: > A(const B&); > }; > class B { > B(const A&); > }; > > which does work. The current header file is nearly a megabyte, but compiles > down to nearly no code if you do not use much, in my current version which > adds 'inline' to each function. > > Cheers, > Jos
Yeah, so that problem is nearly void now.... BTW, what RNG parser do you use to generate this .h file ? So far, we have a terrible one in a test case (yeah, I write ugly code sometimes, sorry about that, but this one was gonnabe too complex otherwise...) Thanks Pierre
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel