EPOC   SDK Home Glossary Indexes Previous Next Up

TLitC8 class


Contents


TLitC8<TInt S> class — 8 bit constant literal

Section Contents


Overview

Derivation

Not applicable

Defined in

e32des8.h

Link against

euser.lib

Description

A TLitC8<TInt S> object contains literal text. Such an object is normally constructed by coding an _LIT8 macro.

This class is build independent; i.e. an explicit 8 bit build variant is generated for both a non-Unicode and a Unicode build.


Construction

The class has no explicit constructors. See the _LIT8 macro definition.


Operators


operator const TDesC8& — Conversion operator

operator const TDesC8& () const;

When used

This conversion operator is invoked by the compiler when a TLitC8<TInt S> type is passed to a function which is prototyped to take a const TDesC8& type.


operator const TRefByValue<const TDesC8> — Conversion operator

operator const TRefByValue<const TDesC8>() const;

When used

This conversion operator is invoked by the compiler when a TLitC8<TInt S> type is passed to a function which is prototyped to take a const TRefByValue<const TDesC8> type.


operator& — Address of operator

const TDesC8* operator&();

Description

Use this operator to return a const TDesC8 type pointer

Return value

const TDesC8*

A descriptor type pointer to this literal.

Example

The following code fragment shows the operator in use:

    class CX...
          {
          void Foo(const TDesC8* aDesC);
          };
    
    ...
    _LIT8(KLiteral,"some text");
    ...
    CX* anx;
    ...
    anx->Foo(&KLiteral);
    ...

operator() — Reference operator

const TDesC8& operator()();

Description

Use this operator to return a const TDesC8 type reference.

Return value

const TDesC8&

A descriptor type reference to this literal

Example

The following code fragment shows the operator in use:

    _LIT8(KKeywordSelect,"select");
    if (KKeywordSelect().CompareF(token)<0)
    ...
EPOC       SDK Home Glossary Indexes Previous Next Up