carbidesdk/com.nokia.carbide.cpp.sdk.doc.user/html/reference/CustomComponents/cc_source_mapping.htm
author fturovic <frank.turovich@nokia.com>
Tue, 27 Jul 2010 15:28:19 -0500
changeset 1704 24ac5a5cf80c
parent 0 fb279309251b
permissions -rw-r--r--
updated copyright dates and fixed some css issues
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1704
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     2
<html>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     3
<head>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     4
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     5
<meta http-equiv="Content-Style-Type" content="text/css" />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     6
<title>Source Mapping</title>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     7
<link rel="StyleSheet" href="../../../book.css" type="text/css"/>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     8
</head>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
     9
<body bgcolor="#FFFFFF">
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    10
<h2>RSS Source Mapping</h2>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    11
<p>The UI Designer supports source generation and updating of Symbian resource (RSS) files, including LOC/Lxx/RLS localized string files and HRH headers shared between a class of C/C++ files.   C++ files are handled by a one-way template expansion process. RSS files are handled by a two-way process using an RSS DOM. The &lt;sourceMapping&gt; element in a component definition file (.component) drives the process.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    12
<p>The source mapping engine maintains enough information to allow in-place modifications to RSS and related files.  Also, it allows for user edits to be retained, as long as they are not also handled by the component.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    13
<h3>General Concepts</h3>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    14
<p>Visualize RSS source mapping as walking down two parallel hierarchies.  One is the hierarchy of component instances, properties, compound properties, arrays, and component reference properties. The other is the hierarchy of RSS RESOURCE definitions, field initializers, nested resource expressions, array initializers, and LLINK field initializers.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    15
<p>The hierarchies outlined here are not strictly parallel.  For example, you may map something other than a component reference property to an LLINK field.  If you map a compound property or another instance to an LLINK, the source mapping engine will take care of automatically generating a resource to satisfy the link.  Conversely, a component reference property may be mapped to a resource expression; no standalone resource needs to exist in RSS.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    16
<p>At the leaf of the tree, where properties are mapped to field initializers, types needn't be mapped strictly.  Usually, integer properties are mapped to WORD or BYTE RSS fields, but you may map enumerator properties or even literal text (corresponding to no property) to such fields as well.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    17
<p>XML elements in the &lt;sourceMapping&gt; element are driven from the RSS side of the picture (e.g. &quot;map a resource&quot;, &quot;map a field&quot;, etc.).  The structure and nesting of these elements drive the structure of the generated RSS.  Generally, a &lt;mapResource...&gt; element creates a new resource or resource expression, and &lt;map...Member&gt; elements map into a member or field initializer named by the &quot;member&quot; attribute.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    18
<p>The source mapping engine automatically generates names for resources which are guaranteed to be unique within the scope of a project and its designs.  You may influence this only by supplying a fixed name for a resource using &quot;rsrcName&quot; in &lt;mapResource&gt;.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    19
<p>The &quot;property&quot; attribute inside the &lt;map...Member&gt; elements depicts how to walk the component instance and property hierarchy.  This attribute specifies a &quot;property path&quot;, which is a tiny language for navigating the data model.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    20
<ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    21
  <li> path := &quot;.&quot; | path-element [ dot-or-arrow-or-at path ]</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    22
  <li>path-element := read-property | find-child | goto-parent</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    23
  <li>read-property := &lt;property name&gt; (find property of the given name)</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    24
  <li>find-child := &quot;[&quot; &lt;component id&gt; &quot;]&quot; (find child component with given id)</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    25
  <li>goto-parent := &quot;[parent]&quot; (find parent)</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    26
  <li>dot-or-arrow-or-at := &quot;.&quot; (enter compound property) | &quot;-&gt;&quot; (dereference reference property) | &quot;@&quot; (attribute)</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    27
</ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    28
<p>For example, property=&quot;location.x&quot; will read the &quot;x&quot; property inside the compound property named &quot;location&quot;.  The statement &quot;holder.reference-&gt;value&quot; will read the &quot;value&quot; property inside the  &quot;reference&quot; component reference property inside the &quot;holder&quot; compound property.  Usually a property attribute is a simple name.  Note that you may target a compound property (e.g. &quot;location&quot;) or a component instance (e.g. &quot;holder.reference-&gt;&quot;) itself with a property path.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    29
<p>In both cases, the movement is one-way as nesting increases further into the RSS hierarchy or into the component instance hierarchy.  The only way to go up the hierarchy is to map into an RSS LLINK field or read across a component reference property.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    30
<p> The following table lists supported mappings.  See the following sections for details on the XML elements.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    31
<table width="378" border="1" align="center">
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    32
  <caption>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    33
    Supported Mappings
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    34
  </caption>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    35
  <tr>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    36
    <th width="169" scope="col">Mapping</th>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    37
    <th width="193" scope="col">XML Element</th>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    38
  </tr>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    39
  <tr>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    40
    <td>Component instance</td>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    41
    <td>&lt;mapResource&gt; &lt;mapResourceMember&gt;<br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    42
      &lt;mapInstanceMember&gt;</td>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    43
  </tr>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    44
  <tr>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    45
    <td>Compound property</td>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    46
    <td>&lt;mapResource&gt; &lt;mapResourceMember&gt;</td>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    47
  </tr>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    48
  <tr>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    49
    <td>Simple leaf property</td>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    50
    <td>&lt;mapSimpleMember&gt; &lt;mapIdentifierMember&gt;<br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    51
      &lt;mapEnumMember&gt;</td>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    52
  </tr>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    53
  <tr>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    54
    <td>Component reference property</td>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    55
    <td>&lt;mapReferenceMember&gt; &lt;mapInstanceMember&gt; <br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    56
      &lt;mapResourceMember&gt;</td>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    57
  </tr>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    58
  <tr>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    59
    <td>Set of boolean properties</td>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    60
    <td>&lt;mapBitmaskMember&gt;</td>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    61
  </tr>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    62
  <tr>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    63
    <td>Constant</td>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    64
    <td>&lt;mapFixedMember&gt;</td>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    65
  </tr>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    66
</table>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    67
<p><br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    68
</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    69
<h3><a name="mappings"></a>Mappings</h3>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    70
<p>Source mapping elements appear in the &lt;sourceMapping&gt; element of the component definition file.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    71
<h4>Resource</h4>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    72
<p>The &lt;mapResource&gt; element defines a mapping from a property source to a resource.  Attributes include:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    73
<ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    74
  <li><strong>struct</strong> &mdash; the name of the STRUCT defining the resource type</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    75
  <li><strong>headers</strong> &mdash; a space-separated list of *.rh filenames that declare the struct</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    76
</ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    77
<h5>Member Mappings</h5>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    78
<p>The following elements map individual properties to resource members:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    79
<ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    80
  <li>mapSimpleMember</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    81
  <li>mapEnumMember</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    82
  <li>mapIdentifierMember</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    83
  <li>mapInstanceMember</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    84
  <li>mapReferenceMember</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    85
  <li>mapBitmaskMember</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    86
  <li>mapArrayMember</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    87
  <li>mapResourceMember</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    88
</ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    89
<p>Each element takes these attributes:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    90
<ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    91
  <li><strong>property</strong> &mdash; Name of the property to map. The named property is in the scope of the current property source. A dotted syntax may be used to choose subproperties (bounds.width). In the &lt;mapResourceMember&gt; element, use &ldquo;.&rdquo; to stay in the current property source.</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    92
  <li><strong>member</strong> &mdash;  Name of the resource member. This may include an array element dereference (for example, <span class="code">foo[0]</span>) to target a given element.  If used to write into an RSS array initializer, the index must be the terminal index (for example, the current length of the array).  It cannot rewrite an existing element or add past the end of the array. </li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    93
</ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    94
<p>Examples of Property and Member mapping:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    95
<p>Given a current property source PS and a struct declaration STR:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    96
<ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    97
  <li>    <span class="code">&lt;mapSimpleMember property=&ldquo;text&rdquo; member=&ldquo;buf&rdquo; /&gt;</span><br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    98
  Takes the &ldquo;text&rdquo; property of PS and maps it with the &ldquo;buf&rdquo; member of STR.</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    99
  <li><span class="code">&lt;mapSimpleMember property=&ldquo;bounds.width&rdquo; member=&ldquo;width&rdquo; /&gt;</span><br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   100
  Takes the &ldquo;width&rdquo; property of the &ldquo;bounds&rdquo; compound property of PS and maps it with the &ldquo;width&rdquo; of STR.</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   101
  <li><span class="code">&lt;mapResourceMember property=&ldquo;data&rdquo; member=&ldquo;embed&rdquo; struct=&ldquo;INNER&rdquo; ...&gt;</span><br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   102
  Opens a scope where properties from the compound property &ldquo;data&rdquo; are mapped memberwise with the &ldquo;embed&rdquo; member (which is of type &ldquo;STRUCT INNER&rdquo;) of STR.</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   103
  <li><span class="code">&lt;mapResourceMember property=&ldquo;.&rdquo; member=&ldquo;embed&rdquo; struct=&ldquo;INNER&rdquo; ... &gt;</span><br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   104
  Opens a scope where properties from PS are mapped memberwise with the &ldquo;embed&rdquo; member (which is of type &ldquo;STRUCT INNER&rdquo;) of STR.</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   105
  <li><span class="code">&lt;mapResourceMember property=&ldquo;.&rdquo; member=&ldquo;items[0]&rdquo; struct=&ldquo;INNER&rdquo;&gt;</span><br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   106
  Opens a scope where properties from PS are mapped memberwise with the first element of the &ldquo;items&rdquo; array member (which is of type &ldquo;STRUCT INNER&rdquo;) of STR.</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   107
</ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   108
<h4><a name="resource"></a>Resource Member Mapping</h4>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   109
<p>Aside from property and member, the &lt;mapResourceMember&gt; element has the same syntax and semantics as the &lt;mapResource&gt; element. This element maps a compound property to a resource expression or statement. Mappings inside the element use the compound property as the property source. If the member is of STRUCT type, the mapping corresponds to that member. Otherwise, the member must be of LLINK type. In this case a uniquely-named resource holds the mapped data, which is referenced from the LLINK.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   110
<p>To map properties from the current property source into a STRUCT, use the property=&ldquo;.&rdquo; form and appropriate mapXYZMember. To map a compound property to members of the current resource, use the property=&ldquo;bounds.width&rdquo; form and appropriate mapXYZMember.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   111
<p>Example syntax:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   112
<pre>&lt;mapResourceMember property=... member=... struct=&ldquo;...&rdquo; headers=&ldquo;...&rdquo; &gt;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   113
<p>Resource Generation Example:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   114
<blockquote>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   115
  <p>myheader.rh file:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   116
  <pre class="listing">STRUCT RSRC {
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   117
 STRUCT  theStruct;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   118
 WORD ckSum;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   119
}</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   120
  <pre class="listing">STRUCT FOO {
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   121
 BUF  buf;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   122
 WORD  type;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   123
 LONG count;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   124
}</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   125
  <p>Component file:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   126
  <pre class="listing">&lt;compoundPropertyDeclaration qualifiedName=&ldquo;Foo&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   127
  &lt;property name=&ldquo;text&quot; type=&quot;localizedString&quot; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   128
  &lt;enumProperty name=&ldquo;type&quot; type=&ldquo;...&quot;  /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   129
  &lt;property name=&ldquo;count&quot; type=&ldquo;integer&ldquo; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   130
&lt;/compoundPropertyDeclaration&gt;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   131
  <pre class="listing">&lt;properties&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   132
  &lt;property name=&quot;name&quot; type=&quot;uniqueName&quot;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   133
  &lt;compoundProperty name=&ldquo;foo&quot; type=&ldquo;Foo&quot;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   134
  &lt;property name=&ldquo;checksum&quot; type=&ldquo;integer&quot;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   135
&lt;/properties&gt;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   136
  <pre class="listing">&lt;sourcemapping&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   137
  &lt;mapResource struct=&ldquo;RSRC&rdquo; headers=&ldquo;myheader.rh&rdquo;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   138
    &lt;mapResourceMember property=&ldquo;foo&rdquo; member=&ldquo;theStruct&rdquo; struct=&ldquo;FOO&rdquo; headers=&ldquo;myheader.rh&rdquo; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   139
      &lt;mapSimpleMember property=&ldquo;text&rdquo; member=&ldquo;buf&rdquo;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   140
      &lt;mapEnumMember property=&ldquo;type&rdquo; member=&ldquo;type&rdquo;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   141
      &lt;mapSimpleMember property=&ldquo;count&rdquo; member=&ldquo;count&rdquo;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   142
    &lt;/mapResourceMember&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   143
    &lt;mapSimpleMember property=&ldquo;checksum&rdquo; member=&ldquo;ckSum&rdquo;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   144
  &lt;/mapResource&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   145
&lt;/sourcemapping&gt;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   146
</blockquote>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   147
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   148
<h4><a name="simple"></a>Simple Member Mapping</h4>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   149
<p>The &lt;mapSimpleMember&gt; element is allowed within the mapResource, mapResourceElement, or mapResourceMember element. It is used to map a value to a struct member by specifying the property path that provides the value. For example:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   150
<pre class="listing">&lt;mapSimpleMember property=&quot;lineWidth&quot; member=&quot;line_size&quot;/&gt;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   151
<p>This element allows you to map an integer, float, string, or reference members. Macros and localized strings are handled automatically. Anything in the data model can be represented in the resource file, and any form of string can be stored in the data model. There is no need for different actions based on the state of a string.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   152
<p>Component references are handled automatically. The resource for the target component instance is located or a stub resource is created.  An error results under the following conditions:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   153
<ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   154
  <li>If the instance doesn&rsquo;t exist</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   155
  <li>The instance has a missing component</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   156
  <li>The instance has no source mapping</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   157
  <li>The instance&rsquo;s resource header and struct cannot be found.</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   158
</ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   159
<p>Compound properties are mapped by using IPropertySource#getEditableValue().</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   160
<h4><a name="enum"></a>Enum Member Mapping</h4>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   161
<p>The &lt;mapEnumMember&gt; element is allowed within the mapResource, mapResourceElement, or mapResourceMember element. It maps a given property with a resource member and converts enumerator names from one representation to another. This element may be used alone if proper style is followed. All the enumerator values in the data model should be the same as the value used in the resource (RSS) file. The  &ldquo;value&rdquo; attributes under enumPropertyDeclaration should match the  RSS enumerators. Otherwise, the enumerator mapping must be spelled out in subelements. Compound properties are mapped using IPropertySource#getEditableValue().</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   162
<p>Attributes:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   163
<ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   164
  <li><strong>enumeration</strong>  &mdash; If specified, this is the enumeration declaring the enumerators (optional).</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   165
  <li><strong>headers</strong> &mdash; The space-separated list of header files that define the enumeration constants (optional).</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   166
  <li><strong>uniqueValue</strong> &mdash; If set, this denotes an enumerator value whose RSS mapping is a unique identifier.  If &ldquo;*&rdquo; is specified, each mapping is given a unique value (optional).</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   167
  <li><strong>nameAlgorithm</strong> &mdash; This is optional unless uniqueValue is set. If set, it is the symbolic name of the generator. If set to &quot;false&quot;, eliminates warnings that occur if you map an enum for a macro or for a value that does not appear in any included files.</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   168
</ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   169
<p>Example syntax:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   170
<pre>&lt;mapEnumMember property=... member=... [enumeration=&ldquo;...&rdquo; headers=&ldquo;...&rdquo;] [uniqueValue=&ldquo;...&rdquo; nameAlgorithm=&ldquo;...&rdquo;]&gt; </pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   171
<p>If the data model uses different enumerators than RSS, the &lt;mapEnumMember&gt; element must contain a list of &lt;mapEnum value=... enum=... /&gt; declarations.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   172
<p>Attributes:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   173
<ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   174
  <li><strong>value</strong> &mdash; The value from the enumPropertyDeclaration&rsquo;s enumElement.</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   175
  <li><strong>enum</strong> &mdash; The enumerator name used in RSS.</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   176
</ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   177
<p>Note that using the uniqueValue attribute does NOT force the use of this table. All possible enumerator values must be listed in &lt;mapEnum&gt; elements, otherwise a warning is emitted and no mapping is performed. The UI Designer will warn if a mapped enumerator cannot be resolved by means of headers (either those in &lt;enumMemberMapping&gt; or those brought in by surrounding &lt;mapResource&gt; elements).</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   178
<p>Example:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   179
<pre class="listing">&lt;mapEnumMember property=&ldquo;font&rdquo; member=&ldquo;fontName&rdquo; header=&ldquo;aknfonts.hrh&rdquo;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   180
  &lt;mapEnum value=&ldquo;SYSTEM&rdquo; enum=&ldquo;EAknFontSystem&rdquo;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   181
  &lt;mapEnum value=&ldquo;TITLE&rdquo; enum=&ldquo;EAknFontTitle&rdquo;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   182
&lt;/mapEnumMember&gt; </pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   183
<h4><a name="identifier"></a>Identifier Member Mapping</h4>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   184
<p>The &lt;mapIdentifierMember&gt; element maps a string property to an identifier in RSS.  This places an unquoted string in RSS, as opposed to the &lt;mapSimpleMember&gt; element which always converts strings to literal string constants. Compound properties are mapped using IPropertySource#getEditableValue().</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   185
<p>Example syntax:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   186
<pre>&lt;mapIdentifierMember property=&ldquo;...&rdquo; member=&ldquo;...&rdquo; /&gt;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   187
<h4><a name="instance"></a>Instance Mapping</h4>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   188
<p>The &lt;mapInstanceMember&gt; element maps an instance to an LLINK member or a STRUCT member of a resource. The &lt;mapInstanceElement&gt; does the same for array elements.  This is rarely used but may be useful in a complex case of mapping selective elements of arrays, as follows:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   189
<pre class="listing">&lt;mapArrayMember property=&quot;.&quot; member=&quot;structs&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   190
  &lt;select attribute=&quot;is-emitted&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   191
    &lt;choice value=&quot;true&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   192
      &lt;mapInstanceElement /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   193
    &lt;/choice&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   194
    &lt;choice /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   195
  &lt;/select&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   196
&lt;/mapArrayMember&gt;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   197
<h4><a name="reference"></a>Reference Mapping</h4>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   198
<p>The &lt;mapReferenceMember&gt; and &lt;mapReferenceElement&gt; elements map a component reference property to an LLINK field in RSS.  This will place the name of the generated resource for the referenced component instance into the field initializer in RSS.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   199
<h4><a name="bitmask"></a>Bitmask Mapping</h4>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   200
<p>The &lt;mapBitmaskMember&gt; and &lt;mapBitmaskElement&gt; elements are used to map a set of boolean properties to a single integer field in RSS.  For example, the component may contain two boolean flags which are expressed as a logical OR of enumerators in RSS.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   201
<p>This mapping is powerful since it allows not only simple one-to-one mapping of properties to enumerators, but also allows groups of properties to be mapped to a single enumerator (e.g. &quot;EAllFlags&quot;) and also allows a default value when no properties are set (e.g. &quot;ENoFlags&quot; or &quot;EDefaultFlags&quot;).</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   202
<p>First, this element has an &quot;includedProperties&quot; attribute specifying a space-separated list of properties which are involved in the mapping.  This is used for two reasons:<br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   203
(1) to allow you to map flags from a larger set of properties and<br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   204
(2) to validate that you remembered to account for every combination of flags when mapping.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   205
<p>Generally, the latter constraint is not difficult to follow if you include one-to-one mappings for every flag property involved.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   206
<p>This element contains &lt;mapBitmaskValue&gt; elements that describe how a set of &quot;true&quot; properties can be mapped to an enumerator.  For example:  <span class="code">&lt;mapBitmaskValue properties=&quot;myflag&quot; value=&quot;EMyFlag&quot; /&gt;</span><br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   207
is a simple one-to-one mapping which maps &quot;EMyFlag&quot; if the &quot;myflag&quot; property is &quot;true&quot;.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   208
<p>A more complex example is:<br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   209
  <span class="code">&lt;mapBitmaskValue properties=&quot;part1Flag part2Flag&quot; value=&quot;EPart1AndPart2Flag&quot; /&gt;</span><br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   210
which maps the &quot;EPart1AndPart2Flag&quot; only if both &quot;part1Flag&quot; and &quot;part2Flag&quot; are &quot;true&quot;.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   211
<p>The &lt;mapBitmaskValue&gt; elements are iterated in order until all the &quot;includedProperties&quot; have been accounted for.  Thus, specify the more complex mappings first, and then the one-to-one mappings, and finally an empty mapping, which is used only if no properties have been found to be &quot;true&quot;.  For example:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   212
<pre class="listing">&lt;mapBitmaskMember property=&quot;flagSet&quot; member=&quot;flags&quot;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   213
   includedProperties=&quot;allowEdit allowCursorMovement compatibility&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   214
   &lt;mapBitmaskValue properties=&quot;allowEdit allowCursorMovement&quot; value=&quot;EFullEditing&quot; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   215
   &lt;mapBitmaskValue properties=&quot;allowEdit &quot; value=&quot;EAllowEditing&quot; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   216
   &lt;mapBitmaskValue properties=&quot;allowCursorMovement&quot; value=&quot;EAllowCursorMovement&quot; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   217
   &lt;mapBitmaskValue properties=&quot;compatibility&quot; value=&quot;ECompatibilitySetting&quot; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   218
   &lt;mapBitmaskValue properties=&quot;&quot; value=&quot;ENoFlags&quot; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   219
 &lt;/mapBitmaskMember&gt;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   220
<p>In a model, if both &quot;allowEdit&quot; and &quot;allowCursorMovement&quot; are &quot;true&quot;, but &quot;compatibility&quot; is false, then the RSS initializer generated would be:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   221
<pre> flags = EFullEditing;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   222
<p>If &quot;allowEdit&quot; is &quot;true&quot; and &quot;compatibility&quot; is true, then the initializer would be:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   223
<pre> flags = EAllowEditing | ECompatibilitySetting;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   224
<p>If none of these properties is true, then the initializer would be:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   225
<pre> flags = ENoFlags;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   226
<h4><a name="array"></a>Array Member Mapping</h4>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   227
<p>The &lt;mapArrayMember&gt; element maps a sequence to an array-typed member of a struct. It contains one subelement to describe how to map each array element.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   228
<ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   229
  <li>mapSimpleElement</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   230
  <li>mapEnumElement</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   231
  <li>mapIdentifierElement</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   232
  <li>mapResourceElement</li>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   233
</ul>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   234
<p>The &lt; mapArrayElement&gt; is not allowed in RSS. Syntax and semantics mirror those of mapXYZMember, except no member/property attributes are provided.   Element mapping uses the current element as the property source. Do not use this to map non-sequence properties to RSS array elements. Use the <span class="code">member=&ldquo;field[index]&rdquo;</span> syntax and the appropriate mapXYZMember.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   235
<p>Array Member Mapping Example:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   236
<blockquote>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   237
  <p>RSS file:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   238
  <pre>STRUCT NUMBER_LIST { 	WORD items[]; }</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   239
<p>Component file:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   240
  <pre class="listing">&lt;arrayProperty name=&ldquo;itemList&rdquo; type=&ldquo;integer&rdquo;/&gt;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   241
<pre class="listing">&lt;sourceMapping&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   242
  &lt;mapResource struct=&ldquo;NUMBER_LIST&rdquo; header=&ldquo;...&rdquo;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   243
    &lt;mapArrayMember property=&ldquo;itemList&rdquo; member=&ldquo;items&rdquo;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   244
      &lt;mapSimpleElement/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   245
    &lt;/mapArrayMember&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   246
  &lt;/mapResource&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   247
&lt;/sourceMapping&gt;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   248
</blockquote>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   249
<h4><a name="fixed"></a>Fixed Mapping</h4>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   250
<p>This mapping maps a constant value to a member or array element.  It is used strictly to override the default value specified in RSS.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   251
<p>No &quot;property&quot; attribute is provided.  Instead, set the &quot;value&quot; attribute to the literal text to inject into the initializer.  This is not type-checked in any way.<br />
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   252
</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   253
<h4><a name="type"></a>Type Mapping</h4>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   254
<p>Some mappings are quite lengthy and completely associated with a given compound type.  Instead of repeatedly specifying the mapping rules for every use of the property (in different components or in different conditions), you may place the type's source mapping inside the &lt;compoundPropertyDeclaration&gt; element and invoke it with the  &lt;mapMemberFromType&gt; and &lt;mapElementFromType&gt; elements.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   255
<p>Place a &lt;sourceTypeMapping&gt; element in &lt;compoundPropertyDeclaration&gt; to associate mappings with the compound type.  The only difference from normal RSS source mapping is, the top-level element is a &lt;map...Type&gt; element, which is just like &lt;map...Member&gt; or &lt;map...Element&gt; except that no specific member or array element is implied.  For example:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   256
<pre class="listing">&lt;compoundPropertyDeclaration qualifiedName=&quot;com.nokia.test.TRgb&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   257
   &lt;property name=&quot;r&quot; type=&quot;integer&quot;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   258
   &lt;property name=&quot;g&quot; type=&quot;integer&quot;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   259
   &lt;property name=&quot;b&quot; type=&quot;integer&quot;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   260
   &lt;sourceTypeMapping&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   261
     &lt;mapResourceType struct=&quot;RGB&quot; headers=&quot;basicheader.rh&quot; &gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   262
       &lt;mapSimpleMember property=&quot;r&quot; member=&quot;r&quot; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   263
       &lt;mapSimpleMember property=&quot;g&quot; member=&quot;g&quot; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   264
       &lt;mapSimpleMember property=&quot;b&quot; member=&quot;b&quot; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   265
     &lt;/mapResourceType&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   266
   &lt;/sourceTypeMapping&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   267
&lt;/compoundPropertyDeclaration&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   268
 </pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   269
<p>When mapping this type, simply reference the property that uses the type, in &lt;mapMemberFromType&gt; or &lt;mapElementFromType&gt;. For example, assuming the &quot;colors&quot; property is of type &quot;com.nokia.test.TRgb&quot;, then this will map its elements to a new RGB resource expression in the member &quot;colors&quot;:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   270
<pre> &lt;mapMemberFromType property=&quot;colors&quot; member=&quot;colors&quot; /&gt;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   271
<p>A compound type may map to more than one pattern in RSS.  In such a case, specify multiple &lt;map...Type&gt; elements in the type declaration, and give each a unique &quot;typeId&quot; attribute.  Specify the same &quot;typeId&quot; attribute in the &lt;mapMemberFromType&gt; or &lt;mapElementFromType&gt; mappings. If typeId is missing from both the type declaration or the mapping, this mapping matches.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   272
<h3><a name="conditional"></a>Conditional Mapping</h3>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   273
<p>In some cases, property values require a component to be mapped in a different way. An enumeration may indicate use of a built-in resource or a flag may indicate another property is ignored. Such a model makes two-way mapping more difficult. A  point of selection should resolve to mutually exclusive states in the data model and RSS. Thus, conditional generation must work on the basis of equality and simple property values.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   274
<p>The &lt;select property=&ldquo;...&rdquo;&gt; element encloses a set of alternate mapping groups. The &quot;property&quot; attribute is a path to a property of interest (such as, name or struct.member). The &lt;choice [value=&ldquo;...&rdquo;]&gt; element encloses a set of mapping elements. The &quot;value&quot; attribute is the value to compare with the property value. If unspecified, it acts as the &ldquo;default&rdquo;. The first matching &lt;choice&gt; is applied and all others ignored. The &lt;select&gt; element can appear inside &lt;sourceMapping&gt; and &lt;mapResource*&gt; elements.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   275
<p>A &lt;select&gt; operation may test whether an instance of a given component type exists in a component.  The value of the match is non-empty if an instance of the type is found, otherwise it is empty, so structure the comparison in a negative fashion where a valueless choice always matches. For example:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   276
<pre class="listing">&lt;select property=&quot;[com.nokia.sdt.series60.MenuPane]&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   277
 &lt;choice value=&ldquo;&rdquo;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   278
  &lt;!-- no match --&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   279
 &lt;/choice&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   280
 &lt;choice&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   281
  &lt;!-- default match --&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   282
 &lt;/choice&gt;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   283
<p>General node paths can be used here, including parent navigation. For example:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   284
<pre class="listing">&lt;select property=&ldquo;[parent].isEnabled&rdquo;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   285
 &lt;choice value=&ldquo;true&rdquo;&gt;<br />  ... </pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   286
<p>A &lt;select&gt; operation may be made against attribute values. For example:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   287
<pre class="listing">&lt;select attribute=&quot;is-dialog-content&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   288
 &lt;choice value=&ldquo;true&rdquo;&gt;<br />  ...
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   289
 &lt;/choice&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   290
 &lt;choice&gt;<br />  ...
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   291
 &lt;/choice&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   292
&lt;/select&gt; </pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   293
<p>A &lt;select&gt; operation may test the length of an array (empty vs. non-empty) to avoid emitting illegal resources (CAknPopupFieldText.component). For example:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   294
<pre class="listing">&lt;select property=&quot;items&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   295
 &lt;choice value=&quot;0&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   296
  &lt;!-- don't emit for 0 items: this causes a panic --&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   297
 &lt;/choice&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   298
 &lt;choice&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   299
  &lt;mapResourceMember ...&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   300
 &lt;/choice&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   301
&lt;/select&gt; </pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   302
<p>A &lt;select&gt; operation may also match the existence of a property, which matters, for instance, to tell if a given property extender has supplied it. For example:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   303
<pre class="listing">&lt;select propertyExists=&quot;foo.bar&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   304
   &lt;choice value=&quot;true&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   305
   ...
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   306
   &lt;/choice&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   307
   &lt;choice/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   308
&lt;/select&gt;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   309
<p>A &lt;select&gt; operation may also check whether the current component instance is derived from a certain type.  Obviously, a component knows its own type, but this is useful for checking component references or children in an array mapping.  For example:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   310
<pre class="listing">&lt;mapArrayMember&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   311
   &lt;select isComponentInstanceOf=&quot;com.nokia.test.ArrayChildItem&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   312
     &lt;choice value=&quot;true&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   313
     ...
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   314
     &lt;/choice&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   315
     &lt;choice/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   316
   &lt;/select&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   317
&lt;/mapArrayMember&gt;</pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   318
<p>Following is an example of generating a control button in a top level component.</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   319
<blockquote>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   320
  <p>Section of a component definition file:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   321
  <pre class="listing">&lt;compoundPropertyDeclaration qualifiedName=&quot;com.nokia.sdt.series60.CBAProperty&quot;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   322
 &lt;property name=&quot;leftText&quot; type=&quot;localizedString&quot; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   323
 &lt;enumProperty name=&quot;leftId&quot; type=&ldquo;...&quot; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   324
&lt;/compoundPropertyDeclaration&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   325
<br />&lt;properties&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   326
 &lt;property category=&quot;Basic&quot; name=&quot;name&quot; type=&quot;uniqueName&quot;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   327
 &lt;compoundProperty name=&quot;CBA&quot; type=&quot;com.nokia.sdt.series60.CBAProperty&quot;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   328
&lt;/properties&gt; </pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   329
  <p>Section of a resource file:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   330
  <pre class="listing">STRUCT CBA {
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   331
 STRUCT buttons[];  // of CBA_BUTTON
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   332
}
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   333
<br />STRUCT CBA_BUTTON {
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   334
 WORD id;<br /> BUF txt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   335
} </pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   336
  <p>Section of a component definition file:</p>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   337
  <pre class="listing">&lt;sourcemapping&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   338
  &lt;select property=&ldquo;CBA&rdquo;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   339
    &lt;choice value=&ldquo;CUSTOM&rdquo;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   340
      &lt;mapResource struct=&ldquo;CBA&rdquo; headers=&ldquo;...&rdquo;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   341
        &lt;mapResourceMember property=&ldquo;CBA&rdquo; member=&ldquo;buttons[0]&rdquo;  struct=&ldquo;CBA_BUTTON&rdquo; headers=&ldquo;...&rdquo;&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   342
          &lt;mapEnumMember property=&ldquo;leftId&rdquo; member=&ldquo;id&rdquo; uniqueValue=&ldquo;UNIQUE&rdquo; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   343
          &lt;mapSimpleMember property=&ldquo;leftText&rdquo; member=&ldquo;txt&rdquo;/&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   344
        &lt;/mapResourceMember&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   345
      &lt;/mapResource&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   346
    &lt;/choice&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   347
    &lt;choice&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   348
      &lt;mapSimpleMember property=&ldquo;CBA&rdquo; member=&ldquo;cba&rdquo; /&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   349
    &lt;/choice&gt; &lt;!-- here, the value of CBA should be the same as the resource name --&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   350
  &lt;/select&gt;
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   351
&lt;/sourcemapping&gt; </pre>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   352
</blockquote>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   353
<div id="footer">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   354
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   355
</body>
24ac5a5cf80c updated copyright dates and fixed some css issues
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
   356
</html>