Michel Fortin Wrote: > On 2010-12-28 17:19:01 -0500, Sean Kelly <[email protected]> said: > > > > And I guess writeTo could just call formatter.write(MyClass c). You're > > right, that works. > > Well, not exactly. I'd expect formatter.write(Object) do be the one > calling writeTo. ... > A typical writeTo might look like this: > > void writeTo(Formatter formatter) { > formatter.write(member1); > formatter.write(member2); > }
This is what I meant. Sorry for the confusion. > The only thing is that you need to define > writeTo (or use the mixin) with any class and subclass you want to > serialize. Similar to what I did in C++ then. Gotcha.
