Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx> wrote: > > It can't treat every type in the same way, as all types have a > > special > > handling, ie. number types need to be endian-aware, same for > > entry_refs > > but even more complicated. > I don't think that's correct. At least in R5 all Add*() methods are > merely > thin wrappers that invoke AddData(). They don't do endianess > conversion -- > I believe it's only done when unflattening a message. Yes, you're right. > There're only a few of those methods that do more than directly > invoking > AddData() with a pointer to the data and its size. The complete list > should > be: AddRef(), AddMessage(), AddFlat(). And each of them renders the > flat > data into a temporary buffer and then calls AddData(). > > Personally I really don't understand why Erik unleashed his template > madness when things could have been so much simpler. Indeed, although the template madness is not that complicated either, the "direct" approach would have been simpler, and also even more flexible when it comes to another storage format. Bye, Axel.