An Array-Like Example

This section contains an extended example that performs a type transformation for the std::vector type. This example has two parts. The first part uses CLI commands that install the callback functions. The second contains several utility functions that simplify the logic of the callback functions.

Note:   As an aid in understanding the function listings, these utility functions are displayed in bold type.

This type transformation uses a global array to store information about the vector type's being remapped. This array, which is indexed by the type identifier, contains the following three-element list:

  • The type identifier for the type of the elements of the array.
  • The offset of the _M_start field.
  • The offset of the _M_finish field.
 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0