[vtk-developers] New header file Wrapping/vtkParseType.h
brad.king at kitware.com
Fri Apr 30 09:42:22 EDT 2010
David Gobbi wrote:
> Each special type in category (1) needs a hexidecimal "type constant"
> to be defined in vtkParse. There _should_ be 255 slots available
This is not correct. Currently there are only 16 slots available, and
IIRC there is only one left. The least-significant digit is the only
one devoted to the type. The second digit is always either 0 or 1 to
indicate whether the type is *unsigned*. The third digit value specifies
a level of indirection (*, **, &, *&, etc.). The fourth digit is either
0 or 1 to indicate whether the type is *const*.
This encoding treats "unsigned" and "const" as if they were both type
qualifiers even though C includes unsigned in the type and defines
const as a qualifier. Documenting and implementing this encoding
in actual functions and enumeration values would help the readability
of the code tremendously.
> And Brad might have to peek at the code now and then to keep everything kosher.
FYI, I've learned them only far enough to maintain them and tweak things
on occasion. I don't know them as if I was the original author.
More information about the vtk-developers