Open ennosigaeus opened 11 years ago
I think it would be useful to allow default values be documented like:
some_field : default=10L
description of some_field
Be careful, though, setting some_field:10L
in the definition of the member variables as in the above example does not set the default value for objects of the class!
You're right, of course. I do like the idea of allowing to set the default value.
IDLdoc 3.5.1 will properly detect the fields "data" and "some_field". However, I'd like not only to see that "some_field" is "0L", but that "some_field" is set to "10L" (see second code block for actual IDLdoc output). NB: I also tried setting attributes on the fields (e.g. "some_field : type="long", default="10L"), but IDLdoc ignored them.
For now I just decided to add the default value to the comment blocks.
BTW: Would it be possible (in order to reduce duplication) to reuse the field documentation in :fields: in their corresponding :properties:, SetProperties, and GetProperties counterparts (e.g. if left empty)?