XLL+ Class Library (6.3)

xlserialize.h

Overview

xlserialize.h contains classes that allow you to convert Excel argument and result types to and from a byte array.

This behavior is useful for several reasons:

  1. Cacheing results. The byte array can be used as an efficient key to a map. This means you can very easily cache the results of an add-in function in a map keyed by its inputs. The CXlOperCache class implements this behavior.
  2. Persistence. A byte array can be saved to file explicitly, or can be saved as binary data with any worksheet. You can use the CXllApp::SaveBinaryData() method with CXlSerialData to save hidden data in worksheets.
  3. Messaging. The byte array can be passed along pipes or other simple channels, between threads, processes or machines.

Classes

Class Description
CXlOStream A stream wrapper that allows the output of Excel native types to STL output streams.
CXlOStrStream A class that converts Excel native types to in-memory byte arrays.
CXlIStream A stream wrapper that allows the input of Excel native types from STL input streams.
CXlIStrStream A class that reads Excel native types from in-memory byte arrays.
CXlSerialData A byte array containing native and Excel data types.
CXlInputKey A specialised instance of serialized data, which contains all the inputs to an add-in function, as a byte array.
CXlOperCache A data store holding the results of functions, keyed by the values of all inputs.
CXlCacheBinding A connection between a function and a cache that automatically updates the cache as the function exits.

See Also

CXlSerialData object | CXlInputKey object | CXlOperCache object | xldialog.h | Cache sample | Serialize sample