Symbian3/SDK/Source/GUID-106B5A31-012E-503D-A972-A745ECADC1E7.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-106B5A31-012E-503D-A972-A745ECADC1E7" xml:lang="en"><title>Literals
Overview</title><shortdesc>This document provides an overview of literals.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<section id="GUID-A81FC587-4840-4CE6-A406-1950B7A89094"><title>Purpose</title> <p>Allows
the simple creation of descriptors that contain read-only literal text.</p> </section>
<section id="GUID-5F6E544F-40B0-4F94-9231-48A16F99B53F"><title>Architectural
relationships</title> <p>Literal descriptors are not strictly part of the
Descriptors API, as they are not derived from the descriptor type base class <xref href="GUID-52D07F46-2162-380C-A775-C3BB335C42F5.dita"><apiname>TDesC</apiname></xref>.
However, they have conversion operators so that they can be passed to any
functions which take <codeph>const TDesC&amp;</codeph> or <codeph>const TRefByValue&lt;const
TDesC&gt;</codeph> parameters.</p> </section>
<section id="GUID-447AF8F6-E23F-4644-8698-A6787DD7989A"><title>Description</title> <p>The
API has two key concepts: literal descriptor, and literal descriptor constructor
macro. </p> <p><b>Literal
descriptor</b> </p> <p>The literal descriptor stores literal text and provides
operators to convert the text into a standard descriptor.</p> <p><b>Literal descriptor constructor macro</b> </p> <p>The literal descriptor
constructor macro provides a simple way to create a literal descriptor.</p> <p>The
constructor macro is provided by <xref href="GUID-B7343D82-C251-3C27-A1E4-79B628F2D593.dita"><apiname>_LIT16</apiname></xref> for wide strings,
and <xref href="GUID-964AAE0D-DA22-399E-8EFB-5DB1B58DA0A4.dita"><apiname>_LIT8</apiname></xref> for narrow strings. In Unicode builds, <xref href="GUID-B47B3E37-4FAC-327C-B626-49E09DB147FC.dita"><apiname>_LIT</apiname></xref> is
equivalent to <xref href="GUID-B7343D82-C251-3C27-A1E4-79B628F2D593.dita"><apiname>_LIT16</apiname></xref>.</p> </section>
<section id="GUID-D3FEE75C-1736-4228-B13B-6CC8F08EC1BA"><title>See also</title> <p><xref href="GUID-FBE448A4-4728-5EE5-84F2-4790735857B3.dita">Basic Types Overview</xref> </p> <p><xref href="GUID-0817AD1D-58CF-5108-ACBF-26DFD4BA395E.dita">Descriptors Overview</xref> </p> </section>
</conbody></concept>