Symbian3/SDK/Source/GUID-DF7959E7-15A4-5504-8D22-B8189DB2688E.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Wed, 31 Mar 2010 11:11:55 +0100
changeset 7 51a74ef9ed63
child 8 ae94777fff8f
permissions -rw-r--r--
Week 12 contribution of API Specs and fix SDK submission
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     6
<!-- Initial Contributors:
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     7
    Nokia Corporation - initial contribution.
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     8
Contributors: 
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     9
-->
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    10
<!DOCTYPE concept
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
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_d0e363397_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>