TAiwVariant Class Reference

#include <mw/AiwVariant.h>

Link against: ServiceHandler.lib

class TAiwVariant
Public Member Functions
TAiwVariant()
TAiwVariant(TInt32)
TAiwVariant(const TUid &)
TAiwVariant(const TTime &)
TAiwVariant(const TDesC &)
TAiwVariant(const HBufC *)
TAiwVariant(const TDesC8 &)
TAiwVariant(const RFile &)
TAiwVariant(const TAiwVariant &)
IMPORT_C TPtrC8AsData()
IMPORT_C TPtrCAsDes()
IMPORT_C RFileAsFileHandle()
IMPORT_C TInt32AsTInt32()
IMPORT_C TTimeAsTTime()
IMPORT_C TUidAsTUid()
IMPORT_C TBoolGet(TInt32 &)
IMPORT_C TBoolGet(TUid &)
IMPORT_C TBoolGet(TPtrC &)
IMPORT_C TBoolGet(TTime &)
IMPORT_C TBoolGet(TPtrC8 &)
IMPORT_C TBoolGet(RFile &)
TBool IsEmpty()
IMPORT_C voidReset()
IMPORT_C voidSet(TInt32)
IMPORT_C voidSet(const TUid &)
IMPORT_C voidSet(const TTime &)
IMPORT_C voidSet(const TDesC &)
voidSet(const HBufC *)
IMPORT_C voidSet(const TDesC8 &)
IMPORT_C voidSet(const RFile &)
TVariantTypeId TypeId()
IMPORT_C TAiwVariant &operator=(const TAiwVariant &)
TAiwVariant &operator=(const TTime &)
TAiwVariant &operator=(const TUid &)
TAiwVariant &operator=(TInt32)
TAiwVariant &operator=(const TDesC &)
TAiwVariant &operator=(const HBufC *)
TAiwVariant &operator=(const TDesC8 &)
TAiwVariant &operator=(const RFile &)

Detailed Description

Variant data class to hold a value of a TAiwGenericParam instance. The variant contains a data type and a value. This class is attached to TAiwGenericParam instance which holds the semantic type of the value.

Since
Series 60 2.6

See also: TAiwGenericParam

Constructor & Destructor Documentation

TAiwVariant ( )

TAiwVariant()[inline]

Default constructor. Initializes this variant to be empty.

Post-condition
IsEmpty()

TAiwVariant ( TInt32 )

TAiwVariant(TInt32aValue)[inline]

Constructor from a value.

ParameterDescription
aValueThe value to set for this variant object.

TAiwVariant ( const TUid & )

TAiwVariant(const TUid &aValue)[inline]

Constructor from a value.

ParameterDescription
aValueThe value to set for this variant object.

TAiwVariant ( const TTime & )

TAiwVariant(const TTime &aValue)[inline]

Constructor from a value.

ParameterDescription
aValueThe value to set for this variant object.

TAiwVariant ( const TDesC & )

TAiwVariant(const TDesC &aValue)[inline]

Constructor from a value.

ParameterDescription
aValueThe value to set for this variant object.

TAiwVariant ( const HBufC * )

TAiwVariant(const HBufC *aValue)[inline]

Constructor from a value.

ParameterDescription
aValueThe value to set for this variant object.

TAiwVariant ( const TDesC8 & )

TAiwVariant(const TDesC8 &aValue)[inline]

Constructor from a value.

ParameterDescription
aValueThe value to set for this variant object.

TAiwVariant ( const RFile & )

TAiwVariant(const RFile &aValue)[inline]

Constructor from a value.

ParameterDescription
aValueThe value to set for this variant object.

TAiwVariant ( const TAiwVariant & )

IMPORT_CTAiwVariant(const TAiwVariant &aSrc)

Copy constructor. Does not take ownership of data.

ParameterDescription
aSrcThe source object.

Member Function Documentation

AsData ( )

IMPORT_C TPtrC8AsData()const

Returns the value held by this variant.

Returns: The value held by this variant. If the data type does not match the function, the default initialized data is returned.

AsDes ( )

IMPORT_C TPtrCAsDes()const

Returns the value held by this variant.

Returns: The value held by this variant. If the data type does not match the function, the default initialized data is returned.

AsFileHandle ( )

IMPORT_C RFileAsFileHandle()const

Returns the value held by this variant.

Returns: The value held by this variant. If the data type does not match the function, the default initialized data is returned.

AsTInt32 ( )

IMPORT_C TInt32AsTInt32()const

Returns the value held by this variant.

Returns: The value held by this variant. If the data type does not match the function, the default initialized data is returned.

AsTTime ( )

IMPORT_C TTimeAsTTime()const

Returns the value held by this variant.

Returns: The value held by this variant. If the data type does not match the function, the default initialized data is returned.

AsTUid ( )

IMPORT_C TUidAsTUid()const

Returns the value held by this variant.

Returns: The value held by this variant. If the data type does not match the function, the default initialized data is returned.

Get ( TInt32 & )

IMPORT_C TBoolGet(TInt32 &aValue)const

Retrieves the value held by this variant.

ParameterDescription
aValueIf this variant's type does not match the parameter type, the parameter will not be modified.

Returns: ETrue if aValue was set, EFalse if types did not match.

Get ( TUid & )

IMPORT_C TBoolGet(TUid &aValue)const

Retrieves the value held by this variant.

ParameterDescription
aValueIf this variant's type does not match the parameter type, the parameter will not be modified.

Returns: ETrue if aValue was set, EFalse if types did not match.

Get ( TPtrC & )

IMPORT_C TBoolGet(TPtrC &aValue)const

Retrieves the value held by this variant.

ParameterDescription
aValueIf this variant's type does not match the parameter type, the parameter will not be modified.

Returns: ETrue if aValue was set, EFalse if types did not match.

Get ( TTime & )

IMPORT_C TBoolGet(TTime &aValue)const

Retrieves the value held by this variant.

ParameterDescription
aValueIf this variant's type does not match the parameter type, the parameter will not be modified.

Returns: ETrue if aValue was set, EFalse if types did not match.

Get ( TPtrC8 & )

IMPORT_C TBoolGet(TPtrC8 &aValue)const

Retrieves the value held by this variant.

ParameterDescription
aValueIf this variant's type does not match the parameter type, the parameter will not be modified.

Returns: ETrue if aValue was set, EFalse if types did not match.

Get ( RFile & )

IMPORT_C TBoolGet(RFile &aValue)const

Retrieves the value held by this variant.

ParameterDescription
aValueIf this variant's type does not match the parameter type, the parameter will not be modified.

Returns: ETrue if aValue was set, EFalse if types did not match.

IsEmpty ( )

TBool IsEmpty()const [inline]

Returns ETrue if this variant is empty (it does not hold any value).

Reset ( )

IMPORT_C voidReset()

Deletes possibly set value and resets this variant to empty.

Post-condition
IsEmpty()

Set ( TInt32 )

IMPORT_C voidSet(TInt32aValue)

Sets integer value to this variant. The previous value is overwritten.

Post-condition
*this == aValue
ParameterDescription
aValueValue for this variant object to hold.

Set ( const TUid & )

IMPORT_C voidSet(const TUid &aValue)

Sets unique ID value to this variant. The previous value is overwritten.

Post-condition
*this == aValue
ParameterDescription
aValueValue for this variant object to hold.

Set ( const TTime & )

IMPORT_C voidSet(const TTime &aValue)

Sets date and time value to this variant. The previous value is overwritten.

Post-condition
*this == aValue
ParameterDescription
aValueValue for this variant object to hold.

Set ( const TDesC & )

IMPORT_C voidSet(const TDesC &aValue)

Sets constant text reference to this variant.

Post-condition
*this == aValue
ParameterDescription
aValueText value for this variant object to hold.

Set ( const HBufC * )

voidSet(const HBufC *aValue)[inline]

Sets constant text reference to this variant.

ParameterDescription
aValueText value for this variant object to hold. Ownership is not taken.

Set ( const TDesC8 & )

IMPORT_C voidSet(const TDesC8 &aValue)

Sets constant 8-bit text reference to this variant.

Post-condition
*this == aValue
ParameterDescription
aValueText value for this variant object to hold.

Set ( const RFile & )

IMPORT_C voidSet(const RFile &aValue)

Sets RFile file handle to this variant.

Post-condition
*this == aValue
ParameterDescription
aValueFile handle for this variant object to hold.

TypeId ( )

TVariantTypeId TypeId()const [inline]

Returns the type id of data this variant object is holding.

operator= ( const TAiwVariant & )

IMPORT_C TAiwVariant &operator=(const TAiwVariant &aValue)

Assignment operator. Does not take ownership of data.

ParameterDescription
aValueThe source object.

operator= ( const TTime & )

TAiwVariant &operator=(const TTime &aValue)[inline]

Assignment operator for the variant.

ParameterDescription
aValueThe source object.

operator= ( const TUid & )

TAiwVariant &operator=(const TUid &aValue)[inline]

Assignment operator for the variant.

ParameterDescription
aValueThe source object.

operator= ( TInt32 )

TAiwVariant &operator=(TInt32aValue)[inline]

Assignment operator for the variant.

ParameterDescription
aValueThe source object.

operator= ( const TDesC & )

TAiwVariant &operator=(const TDesC &aValue)[inline]

Assignment operator for the variant.

ParameterDescription
aValueThe source object.

operator= ( const HBufC * )

TAiwVariant &operator=(const HBufC *aValue)[inline]

Assignment operator for the variant.

ParameterDescription
aValueThe source object.

operator= ( const TDesC8 & )

TAiwVariant &operator=(const TDesC8 &aValue)[inline]

Assignment operator for the variant.

ParameterDescription
aValueThe source object.

operator= ( const RFile & )

TAiwVariant &operator=(const RFile &aValue)[inline]

Assignment operator for the variant.

ParameterDescription
aValueThe source object.