/*
 * This file is released under terms of BSD license
 * See LICENSE file for more information
 */

package cx2x.translator.transformation.claw.parallelize;

/**
 * Hold various information about the promotion of variable.
 *
 * @author clementval
 */
public class PromotionInfo {
  private String _identifier;
  private int _baseDimension;
  private int _targetDimension;
  private String _targetType;


  /**
   * Contructs a new PromotionInfo object with all its information.
   * @param id              Identifier of the promoted variable.
   * @param baseDimension   Number of dimensions before the promotion.
   * @param targetDimension Number of dimensions after the promotion.
   * @param targetType      Type if after the promotion.
   */
  public PromotionInfo(String id, int baseDimension, int targetDimension,
                       String targetType)
  {
    _identifier = id;
    _baseDimension = baseDimension;
    _targetDimension = targetDimension;
    _targetType = targetType;
  }

  /**
   * Check whether the variable was a scalar before the promotion.
   * @return True if the variable was a scalar. False otherwise.
   */
  public boolean wasScalar(){
    return _baseDimension == 0;
  }

  /**
   * Get the type id after the promotion.
   * @return Type id.
   */
  public String getTargetType(){
    return _targetType;
  }


  /**
   * Get the number of dimension between the base and the target.
   * @return Number of dimension.
   */
  public int diffDimension(){
    return  _targetDimension - _baseDimension;
  }

}

@@ -277,32 +277,38 @@
 nfo %7B%0A  private 
+final 
 String _identifi
@@ -317,24 +317,30 @@
 ;%0A  private 
+final 
 int _baseDim
@@ -357,16 +357,22 @@
 private 
+final 
 int _tar
@@ -395,16 +395,22 @@
 private 
+final 
 String _

Set final