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 &)

void ConstructL ( const TDesC & aKey,
const TDesC & aValue
) [private]

Private 2nd phase constructor.

Parameters

const TDesC & aKey
const TDesC & aValue

ExternalizeL(RWriteStream &)

IMPORT_C void ExternalizeL ( RWriteStream & aStream ) const

Externalizes the pair to a stream

Parameters

RWriteStream & aStream Target stream

ExternalizeToDesLC()

IMPORT_C HBufC8 * ExternalizeToDesLC ( ) const

Externalizes the pair to a descriptor

InternalizeL(RReadStream &)

IMPORT_C void InternalizeL ( RReadStream & aStream )

Internalizes the pair from a stream

Parameters

RReadStream & aStream Source stream

Key()

const TDesC & Key ( ) const

Returns the key set for the pair.

MatchByKey(const CNcdKeyValuePair &, const CNcdKeyValuePair &)

IMPORT_C TBool MatchByKey ( 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 & aKey Key. Can not be empty
const TDesC & aValue Value. 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 & aOther Pair 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 & aKey Key. Can not be empty
const TDesC & aValue Value. 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 & aOther Pair 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 void SetKeyL ( const TDesC & aKey )

Set the key for the pair.

Exceptions
KErrArgument

if the key is empty

Parameters

const TDesC & aKey Key for the pair.

SetValueL(const TDesC &)

IMPORT_C void SetValueL ( const TDesC & aValue )

Set the value for the pair.

Parameters

const TDesC & aValue value 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]