TSwizzle<class T>
T*
operatorIn the following code fragment, the compiler invokes the T*()
operator (because a pointer is required) for the TSwizzle<CClassB>
object iB
, before calling delete
.
CClassABC::~CClassABC()
{
...
if (iB.IsPtr())
delete iB;
}
In the following code fragment, the *()
operator returns a reference to the CClassB
object represented by the swizzle TSwizzle<CClassB>
object, iB
.
TStreamId CClassABC::StoreL()
{
...
outstream << *iB;
...
}
In the following code fragment, the operator ->
gives access to the member iFixBuf
of the CClassB
object which is represented by the TSwizzle<CClassB>
swizzle, iB
.
void CClassABC::ConstructB(...,...,...,...)
{
iB->iFixBuf = aData;
...
}