CNcdKeyValuePair Class Reference

class CNcdKeyValuePair : public CBase

A default implementation for the MNcdKeyValuePair interface, providing storage for the key and value in simple heap allocated buffers.

ncdutils_20019119.dll

MNcdKeyValuePair

Inherits from

Constructor & Destructor Documentation

CNcdKeyValuePair()

CNcdKeyValuePair()[private]

Private constructor.

~CNcdKeyValuePair()

~CNcdKeyValuePair()[virtual]

Destructor.

Member Functions Documentation

ConstructL(const TDesC &, const TDesC &)

voidConstructL(const TDesC &aKey,
const TDesC &aValue
)[private]

Private 2nd phase constructor.

Parameters

const TDesC & aKey
const TDesC & aValue

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Externalizes the pair to a stream

Parameters

RWriteStream & aStreamTarget stream

ExternalizeToDesLC()

IMPORT_C HBufC8 *ExternalizeToDesLC()const

Externalizes the pair to a descriptor

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)

Internalizes the pair from a stream

Parameters

RReadStream & aStreamSource stream

Key()

const TDesC &Key()const

Returns the key set for the pair.

MatchByKey(const CNcdKeyValuePair &, const CNcdKeyValuePair &)

IMPORT_C TBoolMatchByKey(const CNcdKeyValuePair &aFirst,
const CNcdKeyValuePair &aSecond
)[static]

Comparison method. Compares the keys of two pairs to determine equivalence.

Parameters

const CNcdKeyValuePair & aFirst
const CNcdKeyValuePair & aSecond

NewL(const TDesC &, const TDesC &)

IMPORT_C CNcdKeyValuePair *NewL(const TDesC &aKey,
const TDesC &aValue
)[static]

Constructor.

Exceptions
System

wide error code.

KErrArgument

if aKey is empty

Parameters

const TDesC & aKeyKey. Can not be empty
const TDesC & aValueValue. Can be an empty descriptor

NewL(const MNcdKeyValuePair &)

IMPORT_C CNcdKeyValuePair *NewL(const MNcdKeyValuePair &aOther)[static]

Creates a copy of an key-value -pair.

Parameters

const MNcdKeyValuePair & aOtherPair to copy

NewL(RReadStream &)

IMPORT_C CNcdKeyValuePair *NewL(RReadStream &aStream)[static]

Internalizes the key-value pair from a stream

Parameters

RReadStream & aStream

NewLC(const TDesC &, const TDesC &)

IMPORT_C CNcdKeyValuePair *NewLC(const TDesC &aKey,
const TDesC &aValue
)[static]

Constructor, leaves pointer on clean-up stack.

Exceptions
System

wide error code.

KErrArgument

if aKey is empty

Parameters

const TDesC & aKeyKey. Can not be empty
const TDesC & aValueValue. Can be an empty descriptor

NewLC(const MNcdKeyValuePair &)

IMPORT_C CNcdKeyValuePair *NewLC(const MNcdKeyValuePair &aOther)[static]

Creates a copy of the key-value -pair, leaves pointer on clean-up stack

Parameters

const MNcdKeyValuePair & aOtherPair to copy

NewLC(RReadStream &)

IMPORT_C CNcdKeyValuePair *NewLC(RReadStream &aStream)[static]

Internalizes the key-value pair from a stream

Parameters

RReadStream & aStream

SetKeyL(const TDesC &)

IMPORT_C voidSetKeyL(const TDesC &aKey)

Set the key for the pair.

Exceptions
KErrArgument

if the key is empty

Parameters

const TDesC & aKeyKey for the pair.

SetValueL(const TDesC &)

IMPORT_C voidSetValueL(const TDesC &aValue)

Set the value for the pair.

Parameters

const TDesC & aValuevalue for the pair.

Value()

const TDesC &Value()const

Returns the value set for the pair.

Member Data Documentation

HBufC * iKey

HBufC *iKey[private]

HBufC * iValue

HBufC *iValue[private]