Symbian3/PDK/Source/GUID-0D1E30D8-D900-5FD9-BD1F-1B93BAD8AEF5.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 11 Mar 2010 18:02:22 +0000
changeset 3 46218c8b8afa
parent 1 25a17d01db0c
child 5 f345bda72bc4
permissions -rw-r--r--
week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     6
<!-- Initial Contributors:
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     7
    Nokia Corporation - initial contribution.
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     8
Contributors: 
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
     9
-->
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    10
<!DOCTYPE concept
46218c8b8afa week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents: 1
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    12
<concept xml:lang="en" id="GUID-0D1E30D8-D900-5FD9-BD1F-1B93BAD8AEF5"><title>What are fields</title><shortdesc>This topic describes the structure of a field. A field is an item that can be stored in the Comms Database. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> <p>A field is a container and an element. A field is the basic unit of information in the Comms Database. </p> <p>A field is represented by the templated class <xref href="GUID-1CDD0B97-8B00-3373-9908-512C9BC1CF51.dita"><apiname>CMDBField</apiname></xref> <codeph>&lt;T&gt;</codeph>. The template parameter defines the type of data that the field contains. For example <xref href="GUID-1CDD0B97-8B00-3373-9908-512C9BC1CF51.dita"><apiname>TInt</apiname></xref>, <xref href="GUID-1CDD0B97-8B00-3373-9908-512C9BC1CF51.dita"><apiname>TDesC</apiname></xref>, <xref href="GUID-1CDD0B97-8B00-3373-9908-512C9BC1CF51.dita"><apiname>TBool</apiname></xref>   </p> <p>Fields are collected into records. </p> <fig id="GUID-39CDC3FB-156B-539B-A513-7B725A97D3B9"><image href="GUID-DA070DA3-CE2E-5B4E-834F-32BED736E01D_d0e91098_href.png" placement="inline"/></fig> <p><b>Getting data from a field </b> </p> <p>An overloaded conversion operator converts the data value in a <xref href="GUID-1CDD0B97-8B00-3373-9908-512C9BC1CF51.dita"><apiname>CMDBField</apiname></xref> <codeph>&lt;T&gt;</codeph> object to the template type. The template type is the type defined by the characters <codeph>T</codeph>. The operator allows you to use a <codeph>CMDBField&lt;T&gt;</codeph> object on the right-hand side of an assignment call. The operator also allows you to pass a <codeph>CMDBField&lt;T&gt;</codeph> object into a function that requires items of the template type. </p> <p>The value of a field in memory is NULL: </p> <ul><li id="GUID-1500B567-B899-5769-97D8-E7949B6034CA"><p>if the caller has not set the value </p> </li> <li id="GUID-2766C253-443B-5BD1-977F-69EB4E2349CD"><p>if the field as not been loaded from the Comms Database </p> </li> </ul> <p>If the value of a field is NULL after the field has been successfully loaded from the Comms Database, the field has been explicitly set to NULL by the writer of the record. </p> <p><b>Setting data into a field </b> </p> <p>A field has an assignment operator. A type <codeph>T</codeph> field accepts a type <codeph>T</codeph> item on the right-hand side of an assignment. </p> <p>A descriptor has variable length data. You need to set the size of the buffer that the field uses to store data. You must call <codeph>SetMaxLengthL()</codeph> on the <xref href="GUID-1CDD0B97-8B00-3373-9908-512C9BC1CF51.dita"><apiname>CMDBField</apiname></xref> <codeph>&lt;T&gt;</codeph> object and pass the length of the data to be added. You then use the assignment operator. The length that you set must be enough or the assignment operator does not work. The <codeph>SetL()</codeph> function is an alternative method. This function calculates the length of a descriptor parameter for a descriptor field type and performs the allocation and assignment. </p> </conbody></concept>