Symbian3/SDK/Source/GUID-DF7959E7-15A4-5504-8D22-B8189DB2688E.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 11 Jun 2010 12:39:03 +0100
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 13 48780e181b38
permissions -rw-r--r--
Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     6
<!-- Initial Contributors:
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     7
    Nokia Corporation - initial contribution.
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     8
Contributors: 
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     9
-->
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    10
<!DOCTYPE concept
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    12
<concept xml:lang="en" id="GUID-DF7959E7-15A4-5504-8D22-B8189DB2688E"><title>Introduction to Swizzles and deferred loading </title><prolog><metadata><keywords/></metadata></prolog><conbody><p>In complex applications involving a large network of objects, it may be desirable, and even necessary, to defer the loading of objects into memory from the store.</p> <p>It should, therefore, be possible to represent such an object in one of two ways:</p> <ul><li id="GUID-11F8C7C2-C67E-56A0-9F17-9068E69085FF"><p>by the stream ID of the stream containing the external representation of that object, if it is not in memory.</p> </li> <li id="GUID-07C65069-0F05-53D8-AFF8-DD539371CD6D"><p>by a pointer, if it is in memory (or has already been loaded into memory); the pointer points to the in-memory object.</p> </li> </ul> <p>A Swizzle is a device for handling this dual representation.</p> <p>A typical container type object, therefore, does not have a pointer directly to a contained object, but has a Swizzle which can represent that contained object <i>either</i> as a pointer <i>or</i> as a stream ID, as illustrated in the following diagram.</p> <fig id="GUID-F057540D-3613-538E-947F-04C414280A8F"><image href="GUID-8AF21373-E51E-5B9D-ACC1-243752C9BB5B_d0e357317_href.png" placement="inline"/></fig> <p>A Swizzle can be considered as a lean, but efficient, container in its own right.</p> <p>The concrete Swizzle classes are templated; the template parameter defines the type of object which the Swizzle represents.</p> <p>There are two general concrete Swizzle classes:</p> <ul><li id="GUID-AB85BEFF-8377-566B-9073-5C9C3489F3DB"><p><codeph>TSwizzle&lt;class T&gt;</codeph> </p> </li> <li id="GUID-32CF088B-01FA-585B-9C1C-3DC73E83BE85"><p><codeph>TSwizzleC&lt;class T&gt;</codeph> </p> </li> </ul> <p>A <codeph>TSwizzle&lt;class T&gt;</codeph> represents a <codeph>&lt;class T&gt;</codeph> type object. Full access is available to the <codeph>&lt;class T&gt;</codeph> type object through the Swizzle.</p> <p>A <codeph>TSwizzleC&lt;class T&gt;</codeph> represents a <codeph>&lt;class T&gt;</codeph> type object. Access to the object is limited; in particular the object cannot be changed.</p> </conbody></concept>