No registered users in community xowiki
in last 10 minutes
in last 10 minutes
Re: [Xotcl] introspective tools for documentation?
From: Uwe Zdun <bm0005_at_sp2.power.uni-essen.de>
Date: Tue, 19 Mar 2002 22:25:59 +0100 (MEZ)
Hi,
the basic idea is to re-define the _at_ token at runtime, if needed, before
the code wit the metadata ist exectuted, and then a dynamic object
structure is build that can be queried. staticMetaDataAnaylzer.xotcl does
the same but it does only look at the metadata (and class dependencies,
methods). It uses the dynamic script metadataAnalyzer.xotcl.
here's an example use of this script (from its documentation):
package require xotcl::metadataAnalyzer
# instantiate metadata analyzer object
MetadataAnalyzer _at_::m
# make this object be known to _at_ and turn @ metadata processing on
_at_ analyzerObj @::m
_at_ onOff 1
# read in some metadata tags (in sample file) & execute the file
source lib/testx.xotcl
# turn _at_ metadata processing off again
_at_ onOff 0
# print out all collected metadata
puts [_at_::m print]
It should have more handy info options etc. but this has to be still
implemented ... perhaps you like to volunteer ...
of course, you can also implement other interpretations of _at_ for your own
purposes. If so, please let us know, so that other users
benefit from these functionalities as well.
--uwe
On Tue, 19 Mar 2002, Catherine Letondal wrote:
>
> Hi,
>
> I believe the only way to document code is now through the _at_ object
> and the makeDoc.xotcl script, which uses several utilities from the
> library/system directory (the old one was the metadata mechanism).
> Am I right?
>
> My question is about the introspective aspect of this feature: how
> do you get the documentation for a class, method, ...?
> By parsing its file?
>
> Thanks a lot for any help,
>
> --
> Catherine Letondal -- Pasteur Institute Computing Center
> _______________________________________________
> Xotcl mailing list - Xotcl_at_alice.wu-wien.ac.at
> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl
>
Date: Tue, 19 Mar 2002 22:25:59 +0100 (MEZ)
Hi,
the basic idea is to re-define the _at_ token at runtime, if needed, before
the code wit the metadata ist exectuted, and then a dynamic object
structure is build that can be queried. staticMetaDataAnaylzer.xotcl does
the same but it does only look at the metadata (and class dependencies,
methods). It uses the dynamic script metadataAnalyzer.xotcl.
here's an example use of this script (from its documentation):
package require xotcl::metadataAnalyzer
# instantiate metadata analyzer object
MetadataAnalyzer _at_::m
# make this object be known to _at_ and turn @ metadata processing on
_at_ analyzerObj @::m
_at_ onOff 1
# read in some metadata tags (in sample file) & execute the file
source lib/testx.xotcl
# turn _at_ metadata processing off again
_at_ onOff 0
# print out all collected metadata
puts [_at_::m print]
It should have more handy info options etc. but this has to be still
implemented ... perhaps you like to volunteer ...
of course, you can also implement other interpretations of _at_ for your own
purposes. If so, please let us know, so that other users
benefit from these functionalities as well.
--uwe
On Tue, 19 Mar 2002, Catherine Letondal wrote:
>
> Hi,
>
> I believe the only way to document code is now through the _at_ object
> and the makeDoc.xotcl script, which uses several utilities from the
> library/system directory (the old one was the metadata mechanism).
> Am I right?
>
> My question is about the introspective aspect of this feature: how
> do you get the documentation for a class, method, ...?
> By parsing its file?
>
> Thanks a lot for any help,
>
> --
> Catherine Letondal -- Pasteur Institute Computing Center
> _______________________________________________
> Xotcl mailing list - Xotcl_at_alice.wu-wien.ac.at
> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl
>