next up previous contents index
Next: supported #pragmas Up: Object Reflection Previous: Synopsis of classdesc   Contents   Index

Limitations to classdesc

Classdesc will work with any syntactically correct C++ code, and attempt to do the best it can. It ignores anything that is not a struct/class definition, or an enum definition. Classdesc does not preprocess the code presented to it -- if you depend on the preprocessor in your class definitions, you must filter your code through the preprocessor first,1 defining the macro _CLASSDESC to ensure pragmas are seen by the Classdesc processor.

Unfortunately, overloaded member functions cannot be resolved to a distinct member pointer, so are quietly ignored by classdesc. This is not an issue with serialisation, of course, as all member functions are ignored, but has implications for actions such as TCL_obj that export object functionality.

Raw pointers also cause problems in that there is no information at runtime about how many objects a pointer points to, or whether it is reasonable to extend the array with memory taken from the heap. Support for the various uses of pointers is discussed in §2.1.


next up previous contents index
Next: supported #pragmas Up: Object Reflection Previous: Synopsis of classdesc   Contents   Index
Russell Standish 2009-06-18