Describes the Internalize() and Externalize() functions for representing objects.
Since packages may be used to describe an object of any type, and may be conveniently written to a file and sent over communications links, it is tempting to use them to transmit all application data types.
Packages directly package the internal representation of an object. They should only be used when the internal representation is expected by all recipients of the package. This would be the case, say, with inter thread data transfer or certain rare types of file.
When an object is stored on file, or sent over a link, it is usually desirable to define an external representation which may be safely read by any Symbian platform implementation, even on a machine with different endianness, different compiler options, and different machine word size.
In such a case, writing a struct directly is inappropriate. Instead, the InternalizeL() and ExternalizeL() functions should be implemented for the object and should encapsulate all internalisation and externalisation. The stream interface should be used, which may refer to file, communications, clipboard and a number of other possibilities.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.