From: Stefan S. <sse...@ar...> - 2004-08-13 13:51:44
|
Hi Gilles, Gilles J. Seguin wrote: >On Thu, 2004-08-12 at 21:42, Stefan Seefeld wrote: >>What's the semantics (goal in general, invariants, etc.) >>of the following methods: >> >>* Encoding::GetBaseName() >>* Encoding::ResolveTypedefName() >>* TypeInfo::Reference() >>* TypeInfo::Dereference() >>* TypeInfo::Normalize() >>* TypeInfo::SkipCv() >>* TypeInfo::SkipName() >>* TypeInfo::ResolveTypedef() >> >>Thanks for any clarification ! > > >Allo stephan, > >One word, mangling. yeah, I know. I do understand the principles of type encoding and name mangling in general. My problem is with the specifics of the above methods. To explain my question a bit better: right now everything in opencxx is done with garbage collected character buffers. That's almost as bad as passing void pointers around. I'd like to replace 'char *' by 'const char *' where ptrees point into the file buffer that is being parsed. For the encodings I'm using std::basic_string<unsigned char>. Now, there are public methods that generate new 'derived' encodings from old ones (the same way you can derive types). However, some methods are merely used to parse an encoding, i.e. they don't need to create a new encoding but simply return a pointer *into* an existing encoding (I'm of course using iterators for that). Take the 'SkipCV' method: it sounds as if it returns the sub-encoding with potential 'cv' tags stripped off. An ideal candidate for an iterator, one would think. However, if you look into the code, you realize that there's quite a bit more going on. And that's exactly what I'd like to understand in detail... :-) Regards, Stefan |