|
|
|
class TSwizzleC : public TSwizzleCBase;
Maintains a dual representation for a constant object. The representation is:
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 template class defines the type of object for which the swizzle is a representation. Access to the to the represented object is available through the swizzle, but is limited. The represented object cannot be changed.
Maintaining a dual representation for an object allows the loading of objects into memory from a store to be deferred; this is particularly important in complex applications.
TSwizzleCBase -
Base class for swizzles.
TSwizzleC -
Maintains a dual representation for a constant object. The representation is:
Defined in TSwizzleC:
AsPtr()constReturns a constant pointer to the object which this swizzle represents.ExternalizeL(RWriteStream &)constExternalises the stream id of the stream associated with this swizzle.TSwizzleC()Constructs an uninitialised swizzle. It is necessary because there are also non-...TSwizzleC(TStreamId)Constructs a swizzle for a class T type object and represents the object as a st...TSwizzleC(TSwizzle< T >)Constructs a swizzle for a class T type object that is currently represented by ...TSwizzleC(const T *)Constructs a swizzle for a class T type object and represents the object by poin...operator *()constReturns a const reference to the type T object which this swizzle represents.operator const T *()constoperator->()constGives access to members of the type T object which this swizzle represents.operator=(const T *)Sets this swizzle to represent the in-memory type T object, pointed to by the sp...Inherited from TSwizzleCBase:
AsId()constGets the streamid of the represented object.DoExternalizeL(RWriteStream &,TExternalizer< TAny >)constInternalizeL(RReadStream &)Internalises a stream id from the read stream, constructs a swizzle from this st...IsId()constTests whether this swizzle currently represents an object as a stream id.IsPtr()constTests whether this swizzle currently represents an object as a pointer.Ptr()constTSwizzleCBase(TStreamId)TSwizzleCBase(TStreamRef)TSwizzleCBase(const TAny *)operator!=(const TAny *)constCompares for inequality with an in-memory object.operator!=(const TSwizzleCBase &)constCompares for inequality with another swizzle.operator==(const TAny *)constCompares for equality with an in-memory object.operator==(const TSwizzleCBase &)constCompares for equality with another swizzle.inline TSwizzleC();
Constructs an uninitialised swizzle. It is necessary because there are also non-default constructors in this class.
inline TSwizzleC(const T *aPtr);
Constructs a swizzle for a class T type object and represents the object by pointer.
|
inline TSwizzleC(TStreamId anId);
Constructs a swizzle for a class T type object and represents the object as a stream id.
|
inline TSwizzleC(TSwizzle< T > aSwizzle);
Constructs a swizzle for a class T type object that is currently represented by another swizzle.
The representation of the class T type object is the same as its representation by the specified swizzle, i.e. if the specified swizzle represents the object as a pointer, then this newly constructed swizzle also represents the object as a pointer.
|
inline TSwizzleC< T >& operator=(const T *aPtr);
Sets this swizzle to represent the in-memory type T object, pointed to by the specified T* pointer.
|
|
TSwizzle::operator=(T *)Sets this swizzle to represent the in-memory type T object, pointed to by the sp...inline const T* AsPtr() const;
Returns a constant pointer to the object which this swizzle represents.
Note:
The in memory object cannot be changed through this swizzle.
To access members of the object, the indirect component selector TSwizzleC::operator->()const can be used.
|
inline const T& operator *() const;
Returns a const reference to the type T object which this swizzle represents.
|
TSwizzle::operator *()constReturns a reference to the type T object which this swizzle represents.inline const T* operator->() const;
Gives access to members of the type T object which this swizzle represents.
Note:
use the TSwizzleC::AsPtr()const member function to return a pointer to the object itself.
the type T object cannot be changed through this operator.
|
TSwizzle::operator->()constGives access to members of the type T object which this swizzle represents.inline void ExternalizeL(RWriteStream &aStream) const;
Externalises the stream id of the stream associated with this swizzle.
This function presupposes that:
a store map, i.e. an object of type CStoreMap, has been constructed
the id of the stream containing the external representation of the <class T> object has been bound to this swizzle and added to the store map.
the concrete stream referenced by aStream has been constructed, specifying the store map as an externalizer.
The presence of this function means that the standard templated operator<<(RWriteStream &,const T &) can be used.
|