| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html> |
| <head> |
| <title>Type Names</title> |
| <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> |
| <style type="text/css"> |
| <!-- |
| h1 { text-align:center; margin-top: 0.2cm; text-decoration: none; color: #ffffff; font-size: 6; margin-top: 0.2cm} |
| h2 { margin-top: 0.2cm; margin-bottom=0.1cm; color: #ffffff; |
| background-color: #666699 } |
| li {margin-bottom: 0.2cm;} |
| dl {margin-bottom: 0.2cm;} |
| dd {margin-bottom: 0.2cm;} |
| dt {margin-bottom: 0.2cm;} |
| --> |
| </style> |
| </head> |
| <body> |
| |
| <table width="100%" border="0" cellspacing="0" cellpadding="4" bgcolor="#666699" |
| summary=header> |
| <tr><td> |
| <h1> Type Names </h1> |
| </td><td> |
| <a href="http://www.openoffice.org"><img |
| src="../../images/open_office_org_logo.gif" alt="OpenOffice.org" |
| align="right" border="0"/></a> |
| </td></tr> |
| </table> |
| |
| <p>This document describes how core UNO types (see |
| <a href="typesystem.html"><cite>UNO Type System</cite></a>) and related UNOIDL |
| entities (like typedefs, modules, and services) are named in binary UNO and in |
| the UNO type registry.</p> |
| |
| <table border="1" summary="Uno types"> |
| <thead> |
| <tr> |
| <th>UNO Type <var>t</var></th> |
| <th>Binary UNO Type Name <var>β</var>(<var>t</var>)</th> |
| <th>UNO Type Registry Name <var>ρ</var>(<var>t</var>)</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code>VOID</code></td> |
| <td><code>void</code></td> |
| <td><code>void</code></td> |
| </tr> |
| <tr> |
| <td><code>BOOLEAN</code></td> |
| <td><code>boolean</code></td> |
| <td><code>boolean</code></td> |
| </tr> |
| <tr> |
| <td><code>BYTE</code></td> |
| <td><code>byte</code></td> |
| <td><code>byte</code></td> |
| </tr> |
| <tr> |
| <td><code>SHORT</code></td> |
| <td><code>short</code></td> |
| <td><code>short</code></td> |
| </tr> |
| <tr> |
| <td><code>UNSIGNED SHORT</code></td> |
| <td><code>unsigned short</code></td> |
| <td><code>unsigned short</code></td> |
| </tr> |
| <tr> |
| <td><code>LONG</code></td> |
| <td><code>long</code></td> |
| <td><code>long</code></td> |
| </tr> |
| <tr> |
| <td><code>UNSIGNED LONG</code></td> |
| <td><code>unsigned long</code></td> |
| <td><code>unsigned long</code></td> |
| </tr> |
| <tr> |
| <td><code>HYPER</code></td> |
| <td><code>hyper</code></td> |
| <td><code>hyper</code></td> |
| </tr> |
| <tr> |
| <td><code>UNSIGNED HYPER</code></td> |
| <td><code>unsigned hyper</code></td> |
| <td><code>unsigned hyper</code></td> |
| </tr> |
| <tr> |
| <td><code>FLOAT</code></td> |
| <td><code>float</code></td> |
| <td><code>float</code></td> |
| </tr> |
| <tr> |
| <td><code>DOUBLE</code></td> |
| <td><code>double</code></td> |
| <td><code>double</code></td> |
| </tr> |
| <tr> |
| <td><code>CHAR</code></td> |
| <td><code>char</code></td> |
| <td><code>char</code></td> |
| </tr> |
| <tr> |
| <td><code>STRING</code></td> |
| <td><code>string</code></td> |
| <td><code>string</code></td> |
| </tr> |
| <tr> |
| <td><code>TYPE</code></td> |
| <td><code>type</code></td> |
| <td><code>type</code></td> |
| </tr> |
| <tr> |
| <td><code>ANY</code></td> |
| <td><code>any</code></td> |
| <td><code>any</code></td> |
| </tr> |
| <tr> |
| <td>Sequence type with component type <var>t</var>′</td> |
| <td><code>[]</code><var>β</var>(<var>t</var>′)</td> |
| <td><code>[]</code><var>ρ</var>(<var>t</var>′)</td> |
| </tr> |
| <tr> |
| <td>Enum type with structured name <var>n</var><sub>1</sub><!-- |
| --><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>k</var></sub>, <var>k</var> > 0</td> |
| <td><var>n</var><sub>1</sub><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>k</var></sub></td> |
| <td><var>n</var><sub>1</sub><code>/</code>…<code>/</code><!-- |
| --><var>n</var><sub><var>k</var></sub></td> |
| </tr> |
| <tr> |
| <td>Plain struct type with structured name |
| <var>n</var><sub>1</sub><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>k</var></sub>, <var>k</var> > 0</td> |
| <td><var>n</var><sub>1</sub><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>k</var></sub></td> |
| <td><var>n</var><sub>1</sub><code>/</code>…<code>/</code><!-- |
| --><var>n</var><sub><var>k</var></sub></td> |
| </tr> |
| <tr> |
| <td>Instantiated polymorphic struct type with polymorphic struct |
| type template with structured name <var>n</var><sub>1</sub><!-- |
| --><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>kn</var></sub>, <var>kn</var> > 0, and |
| type arguments ⟨<var>t</var><sub>1</sub>, …, |
| <var>t</var><sub><var>kt</var></sub>⟩, <var>kt</var> > |
| 0</td> |
| <td><var>n</var><sub>1</sub><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>kn</var></sub><code><</code><!-- |
| --><var>β</var>(<var>t</var><sub>1</sub>)<code>,</code><!-- |
| -->…<code>,</code><!-- |
| --><var>β</var>(<var>t</var><sub><var>kt</var></sub>)<!-- |
| --><code>></code></td> |
| <td><var>n</var><sub>1</sub><code>/</code>…<code>/</code><!-- |
| --><var>n</var><sub><var>kn</var></sub><code><</code><!-- |
| --><var>ρ</var>(<var>t</var><sub>1</sub>)<code>,</code><!-- |
| -->…<code>,</code><!-- |
| --><var>ρ</var>(<var>t</var><sub><var>kt</var></sub>)<!-- |
| --><code>></code></td> |
| </tr> |
| <tr> |
| <td>Exception type with structured name <var>n</var><sub>1</sub><!-- |
| --><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>k</var></sub>, <var>k</var> > 0</td> |
| <td><var>n</var><sub>1</sub><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>k</var></sub></td> |
| <td><var>n</var><sub>1</sub><code>/</code>…<code>/</code><!-- |
| --><var>n</var><sub><var>k</var></sub></td> |
| </tr> |
| <tr> |
| <td>Interface type with structured name <var>n</var><sub>1</sub><!-- |
| --><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>k</var></sub>, <var>k</var> > 0</td> |
| <td><var>n</var><sub>1</sub><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>k</var></sub></td> |
| <td><var>n</var><sub>1</sub><code>/</code>…<code>/</code><!-- |
| --><var>n</var><sub><var>k</var></sub></td> |
| </tr> |
| <tr> |
| <td><em>Polymorphic struct type template with structured name |
| <var>n</var><sub>1</sub><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>k</var></sub>, <var>k</var> > |
| 0</em></td> |
| <td>—</td> |
| <td><var>n</var><sub>1</sub><code>/</code>…<code>/</code><!-- |
| --><var>n</var><sub><var>k</var></sub></td> |
| </tr> |
| <tr> |
| <td><em>Typedef with structured name <var>n</var><sub>1</sub><!-- |
| --><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>k</var></sub>, <var>k</var> > |
| 0</em></td> |
| <td>—</td> |
| <td><var>n</var><sub>1</sub><code>/</code>…<code>/</code><!-- |
| --><var>n</var><sub><var>k</var></sub></td> |
| </tr> |
| <tr> |
| <td><em>Module with structured name <var>n</var><sub>1</sub><!-- |
| --><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>k</var></sub>, <var>k</var> > |
| 0</em></td> |
| <td>—</td> |
| <td><var>n</var><sub>1</sub><code>/</code>…<code>/</code><!-- |
| --><var>n</var><sub><var>k</var></sub></td> |
| </tr> |
| <tr> |
| <td><em>Constant group with structured name |
| <var>n</var><sub>1</sub><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>k</var></sub>, <var>k</var> > |
| 0</em></td> |
| <td>—</td> |
| <td><var>n</var><sub>1</sub><code>/</code>…<code>/</code><!-- |
| --><var>n</var><sub><var>k</var></sub></td> |
| </tr> |
| <tr> |
| <td><em>Service with structured name <var>n</var><sub>1</sub><!-- |
| --><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>k</var></sub>, <var>k</var> > |
| 0</em></td> |
| <td>—</td> |
| <td><var>n</var><sub>1</sub><code>/</code>…<code>/</code><!-- |
| --><var>n</var><sub><var>k</var></sub></td> |
| </tr> |
| <tr> |
| <td><em>Singleton with structured name <var>n</var><sub>1</sub><!-- |
| --><code>.</code>…<code>.</code><!-- |
| --><var>n</var><sub><var>k</var></sub>, <var>k</var> > |
| 0</em></td> |
| <td>—</td> |
| <td><var>n</var><sub>1</sub><code>/</code>…<code>/</code><!-- |
| --><var>n</var><sub><var>k</var></sub></td> |
| </tr> |
| </tbody> |
| </table> |
| |
| <p>Annotations:</p> |
| <ul> |
| <li>Entries given in <em>italics</em> denote entities that are not types of |
| the core UNO type system. They also have no correspondence in binary |
| UNO.</li> |
| |
| <li>A <dfn>structured name</dfn> <var>n</var><sub>1</sub><code>.</code><!-- |
| -->…<code>.</code><var>n</var><sub><var>k</var></sub>, <var>k</var> |
| > 0, consists of a sequence of <dfn>structured name parts</dfn>, |
| separated by full stops (<code>.</code>). Each structured name part must |
| satisfy the lexical rules |
| <p> <var>structured-name-part</var> = <var>lowercase-name</var> / |
| <var>uppercase-name</var><br/> |
|  <var>lowercase-name</var> = <var>lowercase</var> |
| *<var>alphanum</var><br/> |
|  <var>uppercase-name</var> = <var>uppercase</var> *<var>alphanum</var> |
| *(<code>_</code> +<var>alphanum</var>)<br/> |
|  <var>alphanum</var> = <var>alpha</var> / <var>digit</var><br/> |
|  <var>alpha</var> = <var>lowercase</var> / <var>uppercase</var><br/> |
|  <var>lowercase</var> = <code>a</code>–<code>z</code><br/> |
|  <var>uppercase</var> = <code>A</code>–<code>Z</code><br/> |
|  <var>digit</var> = <code>0</code>–<code>9</code></p> |
| <li>For the purposes of binary UNO and the UNO type registry, it is an error for |
| any enum type, plain struct type, polymorphic struct type template, |
| exception type, or interface type to have a name that is not a structured |
| name, or that is a structured name (consisting of only a single structured |
| name part) that is equal to any of <code>void</code>, <code>boolean</code>, |
| <code>byte</code>, <code>short</code>, <code>long</code>, |
| <code>hyper</code>, <code>float</code>, <code>double</code>, |
| <code>char</code>, <code>string</code>, <code>type</code>, or |
| <code>any</code>.</li> |
| <li>For the purposes of binary UNO, it is an error for any enum type, plain |
| struct type, polymorphic struct type template, exception type, or interface |
| type to have a name that is the same as the name of another enum type, plain |
| structure type, polymorphic struct type template, exception type, or |
| interface type.</li> |
| <li>For the purposes of the UNO type registry, it is an error for any enum type, |
| plain struct type, polymorphic struct type template, exception type, or |
| interface type to have a name that is the same as the name of another enum |
| type, plain structure type, polymorphic struct type template, exception |
| type, interface type, typedef, module, constant group, service, or |
| singleton.</li> |
| |
| <li>For the purposes of binary UNO and the UNO type registry, it is an error |
| for any polymorphic struct type template to have zero type parameters.</li> |
| </ul> |
| |
| <table width="100%" border="0" cellspacing="0" cellpadding="4" summary=footer> |
| <tr><td bgcolor="#666699"> |
| <p><font color="White">Author: |
| <a href="mailto:stephan.bergmann@sun.com"><font color="White">Stephan |
| Bergmann</font></a> (last modification $Date: 2004/11/30 12:25:04 $). |
| Copyright 2004 <a href="http://www.openoffice.org"><font |
| color="White">OpenOffice.org</font></a> Foundation. All rights |
| reserved.</font></p> |
| </td></tr> |
| </table> |
| |
| </body> |
| </html> |