Exemplo n.º 1
0
        public override Object Clone()
        {
            IterateExpImpl theClone = (IterateExpImpl)base.Clone();

            theClone.result = (VariableDeclaration)result.Clone();
            theClone.result.setLoopExp(theClone);
            return(theClone);
        }
Exemplo n.º 2
0
        public override Object Clone()
        {
            VariableExpImpl theClone = (VariableExpImpl)base.Clone();

            // this variable should not be cloned here, but it is ok regarding our purposes for the moment.
            theClone.referredVariable = (VariableDeclaration)referredVariable.Clone();
            ((VariableDeclarationImpl)theClone.referredVariable).addVariableExp(theClone);
            return(theClone);
        }
Exemplo n.º 3
0
        public override Object Clone()
        {
            LetExpImpl theClone = (LetExpImpl)base.Clone();

            theClone.variable = (VariableDeclaration)variable.Clone();
            theClone.inE      = (OclExpression)inE.Clone();

            theClone.variable.setLetExp(theClone);
            theClone.inE.setLetExp(theClone);

            return(theClone);
        }
Exemplo n.º 4
0
    public virtual Differences VisitVariableDeclaration(VariableDeclaration variableDeclaration1, VariableDeclaration variableDeclaration2){
      Differences differences = new Differences(variableDeclaration1, variableDeclaration2);
      if (variableDeclaration1 == null || variableDeclaration2 == null){
        if (variableDeclaration1 != variableDeclaration2) differences.NumberOfDifferences++; else differences.NumberOfSimilarities++;
        return differences;
      }
      VariableDeclaration changes = (VariableDeclaration)variableDeclaration2.Clone();
      VariableDeclaration deletions = (VariableDeclaration)variableDeclaration2.Clone();
      VariableDeclaration insertions = (VariableDeclaration)variableDeclaration2.Clone();

      //      variableDeclaration1.Field;
      //      variableDeclaration1.Initializer;
      //      variableDeclaration1.Name;
      //      variableDeclaration1.Type;

      if (differences.NumberOfDifferences == 0){
        differences.Changes = null;
        differences.Deletions = null;
        differences.Insertions = null;
      }else{
        differences.Changes = changes;
        differences.Deletions = deletions;
        differences.Insertions = insertions;
      }
      return differences;
    }
Exemplo n.º 5
0
 public override Statement VisitVariableDeclaration(VariableDeclaration variableDeclaration)
 {
     if (variableDeclaration == null) return null;
     return base.VisitVariableDeclaration((VariableDeclaration)variableDeclaration.Clone());
 }