XLL+ Class Library

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

ClassDescription
CXlOStreamA stream wrapper that allows the output of Excel native types to STL output streams.
CXlOStrStreamA class that converts Excel native types to in-memory byte arrays.
CXlIStreamA stream wrapper that allows the input of Excel native types from STL input streams.
CXlIStrStreamA class that reads Excel native types from in-memory byte arrays.
CXlSerialDataA byte array containing native and Excel data types.
CXlInputKeyA specialised instance of serialized data, which contains all the inputs to an add-in function, as a byte array.
CXlOperCacheA data store holding the results of functions, keyed by the values of all inputs.
CXlCacheBindingA 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