CResourceLoader Class Reference

class CResourceLoader : public CBase

Library to handle resource loading when CCoeEnv is not available.

Inherits from

Constructor & Destructor Documentation

CResourceLoader()

CResourceLoader()[private]

A constructor

~CResourceLoader()

~CResourceLoader()[virtual]

Destructor

Member Functions Documentation

ConstructL(const TDesC &)

voidConstructL(const TDesC &aName)[private]

A 2nd phase constructor

Parameters

const TDesC & aNamea HTML macro, e.g. lt

CreateResourceReaderLC(TResourceReader &, TInt)

IMPORT_C HBufC8 *CreateResourceReaderLC(TResourceReader &aReader,
TIntaResourceId
)const

Parameters

TResourceReader & aReadera reader
TInt aResourceIda resource key

DirectionalityL(const TDesC &, TBool *)

TBidiText::TDirectionality DirectionalityL(const TDesC &aText,
TBool *aFound
)[private]

Parameters

const TDesC & aText
TBool * aFound

FormatStringL(const TDesC &, const TDesC &, const TDesC &, TBidiText::TDirectionality)

HBufC *FormatStringL(const TDesC &aSource,
const TDesC &aKey,
const TDesC &aSubs,
TBidiText::TDirectionalityaDir
)[private]

Finds the keystring from the source string and replaces it with the replacement string.

Parameters

const TDesC & aSource
const TDesC & aKey
const TDesC & aSubs
TBidiText::TDirectionality aDir

FormatStringL(const TDesC &, const TDesC &, const TDesC &, TBidiText::TDirectionality, TInt &, TInt)

HBufC *FormatStringL(const TDesC &aSource,
const TDesC &aKey,
const TDesC &aSubs,
TBidiText::TDirectionalityaDirectionality,
TInt &aParamCount,
TIntaSubCount
)[private]

Finds the keystring from the source string and replaces it with the replacement string.

Parameters

const TDesC & aSource
const TDesC & aKey
const TDesC & aSubs
TBidiText::TDirectionality aDirectionality
TInt & aParamCount
TInt aSubCount

Formater(TDes &, const TDesC &, const TDesC &, const TDesC &, TBidiText::TDirectionality)

TInt Formater(TDes &aDest,
const TDesC &aSource,
const TDesC &aKey,
const TDesC &aSubs,
TBidiText::TDirectionalityaDirectionality
)[private]

Finds the keystring from the source string and replaces it with the replacement string. The formated string is stored in the destination descriptor.

Parameters

TDes & aDest
const TDesC & aSource
const TDesC & aKey
const TDesC & aSubs
TBidiText::TDirectionality aDirectionality

Fs()

IMPORT_C RFs &Fs()

GetParamCount(const TDesC &, TInt)

TInt GetParamCount(const TDesC &aText,
TIntaIndex = -1
)[private]

Counts the number of parameters in the text. Needed for correct memory allocations.

Parameters

const TDesC & aText
TInt aIndex = -1

GetSubStringCount(const TDesC &)

TInt GetSubStringCount(const TDesC &aText)[private]

Counts the number of substrings (separated by KSubStringSeparators) in the text. Needed for correct memory allocations.

Parameters

const TDesC & aText

Load2L(TInt)

IMPORT_C HBufC *Load2L(TIntaResourceId)

Parameters

TInt aResourceIda resource key of a resource defined as TBUF

Load2L(TInt, const TDesC &)

IMPORT_C HBufC *Load2L(TIntaResourceId,
const TDesC &aString
)

Parameters

TInt aResourceIda resource key of a resource defined as TBUF
const TDesC & aStringa string value used as parameter in formatting

Load2L(TInt, TInt)

IMPORT_C HBufC *Load2L(TIntaResourceId,
TIntaInt
)

Parameters

TInt aResourceIda resource key of a resource defined as TBUF
TInt aInta number to be inserted into the string

Load2LC(TInt)

IMPORT_C HBufC *Load2LC(TIntaResourceId)

Parameters

TInt aResourceIda resource key of a resource defined as TBUF

Load2LC(TInt, const TDesC &)

IMPORT_C HBufC *Load2LC(TIntaResourceId,
const TDesC &aString
)

Parameters

TInt aResourceIda resource key of a resource defined as TBUF
const TDesC & aStringa string value used as parameter in formatting

Load2LC(TInt, TInt)

IMPORT_C HBufC *Load2LC(TIntaResourceId,
TIntaInt
)

Parameters

TInt aResourceIda resource key of a resource defined as TBUF
TInt aInta number to be inserted into the string

LoadLC(TInt)

IMPORT_C HBufC *LoadLC(TIntaResourceId)

Parameters

TInt aResourceIda resource key of a resource defined as LBUF

NewL(const TDesC &)

IMPORT_C CResourceLoader *NewL(const TDesC &aName)[static]

A constructor.

Parameters

const TDesC & aNamea resource name

RemoveNoDirMarkers(TDes &)

voidRemoveNoDirMarkers(TDes &aText)[private]

Removes no dir markers from source text.

Parameters

TDes & aText

ResolveDirectionality(TDes &, TBool *)

TBidiText::TDirectionality ResolveDirectionality(TDes &aText,
TBool *aFound
)[private]

Resolves directionality of the given source text. Place-holder strings are removed so that they don't affect the result.

Parameters

TDes & aText
TBool * aFound

ResolveSubStringDirsL(TDes &, TInt, TBool *)

HBufC *ResolveSubStringDirsL(TDes &aText,
TIntaCount,
TBool *aMarker
)[private]

Parameters

TDes & aText
TInt aCount
TBool * aMarker

ResolveSubStringL(TDes &, TBool *)

HBufC *ResolveSubStringL(TDes &aText,
TBool *aMarker
)[private]

Resolves sub string and directionality of the sub string. Adds no dir marker if directionality of the string not found.

Parameters

TDes & aText
TBool * aMarker

Member Data Documentation

RFs iFs

RFs iFs[private]

RResourceFile iResFile

RResourceFile iResFile[private]