diff -r ebc84c812384 -r 46218c8b8afa Symbian3/PDK/Source/GUID-4F882837-0DA1-5243-BA7B-696B418A160E.dita --- a/Symbian3/PDK/Source/GUID-4F882837-0DA1-5243-BA7B-696B418A160E.dita Thu Mar 11 15:24:26 2010 +0000 +++ b/Symbian3/PDK/Source/GUID-4F882837-0DA1-5243-BA7B-696B418A160E.dita Thu Mar 11 18:02:22 2010 +0000 @@ -1,26 +1,26 @@ - - - - - -How to -use a package bufferExplains how to use TPckg< >. -

The following code fragments show an object or a C type struct being written -to a file:

-TXxx x; // some structure -TPtr8 xDes(&x, sizeof(x)); // descriptor of that structure -file.Write(xDes); // write structure to file -

While this approach works, it is not type safe. The descriptor could be -mistaken as referring to an object which is not of type TXxx.

-

Use a package buffer which works in a similar way but enforces type safety, -as the following code fragment shows:

-TXxx x; // some structure -TPckg<TXxx> xDes(x); // make into a package -file.Write(xDes); // now write structure t file + + + + + +How to +use a package bufferExplains how to use TPckg< >. +

The following code fragments show an object or a C type struct being written +to a file:

+TXxx x; // some structure +TPtr8 xDes(&x, sizeof(x)); // descriptor of that structure +file.Write(xDes); // write structure to file +

While this approach works, it is not type safe. The descriptor could be +mistaken as referring to an object which is not of type TXxx.

+

Use a package buffer which works in a similar way but enforces type safety, +as the following code fragment shows:

+TXxx x; // some structure +TPckg<TXxx> xDes(x); // make into a package +file.Write(xDes); // now write structure t file
\ No newline at end of file