Re: Inheriting Properties (or something similar) in IDLDOC [message #81214 is a reply to message #80787] |
Wed, 29 August 2012 11:14   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 8/29/12 1:10 AM, Yngvar Larsen wrote:
> On Tuesday, 10 July 2012 05:34:20 UTC+2, Mike Galloy wrote:
>> On 7/9/12 6:05 PM, Bogdanovist wrote:
>>
>>> I've just started a project of re-commenting a large IDL code into
>>
>>> IDLDOC format and moving some external text file documentation into
>>
>>> those comments.
>>
>>>
>>
>>> One issue I have is that the code uses IDL custom object, and in
>>
>>> particular inheritance, extensively. I would like the documentation
>>
>>> for derived classes to inherit appropriate info from the parent class
>>
>>> documentation.
>>
>>>
>>
>>> In particular, the functionality of a lot of the object functions,
>>
>>> such as threshold levels and other parameters and switches are
>>
>>> controlled by config files. A base class may have some behaviour
>>
>>> controlled by some 'tag' in a config file and a derived class may be
>>
>>> controlled by additional tags. I would like a way to summarise all of
>>
>>> the config file tags that control an object (i.e. are looked at by any
>>
>>> of the objects functions) and then have derived classes documentation
>>
>>> inherit the summary from the superclass.
>>
>>>
>>
>>> Looking over the IDLDOC reference guide, I though perhaps
>>
>>> the :Properties: tag in the file comments might allow this. So I have
>>
>>> comments in the base class <obj_name>__define.pro file that look
>>
>>> something like this:
>>
>>>
>>
>>> ;+
>>
>>> ; Abstract Base class for handling input data for mapping.
>>
>>> ; Provides a common interface for different data sources.
>>
>>> ;
>>
>>> ; :Properties:
>>
>>> ; data_type : property name
>>
>>> ; The IDL data type to use for the data storage array pointed to
>>
>>> by self.data
>>
>>> ; somthing_else :
>>
>>> ; Some other property
>>
>>> ;-
>>
>>>
>>
>>> This produces a nice summary of 'properties' in the IDLDOC produced
>>
>>> docs. However, this does not show up the doc page for derived classes
>>
>>> (not that I was expected to, just hoping....).
>>
>>>
>>
>>> Is there any way to achieve what I'm trying to do? For comparison the
>>
>>> way IDLDOC handles the actual class members is exactly the behaviour I
>>
>>> want, but for a 'user defined' set of properties of objects. Is this
>>
>>> possible?
>>
>>>
>>
>>
>>
>> Ah, no, not right now. That is an interesting feature though, that would
>>
>> be quite useful. I will make a feature ticket for that.
>>
>>
>>
>> One workaround for it right now would be to create a
>>
>> my_class_properties.idldoc page that lists all the properties for
>>
>> my_class and then (manually) link to that page from all the derived classes.
>>
>>
>>
>> Mike
>
> [Sorry for the late posting. Slowly catching up on the back log from this summer.]
>
> For what it's worth: I would also like this feature. In our software, we almost in every class use inheritance from a couple of base classes, and it would be nice if the methods from these would show up in the "Routine summary" in the derived classes.
>
The trunk now shows a listing of the inherited properties in the same
manner that the inherited fields are shown. Features/fixes are
collecting, so a release is probably going to happen soon.
But, you also want a listing of inherited routines?
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
|
|
|