272
271
<heading>Afterword</heading>
274
And after the main part of the doucment we can have some other stuff.
273
And after the main part of the doucment we can have some other stuff.
277
276
<index type="class"/>
282
The above example shows all the elements possible in a document body -
287
This is an optional part of the document that can come before the
288
main text. Typically, this could be used to contain an automatically
289
generated contents page and possibly an introduction.
290
When output is generated in book form, this part of the document
291
would probably have a different page numbering scheme from the
294
The <em>contents</em> element is used as a marker to specify
295
that an automatically generated contents page (listing the
296
chapters in the document) is to be inserted.
299
<term><label id="main">main</label></term>
302
After the <em>front</em> part of the document body comes a
303
mandatory sequence of one or more chapters. This is where
304
the main part of the document resides.
305
Each <ref id="chapter">chapter</ref> consists of a
306
<ref id="heading">heading</ref>, any number
307
of blocks of information, and any number of sections.
312
After the chapters making up the main part of the body of the
313
document is an optional <em>back</em> part which may contain
314
chapters (such as appendices) possibly followed by an automatically
317
The <em>index</em> element is used as a marker to specify
318
that an automatically generated index is to be inserted.
319
The <em>type</em> attribute of the index specifies what sort
320
of item is to be in the index - the default type of <em>label</em>
321
causes an index of all <em>label</em> and <em>entry</em>
322
elements to be generated.
281
The above example shows all the elements possible at the top level in a document body -
284
<term><code><front></code></term>
286
This is an optional part of the document that can come before the
287
main text. Typically, this could be used to contain an automatically
288
generated contents page and possibly an introduction.
289
When output is generated in book form, this part of the document
290
would probably have a different page numbering scheme from the
293
The <code><contents></code> subelement is used as a marker
294
to specify that an automatically generated contents page (listing
295
the chapters in the document) is to be inserted.
298
<term><code><chapter></code></term>
300
After the <em>front</em> part of the document body comes a
301
mandatory sequence of one or more chapters. This is where
302
the main part of the document resides.
303
Each <ref id="chapter">chapter</ref> consists of a
304
<ref id="heading">heading</ref>, any number
305
of blocks of information, and any number of sections.
307
<term><br/><code><back></code></term>
309
After the chapters making up the main part of the body of the
310
document is an optional <em>back</em> part which may contain
311
chapters (such as appendices) possibly followed by an automatically
314
The <code><index></code> element is used as a marker to
315
specify that an automatically generated index is to be inserted.
316
See <ref id="index">below</ref> for details.
330
324
<heading>Element reference</heading>
332
<heading>block</heading>
334
Actually, there is no such thing as a <em>block</em> element, this
335
is just shorthand for refering to a group of elements that can be
336
used in similar ways. The block elements are -
339
<term><ref id="embed">embed</ref></term>
340
<desc>embeded information from elsewhere</desc>
341
<term><ref id="example">example</ref></term>
342
<desc>the example</desc>
343
<term><ref id="p">p</ref></term>
344
<desc>the paragraph</desc>
345
<term><label id="list">list</label></term>
349
<term><ref id="list">list</ref></term>
350
<desc>a simple list of items</desc>
351
<term><ref id="enum">enum</ref></term>
352
<desc>an enumerated list</desc>
353
<term><ref id="deflist">deflist</ref></term>
354
<desc>a list of terms and their definitions</desc>
355
<term><ref id="qalist">qalist</ref></term>
356
<desc>a list of questions and answers</desc>
361
A variety of specialised elements for software documentation.
363
<term><ref id="class">class</ref></term>
364
<desc>An Objective-C class definition</desc>
365
<term><ref id="jclass">jclass</ref></term>
366
<desc>A Java class definition</desc>
367
<term><ref id="category">category</ref></term>
368
<desc>An Objective-C category definition</desc>
369
<term><ref id="protocol">protocol</ref></term>
370
<desc>An Objective-C protocol or Java interface definition</desc>
371
<term><ref id="function">function</ref></term>
372
<desc>A function definition</desc>
373
<term><ref id="macro">macro</ref></term>
374
<desc>A macro definition</desc>
375
<term><ref id="type">type</ref></term>
376
<desc>A type definition</desc>
377
<term><ref id="variable">variable</ref></term>
378
<desc>A variable definition</desc>
385
<heading>br</heading>
387
The <em>br</em> element is an empty element that always appears
388
as <br/> in the document. This element simply specifies
389
that a line-break should appear in the output text at this point.
393
<section id="chapter">
394
<heading>chapter</heading>
396
This is the basic unit of the document - the main part of
397
a document <ref id="body">body</ref> will contain at least
399
Each chapter consists of a heading,
400
zero or more <ref id="block">blocks</ref>,
401
and zero or more <ref id="section">sections</ref>.
404
Each chapter in the document is automatically listed in the
405
documents contents page (if it has one).
410
<heading>class</heading>
412
This is the main element for Objective-C code documentation.
413
The <em>name</em> attribute is required for this element - it is
414
the name of the class. The <em>super</em> attribute is normally
415
necessary to provide the name of the superclass.
418
The elements in a class are - an optional
419
<ref id="declared">declared</ref> element,
420
zero or more <ref id="conform">conform</ref> element,
421
an optional <ref id="desc">description</ref>,
422
zero or more <ref id="method">method</ref> elements,
423
and an optional <ref id="standards">standards</ref> element.
427
<section id="conform">
428
<heading>conform</heading>
430
This element contains simple text giving the name of a protocol
431
or interface to which a class conforms.
435
<section id="declared">
436
<heading>declared</heading>
438
This element contains simple text giving the name of the header
439
file in which something is declared.
444
<heading>desc</heading>
446
This element is used to contain descriptions of how software
447
functions. It may contain <ref id="text">text</ref>, but may
448
also contain <ref id="list">lists</ref>,
449
<ref id="p">paragraphs</ref>,
450
<ref id="example">examples</ref> and
451
<ref id="mbed">embedded data</ref>.
455
<section id="heading">
456
<heading>heading</heading>
458
Each <ref id="chapter">chapter</ref>,
459
<ref id="section">section</ref>
460
<ref id="subsect">sub-section</ref>,
461
or <ref id="subsubsect">sub-sub-section</ref>
462
has a heading as the first thing in it.
463
These headings introduce the sections and are listed in the
471
The paragraph element simply contains <ref id="text">text</ref>.
472
Most descriptive writing is inside paragraphs.
476
<section id="section">
477
<heading>section</heading>
479
The <em>section</em> element is just like a
480
<ref id="chapter">chapter</ref>, except that it contains
481
<ref id="subsect">sub-sections</ref> where a chapter would
486
<section id="standards">
487
<heading>standards</heading>
489
The <em>standards</em> element contains any number of
490
standard elements whioch specify what standards a particular
491
piece of code does or does not conform to.
493
The defined values are -
496
<item><GNUstep/></item>
497
<item><OpenStep/></item>
498
<item><NotOpenStep/></item>
499
<item><MacOS-X/></item>
500
<item><NotMacOS-X/></item>
504
<section id="subsect">
505
<heading>subsect</heading>
507
The <em>subsect</em> element is just like a
508
<ref id="section">section</ref>, except that it contains
509
<ref id="subsubsect">sub-sub-sections</ref> where a section would
510
contain sub-sections.
514
<section id="subsubsect">
515
<heading>subsubsect</heading>
517
The <em>subsubsect</em> element is just like a
518
<ref id="subsect">sub-section</ref>, except that it contains
519
only a <ref id="heading">heading</ref> and zero or more
520
<ref id="block">blocks</ref>.
525
<heading>text</heading>
527
This is not really an element, we simply talk about text where
528
we mean raw text and very simple markup such as -
531
<term><ref id="br">br</ref></term>
532
<desc>a forced line-break</desc>
533
<term><ref id="footnote">footnote</ref></term>
534
<desc>a reference to a footnote that appears in full elsewhere</desc>
535
<term><ref id="label">label</ref></term>
537
a piece of text marked so that it can be referred to from elsewhere.
539
<term><ref id="entry">entry</ref></term>
541
an invisible mark that can be referred to from elsewhere.
543
<term><ref id="ref">ref</ref></term>
545
text marked as a reference to elsewhere in the document.
547
<term><ref id="uref">uref</ref></term>
549
text marked as a reference to a hypertext URL.
551
<term><ref id="url">url</ref></term>
555
<term><ref id="email">email</ref></term>
326
The allowable elements in GSDoc documents are described below, broken
327
into sections by usage context.
330
<section id="sectioningElements"><label id="sectioningElements"/>
331
<heading>Sectioning Elements</heading>
333
<em>Sectioning elements</em> define hierarchical document structure.
336
<term><code><label id="chapter"><chapter></label></code></term>
337
<desc>This is the basic, top-level element of the document body.
338
Each chapter consists of a <ref id="heading">heading</ref>,
339
zero or more <ref id="blockElements">blocks</ref>, and zero or more
340
<ref id="section">sections</ref>. Each chapter in the document is
341
automatically listed in the documents contents page (if it has one).
343
<term><code><label id="section"><section></label></code></term>
344
<desc>First level below <code>chapter</code>. It contains
345
<ref id="subsection">sub-sections</ref> where a chapter would
346
contain sections.</desc>
347
<term><code><label id="subsection"><subsection></label></code>
349
<desc>Level below <code>section</code>.</desc>
350
<term><code><label id="subsubsection"><subsubsection></label></code></term>
351
<desc>Level below <code>subsection</code>.</desc>
352
<term><code><label id="heading"><heading></label></code></term>
353
<desc>Each <ref id="chapter">chapter</ref>,
354
<ref id="section">section</ref>
355
<ref id="subsection">sub-section</ref>,
356
or <ref id="subsubsection">sub-sub-section</ref>
357
has a heading as the first thing in it.
358
These headings introduce the sections and are listed in the
359
contents page.</desc>
363
<section id="blockElements"><label id="blockElements"/>
364
<heading>Block Elements</heading>
366
<em>Block elements</em> can occur at the top level of sections,
367
as well is in certain other contexts. The block elements are -
370
<term><code><label id="embed"><embed></label></code></term>
371
<desc>marks embedded information from elsewhere</desc>
372
<term><br/><code><label id="example"><example></label></code></term>
373
<desc>marks an example</desc>
374
<term><br/><code><label id="index"><index></label></code></term>
376
The <code><index></code> tag is special in that it is
377
dynamically expanded during output based on information that has
378
been collated from reading in various documentation and source
379
files. The <code>type</code> attribute of the index specifies
380
what sort of item is to be in the index - the default type of
381
<code>label</code> causes an index of all <em>label</em> and
382
<em>entry</em> elements to be generated. Currently the allowable
383
types are: <code>class</code>, <code>category</code>,
384
<code>protocol</code>, <code>method</code>,
385
<code>ivariable</code>, <code>function</code>, <code>type</code>,
386
<code>macro</code>, <code>variable</code>, <code>constant</code>,
387
<code>label</code>, <code>title</code>, <code>EOModel</code>
388
(associated with the Enterprise Objects Framework, for interacting
389
with databases), <code>EOEntity</code>. The default is
390
"<code>label</code>".
392
The <code><index></code> element also takes three optional
396
<term><code>scope</code></term>
398
Determines whether the index is generated for the current file
399
("<code>file</code>" scope), or for the whole of the current
400
project ("<code>project</code>" scope), or for everything the
401
software can find ("<code>global</code>" scope). In certain
402
contexts the specified scope is automatically overridden ... if
403
the document is processed in a standalone manner, the scope is
404
always "<code>file</code>". For method or ivariable indexing,
405
if the index is inside a class, protocol, or category, only
406
indexes for that unit are generated.
408
<term><code>style</code></term>
410
Determines whether the index is presented with standard
411
embellishments such as bulleted entries and a header
412
("<code>normal</code>" style) or in a minimalist style suitable
413
for, e.g., a navigation bar ("<code>bare</code>" style).
415
<term><code>target</code></term>
417
Provides additional information to accompany links formed from
418
the index. For HTML output, this is translated into a
419
"<code>target</code>" attribute to the <code><a>
420
href="..."</code> element generated for a link. In most cases
421
this can safely be left out.
426
<term><br/><em>text elements</em></term>
428
A variety of elements for text formatting, many based on HTML tags.
429
See <ref id="textElements">below</ref> for details.
432
<term><br/><em>list elements</em></term>
434
A variety of lists. See <ref id="listElements">below</ref> for
438
<term><br/><em>cross reference elements</em></term>
440
A variety of elements for representing external references and
441
internal references to other parts of a document.
442
See <ref id="crossrefElements">below</ref> for details.
445
<term><br/><em>definition elements</em></term>
447
A variety of specialised elements for software documentation.
448
See <ref id="definitionElements">below</ref> for details.
453
<section id="textElements"><label id="textElements"/>
454
<heading>Text Elements</heading>
456
<em>Text elements</em> can occur within blocks and typically within
457
other block elements such as
458
<code><ref id="example">example</ref></code> as well. They carry
459
out various presentation-related purposed.
460
The text elements are -
463
<term><code><label id="p"><p></label></code></term>
464
<desc>The paragraph, as in HTML. The paragraph element simply
465
contains <ref id="textElements">text</ref>. Most descriptive
466
writing is inside paragraphs.</desc>
467
<term><code><label id="br"><br></label></code></term>
468
<desc>The line-break, as in HTML.</desc>
469
<term><code><label id="example"><example></label></code>
471
<desc>Marks an example.</desc>
472
<term><code><label id="footnote"><footnote></label></code>
474
<desc>A reference to a footnote that appears in full elsewhere.
476
<term><code><label id="code"><code></label></code></term>
477
<desc>The content is either a name for code (e.g. class names), or a
478
relatively short code fragment.</desc>
479
<term><code><label id="em"><em></label></code></term>
480
<desc>Emphasized text.</desc>
481
<term><code><label id="strong"><strong></label></code></term>
482
<desc>More strongly emphasized text.</desc>
483
<term><code><label id="file"><file></label></code></term>
484
<desc>The content is a filename.</desc>
485
<term><code><label id="ivar"><ivar></label></code></term>
486
<desc>The content is a metasyntactic ivariable name.</desc>
487
<term><code><label id="var"><var></label></code></term>
488
<desc>The content is a metasyntactic variable or argument name.</desc>
489
<term><code><label id="site"><site></label></code></term>
490
<desc>The content is a fully qualified domain name on the Internet.
492
<term><code><label id="cdata">(text)</label></code></term>
493
<desc>Unstructured text content is also allowed.</desc>
497
<section id="listElements"><label id="listElements"/>
498
<heading>List Elements</heading>
500
<em>List elements</em> can occur within blocks and typically within
501
other block elements such as
502
<code><ref id="example">example</ref></code> as well. They support
503
presentation of various types of lists.
504
The list elements are -
507
<term><code><label id="list"><list></label></code></term>
508
<desc>A simple, unnumbered list of items, each contained within an
509
<code><item></code> tag.</desc>
510
<term><code><label id="enum"><enum></label></code></term>
511
<desc>A numbered list (<code><item></code> tags).</desc>
512
<term><code><label id="deflist"><deflist></label></code></term>
513
<desc>A list of terms with definitions, marked as alternating
514
<code><term></code> and <code><desc></code> tags.</desc>
515
<term><code><label id="dictionary"><dictionary></label></code>
517
<desc>An attribute-value list similar to an NSDictionary. Consists
518
of a sequence of <code><dictionaryItem></code> tags each with
519
a required <code>key</code> attribute and an optional
520
<code>value</code> attribute. If this is excluded, the element
521
content, which may be any
522
<ref id="blockElements"><em>block</em> element</ref> (including
523
another <code><dictionary></code> tag) is the value.</desc>
524
<term><code><label id="qalist"><qalist></label></code></term>
525
<desc>A list of <code><question></code>s and
526
<code><answer></code>s.</desc>
530
<section id="crossrefElements"><label id="crossrefElements"/>
531
<heading>Cross-Reference Elements</heading>
533
<em>Cross-reference elements</em> can occur within blocks and
534
typically anywhere text elements can occur. They represent
535
references to other entities inside or outside the project being
536
documented. In output formats that support it, they are generally
537
transformed into hyperlinks. The cross-reference elements are -
540
<term><code><label id="ref"><ref></label></code></term>
541
<desc>A reference to another entity within collection of documents
542
describing the current project. In practice this means a reference
543
to an element in a GSDoc document. Standard conventions for document
544
naming and structure are used to generate a hyperlink in output.
545
To support this resolution, two attributes must be specified.
547
<term><code>type</code></term>
548
<desc>This is the type of entity being referenced. It may take
549
one of the following values: <code>class</code>,
550
<code>category</code>, <code>protocol</code>, <code>method</code>,
551
<code>ivariable</code>, <code>function</code>, <code>type</code>,
552
<code>macro</code>, <code>variable</code>, <code>constant</code>,
553
<code>label</code>, <code>EOModel</code>, <code>EOEntity</code>.
554
If <code>type</code> is not specified, "<code>label</code>" is
556
<term><code>id</code></term>
557
<desc>Specifies the identifier of the reference. In most cases
558
this will be the name of the class, method, or other specific
559
entity being referenced. In the case of <code>label</code>
560
references, this is the <code>id</code> attribute of the label
561
being referenced.</desc>
562
<term><code>class</code></term>
563
<desc>In the case where a <code>method</code> is being referenced,
564
the <code>class</code> attribute should be specified as well, and
565
should contain the name of the class the method occurs in, in one
566
of the following formats: "classname", "classname(categoryname)",
567
or "(protocolname)".</desc>
570
<term><code><label id="prjref"><prjref></label></code></term>
571
<desc>A reference to another project, which assumedly has also had
572
GSDoc generated for it. A link in the output will be generated to
573
???. The <code><prjref></code> tag may contain text content,
574
which appears in the output.</desc>
575
<term><code><label id="uref"><uref></label></code></term>
576
<desc>A reference to a URL. Usage is similar to the
577
<code><A></code> tag in HTML, except that the attribute
578
'<code>url</code>' is used for the URL rather than
579
'<code>href</code>'. Text contents are shown in the output to label
580
the hyperlink.</desc>
581
<term><code><label id="url"><url></label></code></term>
582
<desc>Similar to <code><uref></code> except the URL itself is
583
automatically used as the hyperlink label (and so the tag itself does
584
not have text content).</desc>
585
<term><code><label id="email"><email></label></code></term>
586
<desc>An email address. Translates in HTML output to a
587
<code>mailto:</code> link.</desc>
588
<term><code><label id="entry"><entry></label></code></term>
589
<desc>An entry for the general index. Contains text elements but
590
this text appears only in the index, and never in the text itself.
591
It takes a single attribute, <code>id</code>, which may be used to
592
refer to the entry. (If it is absent any text content is taken to
594
<term><code><label id="label"><label></label></code></term>
595
<desc>A general purpose marker that can contain text elements,
596
which will appear in the output where the label occurs.
597
It takes a single attribute, <code>id</code>, which may be used to
598
refer to the label. (If it is absent any text content is taken to
603
<section id="definitionElements"><label id="definitionElements"/>
604
<heading>Definition Elements</heading>
606
<em>Definition elements</em> are specialized elements for software
607
documentation. They can occur in most places that block elements
608
can occur. They represent specific Objective-C elements, and are
609
formatted specially in output. In the majority of cases, you will
610
not need to write GSDoc using these elements, since they can be
611
autogenerated from Objective-C source files and special comments
612
within them. The definition elements are -
616
<term><code><label id="class"><class></label></code></term>
618
An Objective-C <em>class</em> definition. This is the main element
619
for Objective-C code documentation. The <code>name</code> attribute
620
is required for this element - it is the name of the class. The
621
<code>super</code> attribute is normally necessary to provide the
622
name of the superclass.
624
The elements in a <code><class></code> are - an optional
625
<ref id="declared">declared</ref> element,
626
zero or more <ref id="conform">conform</ref> elements,
627
an optional <ref id="desc">desc</ref>,
628
zero or more <ref id="ivariable">ivariable</ref> elements,
629
zero or more <ref id="method">method</ref> elements,
630
and an optional <ref id="standards">standards</ref> element.
634
<term><code><label id="category"><category></label></code>
637
An Objective-C <em>category</em> definition. It requires both a
638
<code>name</code> attribute providing the name of the category,
639
and a <code>class</code> attribute naming the class the category
642
The elements in a <code><category></code> are - an optional
643
<ref id="declared">declared</ref> element,
644
zero or more <ref id="conform">conform</ref> elements,
645
an optional <ref id="desc">desc</ref>,
646
zero or more <ref id="method">method</ref> elements,
647
and an optional <ref id="standards">standards</ref> element.
651
<term><code><label id="protocol"><protocol></label></code>
654
An Objective-C <em>protocol</em> definition. It requires a
655
<code>name</code> attribute providing the name of the protocol.
657
The elements in a <code><protocol></code> are - an optional
658
<ref id="declared">declared</ref> element,
659
zero or more <ref id="conform">conform</ref> elements,
660
an optional <ref id="desc">desc</ref>,
661
zero or more <ref id="method">method</ref> elements,
662
and an optional <ref id="standards">standards</ref> element.
666
<term><code><label id="function"><function></label></code>
669
A C <em>function</em> definition. It requires a
670
<code>name</code> attribute providing the function's name and a
671
<code>type</code> attribute providing the return type.
673
The elements in a <code><function></code> are -
674
a series of zero or more <ref id="arg">arg</ref> elements,
675
followed by an optional <ref id="vararg">arg</ref> element,
676
then an optional <ref id="declared">declared</ref> element,
677
an optional <ref id="desc">desc</ref>,
678
and an optional <ref id="standards">standards</ref> element.
682
<term><code><label id="macro"><macro></label></code></term>
684
A C <em>macro</em> definition. It requires a
685
<code>name</code> attribute providing the macro's name.
687
The elements in a <code><macro></code> are -
688
a series of zero or more <ref id="arg">arg</ref> elements,
689
followed by an optional <ref id="vararg">arg</ref> element,
690
then an optional <ref id="declared">declared</ref> element,
691
an optional <ref id="desc">desc</ref>,
692
and an optional <ref id="standards">standards</ref> element.
696
<term><code><label id="type"><type></label></code></term>
698
A C <em>type</em> definition. It requires a
699
<code>name</code> attribute providing the macro's name.
701
The elements in a <code><macro></code> are -
702
an optional <ref id="declared">declared</ref> element,
703
an optional <ref id="desc">desc</ref>,
704
and an optional <ref id="standards">standards</ref> element.
708
<term><code><label id="constant"><constant></label></code>
711
A C <em>constant</em> definition. It requires
712
<code>name</code> and <code>type</code> attributes and a
713
<code>value</code> attribute is optional. In addition, an
714
Objective-C role for the constant may be specified using the
715
<code>role</code> attribute. Acceptable values for this attribute
716
are: "<code>except</code>", "<code>defaults</code>",
717
"<code>notify</code>", or "<code>key</code>".
719
The elements in a <code><constant></code> are -
720
an optional <ref id="declared">declared</ref> element,
721
an optional <ref id="desc">desc</ref>,
722
and an optional <ref id="standards">standards</ref> element.
726
<term><code><label id="variable"><variable></label></code>
729
A C <em>variable</em> definition. It requires
730
<code>name</code> and <code>type</code> attributes and a
731
<code>value</code> attribute is optional.
733
The elements in a <code><variable></code> are -
734
an optional <ref id="declared">declared</ref> element,
735
an optional <ref id="desc">desc</ref>,
736
and an optional <ref id="standards">standards</ref> element.
740
<term><code><label id="ivariable"><ivariable></label></code>
743
An objective C <em>instance variable</em> definition. It requires
744
<code>name</code> and <code>type</code> attributes and a
745
<code>validity</code> attribute optionally specifies the access
746
level for the variable (may be "<code>public</code>",
747
"<code>protected</code>", or "<code>private</code>", the default
748
is "<code>public</code>").
750
The elements in a <code><variable></code> are -
751
an optional <ref id="desc">desc</ref>,
752
and an optional <ref id="standards">standards</ref> element.
756
<term><code><label id="desc"><desc></label></code></term>
757
<desc>An element for general descriptive text. Contains a block and
758
occurs in various contexts including <ref id="deflist">deflists</ref>
760
<ref id="definitionElements">definition elements</ref>.<br/><br/>
763
<term><code><label id="standards"><standards></label></code>
766
This element contains any number of standard elements which
767
specify what standards a particular piece of code does or does
770
The defined values are -
772
<item><code><GNUstep/></code></item>
773
<item><code><OpenStep/></code></item>
774
<item><code><NotOpenStep/></code></item>
775
<item><code><MacOS-X/></code></item>
776
<item><code><NotMacOS-X/></code></item>
781
<term><code><label id="conform"><conform></label></code></term>
783
This element contains simple text giving the name of a protocol
784
or interface to which a class conforms.<br/><br/>
787
<term><code><label id="declared"><declared></label></code>
790
This element contains simple text giving the name of the header
791
file in which something is declared.<br/><br/>
794
<term><code><label id="method"><method></label></code>
797
Describes an Objective-C method. Only valid within a
798
<ref id="class">class</ref>, <ref id="protocol">protocol</ref>,
799
or <ref id="category">category</ref>. An optional
800
<code>type</code> attribute describes the return type; an optional
801
<code>factory</code> attribute ("<code>yes</code>" or
802
"<code>no</code>", defaults to "<code>no</code>") specifies whether
803
this is a class or instance method. (Class methods are typically
804
only used for construction purposes in Objective-C.) An optional
805
<code>init</code> attribute (also taking
806
"<code>yes</code>" / "<code>no</code>") specifies whether this is
807
the designated constructor. An optional <code>override</code>
808
attribute specifies whether this method should be overridden
809
(if "yes" enter "<code>subclass</code>", if "no" enter
810
"<code>never</code>").
812
The elements in a <code><method></code> are -
813
the method's name (in a <ref id="sel">sel</ref> element), the
814
method's arguments (a sequence of <ref id="arg">arg</ref> then
815
<ref id="sel">sel</ref>,<ref id="arg">arg</ref> pairs, then an
816
optional <ref id="vararg">vararg</ref> element),
817
followed by an optional <ref id="desc">desc</ref>,
818
zero or more <ref id="ivariable">ivariable</ref> elements,
819
zero or more <ref id="method">method</ref> elements,
820
and an optional <ref id="standards">standards</ref> element.
824
<term><code><label id="sel"><sel></label></code></term>
826
Content is a method name or argument name (referred to as a
827
"selector" in some cases, but different from an Objective-C
828
method selector (runtime pointer to a method implementation).
832
<term><code><label id="arg"><arg></label></code></term>
834
Content is a an argument name. Takes a mandatory <code>type</code>
835
attribute giving the argument's type.
839
<term><code><label id="vararg"><vararg></label></code></term>
841
An empty element indicating that a variable argument list may be
842
used (in a <ref id="method">method</ref> or
843
<ref id="function">function</ref> definition).
853
<!-- Begin test dictionary. - ->
565
<heading>The gsdoc conversion tool</heading>
567
The gsdoc tool is written in Objective-C and uses the GNUstep base
568
library and the Gnome XML parser library.
571
This tool is intended to convert GSDoc documents to other formats
572
though, at present, only HTML output is supported.
575
Use of the tool is trivial - just provide it with a list of gsdoc
576
file names, and it will produce a load of html output files.
579
<heading>Parameters</heading>
581
<term><ref id="--makeRefs">--makeRefs=ReferencesFileName</ref> </term>
583
With this option, gsdoc reads gsdoc files and creates
584
ReferencesFileName.gsdocrefs files which can be used as
585
<ref id="">--refs</ref> to make links between elements.
587
<term><ref id="--projectName">--projectName=TheProjectName</ref>
590
Set the project name to "TheProjectName". It is used to index
593
<term><ref id="--refs">--refs=ARefFile or --refs=ARefDirectory</ref>
596
Use ARefFile.gsdocrefs (or files with extensions .gsdocrefs in
597
ARefDirectory directory) as references files. It enables you to
598
make links between documentation areas.
600
<term><ref id="--makeIndex">--makeIndex=MyIndexFileName</ref></term>
602
Create an index of the parsed files and save it as
603
MyIndexName.gsdoc. You have to set --makeIndexTemplate option.
605
<term><ref id="--makeIndexTemplate">--makeIndexTemplate=MyIndexTemplateFileName</ref></term>
607
The file used as index template for makeIndex option
609
<term><ref id="--define-">--define-XXX=YYY</ref></term>
611
Used to define a constant named XXX with value YYY in .gsdoc file,
612
all [[infoDictionary.XXX]] texts are replaced with YYY
614
<term><ref id="-verbose">--verbose=X</ref></term>
616
Level of traces from 0 to ...
618
<term><ref id="--location">--location=file://usr/doc/gnustep/MyProject or --location=http://www.gnustep.org/gnustep/MyProject</ref></term>
620
Location of the installed documentation (it helps to make links
623
<term><ref id="files">file1 file2</ref></term>
625
The .gsdoc files to be processed.
630
<heading>Example</heading>
632
<heading>AutoDoc</heading>
634
autodoc -allclasses -format html -template \
635
/usr/GNUstep/System/Libraries/Resources/DocTemplates/AutoDocTemplate.gsdoc \
636
-copyright "Orange Concept" \
637
-define-author-name "Manuel Guesdon" \
638
-define-author-email "mguesdon@orange-concept.com" \
639
-define-author-desc "Developer" \
640
-define-author-url "http://www.orange-concept.com" -define-dtd-ref \
641
"/usr/GNUstep/System/Libraries/Resources/DTDs/gsdoc-0_6_6.dtd" \
642
-define-stylesheeturl "http://www.orange-concept.com/styles/default.css" \
643
-define-basetitle "MyDoc:" \
644
-define-dtd-url "http://www.gnustep.org/gsdoc-0_6_6.xml" \
645
-define-next "[[next]]" -define-prev "[[prev]]" -define-up "[[up]]" \
649
The above example takes MySource.h and MySource.m and generates
650
one or more gsdoc files (they have the extension .html,
651
so please rename them with .gsdoc extension after running
656
<heading>GSDoc</heading>
658
gsdoc MyFile1.gsdoc MyFile2.gsdoc Explanations.gsdoc --makeRefs --makeIndex \
659
--makeIndexTemplate=/usr/GNUstep/System/Libraries/Resources/DocTemplates/indextemplate.gsdoc \
660
--projectName="MyProject" --refs=/usr/doc/gnustep --define-version=2.1 \
661
--verbose=1 --location="/usr/doc/gnustep/MyProject"
664
The above example will parse MyFile1.gsdoc MyFile2.gsdoc and
665
generate MyFile1.html and MyFile2.html. It generates
666
MyProject.gsdocrefs which will countain references of symbols
667
found in MyFile1.gsdoc and MyFile2.gsdoc. MyFile1.html and
668
MyFile2.html will have links to symbols found in
669
MyProject.gsdocrefs and in .gsdocrefs founds in subdirectories of
670
/usr/doc/gnustep. I indicate that the location of this doc will
671
be /usr/doc/gnustep/MyProject. It also generate an index of
672
MyFile1.html and MyFile2.html contents with the template
673
/usr/GNUstep/System/Libraries/Resources/DocTemplates/indextemplate.gsdoc.
674
Index file is index.gsdoc and the resulting file index.html is
675
automatically generated. I define "version" so the index will
855
<heading>Dictionary Test</heading>
857
<dictionaryItem key="key1" value="value1"/>
858
<dictionaryItem key="key2">value2</dictionaryItem>
859
<dictionaryItem key="key3">
861
<dictionaryItem key="key3a" value="value3a"/>
862
<dictionaryItem key="key3b">value3b</dictionaryItem>
863
<dictionaryItem key="key3c">
865
<dictionaryItem key="key3cI" value="value3cI"/>
870
<dictionaryItem key="key4" value="value4"/>
873
< !- - End test dictionary. -->
685
<heading>Afterward</heading>
878
<heading>Afterward</heading>
688
<index type="label"/>