#!/usr/bin/perl

# File         : generate.pl
# Author       : Bryan Carpenter
# Created      : Thu Jul 15 10:44:32 BST 2004
# Revision     : $Revision: 1.3 $
# Updated      : $Date: 2005/08/16 21:44:02 $

  # Numeric types

  @ntypes = ('byte', 'short', 'int', 'long', 'char', 'float', 'double') ;
  @nTypes = ('Byte', 'Short', 'Int', 'Long', 'Char', 'Float', 'Double') ;


  # Primitive types

  @ptypes = (@ntypes, 'boolean') ;
  @pTypes = (@nTypes, 'Boolean') ;


  # General types

  @types = (@ptypes, 'Object') ;
  @Types = (@pTypes, 'Object') ;


  # Root names for classes generated by simple templates over primitive types

  @proots = () ;


  # Root names for classes generated by simple templates over general types
  # groots = ('SimplePacker', 'MultistridedPacker', 'GatherPacker') ;
  @groots = ('SimplePacker', 'MultistridedPacker', 'GatherPacker',
         'Band', 'Max', 'Bor', 'Minloc', 'Bxor', 'Min', 'Land', 'Lor',
         'Prod', 'Lxor', 'Maxloc', 'Sum') ;


  foreach $root (@proots) {

      for ($i = 0 ; $i < @ptypes ; $i++) {

          $Type = $pTypes [$i] ;

          unlink "${root}${Type}.java" ;
      }

  }


  foreach $root (@groots) {

      $template = "${root}Type.java.in" ;

      for ($i = 0 ; $i < @types ; $i++) {

          $Type = $Types [$i] ;

          unlink "${root}${Type}.java" ;
      }

  }

