![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/share/doc/gnustep-base-doc/Tools/Reference/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>GNUstep Documentation XML markup language (GSDoc)</title> </head> <body> <font face="serif"> <h1><a name="title$gsdoc">GNUstep Documentation XML markup language (GSDoc)</a></h1> <h3>Authors</h3> <dl> <dt><a href="http://www.gnustep.org/developers/whoiswho.html">Richard Frith-Macdonald</a> (<a href="mailto:rfm@gnu.org"><code>rfm@gnu.org</code></a>)</dt> <dd> <div class="desc"> A person who devotes far too much time to GNUstep development. </div> </dd> </dl> <p><b>Version:</b> 1.0.3</p> <p><b>Date:</b> 6 Nov, 2006</p> <blockquote> This documents the GNUstep Documentation markup language. </blockquote> <p><b>Copyright:</b> (C) Free Software Foundation, Inc.</p> <div> <hr width="50%" align="left" /> <h3>Contents -</h3> <ol> <li> <a href="#001000000000">Introduction</a> </li> <li> <a href="#001001000000">Why another documentation language?</a> </li> <li> <a href="#002000000000">The gsdoc DTD and what it means</a> </li> <li> <a href="#002001000000">Overall document structure</a> </li> <li> <a href="#002002000000">The document head</a> </li> <li> <a href="#002003000000">The document body</a> </li> <li> <a href="#003000000000">Element reference</a> </li> <li> <a href="#003001000000">Sectioning Elements</a> </li> <li> <a href="#003002000000">Block Elements</a> </li> <li> <a href="#003003000000">Text Elements</a> </li> <li> <a href="#003004000000">List Elements</a> </li> <li> <a href="#003005000000">Cross-Reference Elements</a> </li> <li> <a href="#003006000000">Definition Elements</a> </li> </ol> <hr width="50%" align="left" /> <h1><a name="001000000000">Introduction</a></h1> <p> The GNUstep documentation markup language (GSDoc) is an XML language designed specifically for writing documentation for the <a href="http://www.gnustep.org">GNUstep project</a>. In practice, that means that it is designed for writing about software, and in particular, for writing about Objective-C classes. </p> <p> This document itself is an example, as well as a test case, of GSDoc itself. </p> <h2><a name="001001000000">Why another documentation language?</a></h2> <p> There are several reasons for producing the new markup language - </p> <ul> <li> There were no existing markup languages that dealt well with documenting software written in the Objective-C language, except the GDML language - which has no easy to use support software. </li> <li> While the DocBook system works nicely for general software documentation, it requires a relatively large amount of support software and comes with a lot of baggage that's not directly useful for GNUstep. </li> <li> The GNU info system comes with easy to use, lightweight conversion tools, but is particularly ill suited to Objective-C documentation because the colon character using in Objective-C method names is used in info markup. </li> <li> LinuxDoc, while being a nice basic system, seems to be in the process of being replaced by DocBook. </li> </ul> <p> So, with only one markup language available that supported Objective-C, and with XML software becoming available, the decision was to take GDML and update it to be an XML language, in the hope that this would - </p> <ul> <li> Provide optimal support for GNUstep documentation. </li> <li> Minimize the amount of work needed for development of software tools. </li> <li> Provide future-proofing in that documentation written in one XML language should be quite easy to convert to another if necessary. </li> </ul> </div> <h1><a name="002000000000">The gsdoc DTD and what it means</a></h1> <p> The GSDoc markup language is defined by an SGML DTD, that specifies the tags that may be used in marking up a GSDoc document, and how and where those tags may be placed. The reader is encouraged to consult the DTD directly on any points that the present document leaves unclear. The DTD is stored under <code>GNUSTEP_SYSTEM_LIBRARY/DTDs</code> in a standard GNUstep installation. .. where GNUSTEP_SYSTEM_LIBRARY is defined in the GNUstep configuration file (GNUstep.conf). </p> <p> The gsdoc DTD defines an XML language - that is, a markup language that conforms to a specific subset of SGML features defined as XML. The advantage of XML is that it provides most of the useful features of SGML while being much more light-weight (easy to use) because you can forget about the rest of SGML. As XML looks set to become increasingly popular, we can hope that documentation written with an XML language will be easily imported into XML software tools as they become available, so we will not (in the GNUstep project) need to devote a lot of time and effort to maintaining documentation tools. </p> <a name="label$gsdoc"></a> <h2><a name="002001000000">Overall document structure</a></h2> <p> A GSDoc document consists of a <a rel="gsdoc" href="#label$head">head</a> and a <a rel="gsdoc" href="#label$body">body</a> wrapped inside the overall document framework that looks like this - </p> <pre> <?xml version="1.0"?> <!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.2//EN" "http://www.gnustep.org/gsdoc-1_0_2.xml"> <gsdoc base="MyDoc" prev="First" next="Last" up="Overview"> <head> ... your document head here </head> <body> ... your document body here </body> </gsdoc> </pre> <p> The above example shows a GSDoc document framework. The first line specifies the XML version that the document conforms to. The second line specifies the version of GSDoc that the document conforms to. The third and final lines frame the main part of the document and supply all the (optional) attributes of the <em>gsdoc</em> element - </p> <dl> <dt><code>base</code></dt> <dd> This is optional, but recommended - it specifies the base name for the document. When the document is translated to another format, the output file name should be based on this - eg. if the base name of a document is <em>foo</em> then an html output for this file would be <em>foo.html</em>. </dd> <dt><code>prev</code></dt> <dd> This optional attribute may be used as the name of a document that precedes this one in logical reading order. If the converted output format of the document supports some sort of link between documents, the converter software may insert a link between the two documents. </dd> <dt><code>next</code></dt> <dd> This optional attribute may be used as the name of a document that follows this one in logical reading order. If the converted output format of the document supports some sort of link between documents, the converter software may insert a link between the two documents. </dd> <dt><code>up</code></dt> <dd> This optional attribute may be used as the name of a document that is above this document in some sort of hierarchical structure (a contents list perhaps). If the converted output format of the document supports some sort of link between documents, the converter software may insert a link between the two documents. </dd> </dl> <a name="label$head"></a> <h2><a name="002002000000">The document head</a></h2> <p> The document head contains information about the document as a whole: its title, authors, version, modification date, copyright, and perhaps an abstract of its contents. The title is the only part of the document head that must be present, although at least one author is strongly encouraged. </p> <pre> <head> <title>GNUstep Documentation XML markup language (GSDoc)</title> <author name="Richard Frith-Macdonald"> <email address="rfm@gnu.org"/> <url url="http://www.gnustep.org/developers/whoiswho.html"/> <desc> A person who devotes far too much time to GNUstep development. </desc> </author> <version>0.1</version> <date>4 march, 2000</date> <abstract> This documents the GNUstep Documentation markup language and tools </abstract> <copy>Free Software Foundation, Inc.</copy> </head> </pre> <p> The above example shows all the elements possible in a document head. Only title is required (author is strongly encouraged), but if present they must occur in the order shown - </p> <dl> <dt><code><a name="label$title"><title></a></code></dt> <dd> The title of the document. Required. </dd> <dt><code><a name="label$author"><author></a></code></dt> <dd> The author of the document, also specifying an email address at which the author may be reached, a URL for a web page giving some information about the author, and an additional description of the author. (Of course, a document may have more than one author, in which case you simply write multiple author elements.) Not required, but strongly encouraged. </dd> <dt><code><a name="label$version"><version></a></code></dt> <dd> The version number of the document. </dd> <dt><code><a name="label$date"><date></a></code></dt> <dd> The date at which the document was last modified. </dd> <dt><code><a name="label$abstract"><abstract></a></code></dt> <dd> A <em>short</em> description of the document contents. </dd> <dt><code><a name="label$copy"><copy></a></code></dt> <dd> The copyright owner of the document. </dd> </dl> <a name="label$body"></a> <h2><a name="002003000000">The document body</a></h2> <p> The document body contains the main part of the document, it consists of an optional front part (for contents pages, overview etc), a sequence of any number of chapters, and an optional back part (for indexes, appendices etc). Normally, each of these three parts of the document would be expected to have their own separate page numbering schemes. </p> <pre> <body> <front> <contents/> <chapter> <heading>Preface</heading> <p> Here is an introductory chapter for a dummy document. </p> </chapter> </front> <chapter> <heading>Main text</heading> <p> Here is the main text of a chapter in the document. </p> </chapter> <back> <chapter> <heading>Afterword</heading> <p> And after the main part of the doucment we can have some other stuff. </p> </chapter> <index type="class"/> </back> </body> </pre> <p> The above example shows all the elements possible at the top level in a document body - </p> <dl> <dt><code><front></code></dt> <dd> This is an optional part of the document that can come before the main text. Typically, this could be used to contain an automatically generated contents page and possibly an introduction. When output is generated in book form, this part of the document would probably have a different page numbering scheme from the main part. <p> The <code><contents></code> subelement is used as a marker to specify that an automatically generated contents page (listing the chapters in the document) is to be inserted. </p> </dd> <dt><code><chapter></code></dt> <dd> After the <em>front</em> part of the document body comes a mandatory sequence of one or more chapters. This is where the main part of the document resides. Each <a rel="gsdoc" href="#label$chapter">chapter</a> consists of a <a rel="gsdoc" href="#label$heading">heading</a> , any number of blocks of information, and any number of sections. </dd> <dt><br /><code><back></code></dt> <dd> After the chapters making up the main part of the body of the document is an optional <em>back</em> part which may contain chapters (such as appendices) possibly followed by an automatically generated index. <p> The <code><index></code> element is used as a marker to specify that an automatically generated index is to be inserted. See <a rel="gsdoc" href="#label$index">below</a> for details. </p> </dd> </dl> <h1><a name="003000000000">Element reference</a></h1> <p> The allowable elements in GSDoc documents are described below, broken into sections by usage context. </p> <a name="label$sectioningElements"></a> <h2><a name="003001000000">Sectioning Elements</a></h2> <p> <em>Sectioning elements</em> define hierarchical document structure. </p> <dl> <dt><code><a name="label$chapter"><chapter></a></code></dt> <dd> This is the basic, top-level element of the document body. Each chapter consists of a <a rel="gsdoc" href="#label$heading">heading</a> , zero or more <a rel="gsdoc" href="#label$blockElements">blocks</a> , and zero or more <a rel="gsdoc" href="#label$section">sections</a> . Each chapter in the document is automatically listed in the documents contents page (if it has one). </dd> <dt><code><a name="label$section"><section></a></code></dt> <dd> First level below <code>chapter</code>. It contains <a rel="gsdoc" href="#label$subsection">sub-sections</a> where a chapter would contain sections. </dd> <dt><code><a name="label$subsection"><subsection></a></code> </dt> <dd> Level below <code>section</code>. </dd> <dt><code><a name="label$subsubsection"><subsubsection></a></code></dt> <dd> Level below <code>subsection</code>. </dd> <dt><code><a name="label$heading"><heading></a></code></dt> <dd> Each <a rel="gsdoc" href="#label$chapter">chapter</a> , <a rel="gsdoc" href="#label$section">section</a> <a rel="gsdoc" href="#label$subsection">sub-section</a> , or <a rel="gsdoc" href="#label$subsubsection">sub-sub-section</a> has a heading as the first thing in it. These headings introduce the sections and are listed in the contents page. </dd> </dl> <a name="label$blockElements"></a> <h2><a name="003002000000">Block Elements</a></h2> <p> <em>Block elements</em> can occur at the top level of sections, as well is in certain other contexts. The block elements are - </p> <dl> <dt><code><a name="label$embed"><embed></a></code></dt> <dd> marks embedded information from elsewhere </dd> <dt><br /><code><a name="label$example"><example></a></code></dt> <dd> marks an example </dd> <dt><br /><code><a name="label$index"><index></a></code></dt> <dd> The <code><index></code> tag is special in that it is dynamically expanded during output based on information that has been collated from reading in various documentation and source files. The <code>type</code> attribute of the index specifies what sort of item is to be in the index - the default type of <code>label</code> causes an index of all <em>label</em> and <em>entry</em> elements to be generated. Currently the allowable types are: <code>class</code>, <code>category</code>, <code>protocol</code>, <code>method</code>, <code>ivariable</code>, <code>function</code>, <code>type</code>, <code>macro</code>, <code>variable</code>, <code>constant</code>, <code>label</code>, <code>title</code>, <code>EOModel</code> (associated with the Enterprise Objects Framework, for interacting with databases), <code>EOEntity</code>. The default is "<code>label</code>". <p> The <code><index></code> element also takes three optional attributes - </p> <dl> <dt><code>scope</code></dt> <dd> Determines whether the index is generated for the current file ("<code>file</code>" scope), or for the whole of the current project ("<code>project</code>" scope), or for everything the software can find ("<code>global</code>" scope). In certain contexts the specified scope is automatically overridden ... if the document is processed in a standalone manner, the scope is always "<code>file</code>". For method or ivariable indexing, if the index is inside a class, protocol, or category, only indexes for that unit are generated. </dd> <dt><code>style</code></dt> <dd> Determines whether the index is presented with standard embellishments such as bulleted entries and a header ("<code>normal</code>" style) or in a minimalist style suitable for, e.g., a navigation bar ("<code>bare</code>" style). </dd> <dt><code>target</code></dt> <dd> Provides additional information to accompany links formed from the index. For HTML output, this is translated into a "<code>target</code>" attribute to the <code><a> href="..."</code> element generated for a link. In most cases this can safely be left out. </dd> </dl> </dd> <dt><br /><em>text elements</em></dt> <dd> A variety of elements for text formatting, many based on HTML tags. See <a rel="gsdoc" href="#label$textElements">below</a> for details. </dd> <dt><br /><em>list elements</em></dt> <dd> A variety of lists. See <a rel="gsdoc" href="#label$listElements">below</a> for details. </dd> <dt><br /><em>cross reference elements</em></dt> <dd> A variety of elements for representing external references and internal references to other parts of a document. See <a rel="gsdoc" href="#label$crossrefElements">below</a> for details. </dd> <dt><br /><em>definition elements</em></dt> <dd> A variety of specialised elements for software documentation. See <a rel="gsdoc" href="#label$definitionElements">below</a> for details. </dd> </dl> <a name="label$textElements"></a> <h2><a name="003003000000">Text Elements</a></h2> <p> <em>Text elements</em> can occur within blocks and typically within other block elements such as <code><a rel="gsdoc" href="#label$example">example</a> </code> as well. They carry out various presentation-related purposed. The text elements are - </p> <dl> <dt><code><a name="label$p"><p></a></code></dt> <dd> The paragraph, as in HTML. The paragraph element simply contains <a rel="gsdoc" href="#label$textElements">text</a> . Most descriptive writing is inside paragraphs. </dd> <dt><code><a name="label$br"><br></a></code></dt> <dd> The line-break, as in HTML. </dd> <dt><code><a name="label$example"><example></a></code> </dt> <dd> Marks an example. </dd> <dt><code><a name="label$footnote"><footnote></a></code> </dt> <dd> A reference to a footnote that appears in full elsewhere. </dd> <dt><code><a name="label$code"><code></a></code></dt> <dd> The content is either a name for code (e.g. class names), or a relatively short code fragment. </dd> <dt><code><a name="label$em"><em></a></code></dt> <dd> Emphasized text. </dd> <dt><code><a name="label$strong"><strong></a></code></dt> <dd> More strongly emphasized text. </dd> <dt><code><a name="label$file"><file></a></code></dt> <dd> The content is a filename. </dd> <dt><code><a name="label$ivar"><ivar></a></code></dt> <dd> The content is a metasyntactic ivariable name. </dd> <dt><code><a name="label$var"><var></a></code></dt> <dd> The content is a metasyntactic variable or argument name. </dd> <dt><code><a name="label$site"><site></a></code></dt> <dd> The content is a fully qualified domain name on the Internet. </dd> <dt><code><a name="label$cdata">(text)</a></code></dt> <dd> Unstructured text content is also allowed. </dd> </dl> <a name="label$listElements"></a> <h2><a name="003004000000">List Elements</a></h2> <p> <em>List elements</em> can occur within blocks and typically within other block elements such as <code><a rel="gsdoc" href="#label$example">example</a> </code> as well. They support presentation of various types of lists. The list elements are - </p> <dl> <dt><code><a name="label$list"><list></a></code></dt> <dd> A simple, unnumbered list of items, each contained within an <code><item></code> tag. </dd> <dt><code><a name="label$enum"><enum></a></code></dt> <dd> A numbered list (<code><item></code> tags). </dd> <dt><code><a name="label$deflist"><deflist></a></code></dt> <dd> A list of terms with definitions, marked as alternating <code><term></code> and <code><desc></code> tags. </dd> <dt><code><a name="label$dictionary"><dictionary></a></code> </dt> <dd> An attribute-value list similar to an NSDictionary. Consists of a sequence of <code><dictionaryItem></code> tags each with a required <code>key</code> attribute and an optional <code>value</code> attribute. If this is excluded, the element content, which may be any <a rel="gsdoc" href="#label$blockElements"><em>block</em> element</a> (including another <code><dictionary></code> tag) is the value. </dd> <dt><code><a name="label$qalist"><qalist></a></code></dt> <dd> A list of <code><question></code>s and <code><answer></code>s. </dd> </dl> <a name="label$crossrefElements"></a> <h2><a name="003005000000">Cross-Reference Elements</a></h2> <p> <em>Cross-reference elements</em> can occur within blocks and typically anywhere text elements can occur. They represent references to other entities inside or outside the project being documented. In output formats that support it, they are generally transformed into hyperlinks. The cross-reference elements are - </p> <dl> <dt><code><a name="label$ref"><ref></a></code></dt> <dd> A reference to another entity within collection of documents describing the current project. In practice this means a reference to an element in a GSDoc document. Standard conventions for document naming and structure are used to generate a hyperlink in output. To support this resolution, two attributes must be specified. <dl> <dt><code>type</code></dt> <dd> This is the type of entity being referenced. It may take one of the following values: <code>class</code>, <code>category</code>, <code>protocol</code>, <code>method</code>, <code>ivariable</code>, <code>function</code>, <code>type</code>, <code>macro</code>, <code>variable</code>, <code>constant</code>, <code>label</code>, <code>EOModel</code>, <code>EOEntity</code>. If <code>type</code> is not specified, "<code>label</code>" is assumed. </dd> <dt><code>id</code></dt> <dd> Specifies the identifier of the reference. In most cases this will be the name of the class, method, or other specific entity being referenced. In the case of <code>label</code> references, this is the <code>id</code> attribute of the label being referenced. </dd> <dt><code>class</code></dt> <dd> In the case where a <code>method</code> is being referenced, the <code>class</code> attribute should be specified as well, and should contain the name of the class the method occurs in, in one of the following formats: "classname", "classname(categoryname)", or "(protocolname)". </dd> </dl> </dd> <dt><code><a name="label$prjref"><prjref></a></code></dt> <dd> A reference to another project, which assumedly has also had GSDoc generated for it. A link in the output will be generated to ???. The <code><prjref></code> tag may contain text content, which appears in the output. </dd> <dt><code><a name="label$uref"><uref></a></code></dt> <dd> A reference to a URL. Usage is similar to the <code><A></code> tag in HTML, except that the attribute '<code>url</code>' is used for the URL rather than '<code>href</code>'. Text contents are shown in the output to label the hyperlink. </dd> <dt><code><a name="label$url"><url></a></code></dt> <dd> Similar to <code><uref></code> except the URL itself is automatically used as the hyperlink label (and so the tag itself does not have text content). </dd> <dt><code><a name="label$email"><email></a></code></dt> <dd> An email address. Translates in HTML output to a <code>mailto:</code> link. </dd> <dt><code><a name="label$entry"><entry></a></code></dt> <dd> An entry for the general index. Contains text elements but this text appears only in the index, and never in the text itself. It takes a single attribute, <code>id</code>, which may be used to refer to the entry. (If it is absent any text content is taken to be the id.) </dd> <dt><code><a name="label$label"><label></a></code></dt> <dd> A general purpose marker that can contain text elements, which will appear in the output where the label occurs. It takes a single attribute, <code>id</code>, which may be used to refer to the label. (If it is absent any text content is taken to be the id.) </dd> </dl> <a name="label$definitionElements"></a> <h2><a name="003006000000">Definition Elements</a></h2> <p> <em>Definition elements</em> are specialized elements for software documentation. They can occur in most places that block elements can occur. They represent specific Objective-C elements, and are formatted specially in output. In the majority of cases, you will not need to write GSDoc using these elements, since they can be autogenerated from Objective-C source files and special comments within them. Most of the elements representing parts of the API have optional attributes ovadd, ovdep and ovrem which may be used to specify the OpenStep/OPENSTEP/MacOS-X versions at which the documented element was added to, deprecated in, or removed from the API, Similarly they have gvadd, gvdep and gvrem which may be used to specify when an elment was added to or removed from the API of the source code being documented (eg a gnustep library).<br /> The definition elements are - </p> <dl> <dt><code><a name="label$class"><class></a></code></dt> <dd> An Objective-C <em>class</em> definition. This is the main element for Objective-C code documentation. The <code>name</code> attribute is required for this element - it is the name of the class. The <code>super</code> attribute is normally necessary to provide the name of the superclass. <p> The elements in a <code><class></code> are - an optional <a rel="gsdoc" href="#label$declared">declared</a> element, zero or more <a rel="gsdoc" href="#label$conform">conform</a> elements, an optional <a rel="gsdoc" href="#label$desc">desc</a> , zero or more <a rel="gsdoc" href="#label$ivariable">ivariable</a> elements, zero or more <a rel="gsdoc" href="#label$method">method</a> elements. </p> </dd> <dt><code><a name="label$category"><category></a></code> </dt> <dd> An Objective-C <em>category</em> definition. It requires both a <code>name</code> attribute providing the name of the category, and a <code>class</code> attribute naming the class the category is associated with. <p> The elements in a <code><category></code> are - an optional <a rel="gsdoc" href="#label$declared">declared</a> element, zero or more <a rel="gsdoc" href="#label$conform">conform</a> elements, an optional <a rel="gsdoc" href="#label$desc">desc</a> , zero or more <a rel="gsdoc" href="#label$method">method</a> elements. </p> </dd> <dt><code><a name="label$protocol"><protocol></a></code> </dt> <dd> An Objective-C <em>protocol</em> definition. It requires a <code>name</code> attribute providing the name of the protocol. <p> The elements in a <code><protocol></code> are - an optional <a rel="gsdoc" href="#label$declared">declared</a> element, zero or more <a rel="gsdoc" href="#label$conform">conform</a> elements, an optional <a rel="gsdoc" href="#label$desc">desc</a> , zero or more <a rel="gsdoc" href="#label$method">method</a> elements. </p> </dd> <dt><code><a name="label$function"><function></a></code> </dt> <dd> A C <em>function</em> definition. It requires a <code>name</code> attribute providing the function's name and a <code>type</code> attribute providing the return type. <p> The elements in a <code><function></code> are - a series of zero or more <a rel="gsdoc" href="#label$arg">arg</a> elements, followed by an optional <a rel="gsdoc" href="#label$vararg">arg</a> element, then an optional <a rel="gsdoc" href="#label$declared">declared</a> element, an optional <a rel="gsdoc" href="#label$desc">desc</a> . </p> </dd> <dt><code><a name="label$macro"><macro></a></code></dt> <dd> A C <em>macro</em> definition. It requires a <code>name</code> attribute providing the macro's name. <p> The elements in a <code><macro></code> are - a series of zero or more <a rel="gsdoc" href="#label$arg">arg</a> elements, followed by an optional <a rel="gsdoc" href="#label$vararg">arg</a> element, then an optional <a rel="gsdoc" href="#label$declared">declared</a> element, an optional <a rel="gsdoc" href="#label$desc">desc</a> . </p> </dd> <dt><code><a name="label$type"><type></a></code></dt> <dd> A C <em>type</em> definition. It requires a <code>name</code> attribute providing the macro's name. <p> The elements in a <code><macro></code> are - an optional <a rel="gsdoc" href="#label$declared">declared</a> element, an optional <a rel="gsdoc" href="#label$desc">desc</a> . </p> </dd> <dt><code><a name="label$constant"><constant></a></code> </dt> <dd> A C <em>constant</em> definition. It requires <code>name</code> and <code>type</code> attributes and a <code>value</code> attribute is optional. In addition, an Objective-C role for the constant may be specified using the <code>role</code> attribute. Acceptable values for this attribute are: "<code>except</code>", "<code>defaults</code>", "<code>notify</code>", or "<code>key</code>". <p> The elements in a <code><constant></code> are - an optional <a rel="gsdoc" href="#label$declared">declared</a> element, an optional <a rel="gsdoc" href="#label$desc">desc</a> . </p> </dd> <dt><code><a name="label$variable"><variable></a></code> </dt> <dd> A C <em>variable</em> definition. It requires <code>name</code> and <code>type</code> attributes and a <code>value</code> attribute is optional. <p> The elements in a <code><variable></code> are - an optional <a rel="gsdoc" href="#label$declared">declared</a> element, an optional <a rel="gsdoc" href="#label$desc">desc</a> . </p> </dd> <dt><code><a name="label$ivariable"><ivariable></a></code> </dt> <dd> An objective C <em>instance variable</em> definition. It requires <code>name</code> and <code>type</code> attributes and a <code>validity</code> attribute optionally specifies the access level for the variable (may be "<code>public</code>", "<code>protected</code>", or "<code>private</code>", the default is "<code>public</code>"). <p> The elements in a <code><variable></code> are - an optional <a rel="gsdoc" href="#label$desc">desc</a> . </p> </dd> <dt><code><a name="label$desc"><desc></a></code></dt> <dd> An element for general descriptive text. Contains a block and occurs in various contexts including <a rel="gsdoc" href="#label$deflist">deflists</a> as well as most <a rel="gsdoc" href="#label$definitionElements">definition elements</a> .<br /><br /> </dd> <dt><code><a name="label$conform"><conform></a></code></dt> <dd> This element contains simple text giving the name of a protocol or interface to which a class conforms.<br /><br /> </dd> <dt><code><a name="label$declared"><declared></a></code> </dt> <dd> This element contains simple text giving the name of the header file in which something is declared.<br /><br /> </dd> <dt><code><a name="label$method"><method></a></code> </dt> <dd> Describes an Objective-C method. Only valid within a <a rel="gsdoc" href="#label$class">class</a> , <a rel="gsdoc" href="#label$protocol">protocol</a> , or <a rel="gsdoc" href="#label$category">category</a> . An optional <code>type</code> attribute describes the return type; an optional <code>factory</code> attribute ("<code>yes</code>" or "<code>no</code>", defaults to "<code>no</code>") specifies whether this is a class or instance method. (Class methods are typically only used for construction purposes in Objective-C.) An optional <code>init</code> attribute (also taking "<code>yes</code>" / "<code>no</code>") specifies whether this is the designated constructor. An optional <code>override</code> attribute specifies whether this method should be overridden. If it <em>must</em> be overridden enter "<code>subclass</code>", if it must <em>not</em> be overridden enter <code>never</code>", if it is an empty/dummy implementation which is intended to be overridden enter <code>dummy</code>, otherwise (for most methods which may be but are not particularly designed to be overridden) leave this attribute unset. <p> The elements in a <code><method></code> are - the method's name (in a <a rel="gsdoc" href="#label$sel">sel</a> element), the method's arguments (a sequence of <a rel="gsdoc" href="#label$arg">arg</a> then <a rel="gsdoc" href="#label$sel">sel</a> ,<a rel="gsdoc" href="#label$arg">arg</a> pairs, then an optional <a rel="gsdoc" href="#label$vararg">vararg</a> element), followed by an optional <a rel="gsdoc" href="#label$desc">desc</a> , zero or more <a rel="gsdoc" href="#label$ivariable">ivariable</a> elements, zero or more <a rel="gsdoc" href="#label$method">method</a> elements. </p> </dd> <dt><code><a name="label$sel"><sel></a></code></dt> <dd> Content is a method name or argument name (referred to as a "selector" in some cases, but different from an Objective-C method selector (runtime pointer to a method implementation). <br /><br /> </dd> <dt><code><a name="label$arg"><arg></a></code></dt> <dd> Content is a an argument name. Takes a mandatory <code>type</code> attribute giving the argument's type. <br /><br /> </dd> <dt><code><a name="label$vararg"><vararg></a></code></dt> <dd> An empty element indicating that a variable argument list may be used (in a <a rel="gsdoc" href="#label$method">method</a> or <a rel="gsdoc" href="#label$function">function</a> definition). <br /><br /> </dd> </dl> <div> </div> <br /> </font> </body> </html>