TSwizzleCBase Class Reference

class TSwizzleCBase

Base class for swizzles.

A swizzle maintains a dual representation for an object:

by stream id, if the object is not in memory (the stream contains the external representation of that object).

by pointer, if the object is in memory.

The class is not intended for instantiation.

Public Member Functions
IMPORT_C TStreamIdAsId()
IMPORT_C voidInternalizeL(RReadStream &)
TBool IsId()
TBool IsPtr()
TBool operator!=(const TSwizzleCBase &)
TBool operator!=(const TAny *)
TBool operator==(const TSwizzleCBase &)
TBool operator==(const TAny *)
Protected Member Functions
TSwizzleCBase()
TSwizzleCBase(const TAny *)
TSwizzleCBase(TStreamId)
TSwizzleCBase(TStreamRef)
IMPORT_C voidDoExternalizeL(RWriteStream &, TExternalizer< TAny >)
const TAny *Ptr()
Private Member Functions
IMPORT_C TBoolIsIdRep(const TAny *)
IMPORT_C TBoolIsPtrRep(const TAny *)
IMPORT_C void__DbgChkPtr(const TAny *)
IMPORT_C void__DbgChkRef(TStreamRef)
Private Attributes
const TAny *iPtr

Constructor & Destructor Documentation

TSwizzleCBase()

TSwizzleCBase()[protected, inline]

TSwizzleCBase(const TAny *)

TSwizzleCBase(const TAny *aPtr)[protected, inline]

Parameters

const TAny * aPtr

TSwizzleCBase(TStreamId)

IMPORT_CTSwizzleCBase(TStreamIdanId)[protected]

Parameters

TStreamId anId

TSwizzleCBase(TStreamRef)

TSwizzleCBase(TStreamRefaRef)[protected, inline]

Parameters

TStreamRef aRef

Member Functions Documentation

AsId()

IMPORT_C TStreamIdAsId()const

Gets the streamid of the represented object.

This swizzle must currently represent the object as a stream id, otherwise the function raises a STORE-Store 3 panic.

DoExternalizeL(RWriteStream &, TExternalizer< TAny >)

IMPORT_C voidDoExternalizeL(RWriteStream &aStream,
TExternalizer< TAny >anExter
)const [protected]

Parameters

RWriteStream & aStream
TExternalizer< TAny > anExter

InternalizeL(RReadStream &)

IMPORT_C voidInternalizeL(RReadStream &aStream)

Internalises a stream id from the read stream, constructs a swizzle from this stream id and copies the swizzle to this swizzle.

The presence of this function means that the standard templated operator>>() can be used to internalise objects of this class.

Parameters

RReadStream & aStreamStream from which the stream id should be internalised

IsId()

TBool IsId()const [inline]

Tests whether this swizzle currently represents an object as a stream id.

IsIdRep(const TAny *)

IMPORT_C TBoolIsIdRep(const TAny *aPtr)[private, static]

Parameters

const TAny * aPtr

IsPtr()

TBool IsPtr()const [inline]

Tests whether this swizzle currently represents an object as a pointer.

IsPtrRep(const TAny *)

IMPORT_C TBoolIsPtrRep(const TAny *aPtr)[private, static]

Parameters

const TAny * aPtr

Ptr()

const TAny *Ptr()const [protected, inline]

__DbgChkPtr(const TAny *)

IMPORT_C void__DbgChkPtr(const TAny *aPtr)[private, static]

Parameters

const TAny * aPtr

__DbgChkRef(TStreamRef)

IMPORT_C void__DbgChkRef(TStreamRefaRef)[private, static]

Parameters

TStreamRef aRef

operator!=(const TSwizzleCBase &)

TBool operator!=(const TSwizzleCBase &aSwizzle)const [inline]

Compares for inequality with another swizzle.

Use this operator to determine whether this swizzle represents a different object to that represented by the specified swizzle.

Both this swizzle and the specified swizzle must maintain the representation of their respective objects as either pointers or stream ids.

If one swizzle maintains the representation of its object as a pointer while the other swizzle maintains the representation of its object as a stream id, the comparison is meaningless and always returns true.

Parameters

const TSwizzleCBase & aSwizzleA reference to the swizzle to be compared with this swizzle.

operator!=(const TAny *)

TBool operator!=(const TAny *aPtr)const [inline]

Compares for inequality with an in-memory object.

Use this operator to determine whether this swizzle represents a different in-memory object to that represented by the specified pointer.

This swizzle must maintain the representation of its object as a pointer. If it maintains the representation of its object as a swizzle, the comparison is meaningless and always returns true.

Parameters

const TAny * aPtrA pointer to the object to be compared with this swizzle.

operator==(const TSwizzleCBase &)

TBool operator==(const TSwizzleCBase &aSwizzle)const [inline]

Compares for equality with another swizzle.

Use this operator to determine whether this swizzle represents the same object as that represented by the specified swizzle.

Both this swizzle and the specified swizzle must maintain the representation of their respective objects as either pointers or stream ids.

If one swizzle maintains the representation of its object as a pointer while the other swizzle maintains the representation of its object as a stream id, the comparison is meaningless and always returns false.

Parameters

const TSwizzleCBase & aSwizzleA reference to the swizzle to be compared with this swizzle.

operator==(const TAny *)

TBool operator==(const TAny *aPtr)const [inline]

Compares for equality with an in-memory object.

Use this operator to determine whether this swizzle represents the same in-memory object as that represented by the specified pointer.

This swizzle must maintain the representation of its object as a pointer. If it maintains the representation of its object as a swizzle, the comparison is meaningless and always returns false.

Parameters

const TAny * aPtrA pointer to the object to be compared with this swizzle.

Member Data Documentation

const TAny * iPtr

const TAny *iPtr[private]