Language Mapping for Arrays
  • Roughly speaking, arrays are mapped to C++ arrays
  • The Auction system does not use any arrays, but a simple array declaration in IDL would look like:
      typedef boolean TruthTable[2][2];
      
  • The C++ code for this is shown in Code Sample 9
    • The array itself is represented in a straightforward way
    • However, there are several helper routines associated with the array (not all of them are shown)
      • These helper routines are used to manipulate (allocate, free, copy, etc) arrays
      • These routines use a pointer to an array slice to represent instances of the array
      • The array slice is the array-type itself minus the first dimension (e.g. it corresponds to the type of one row of the array)
  • Next Slide >>