Subversion Repositories DevTools

Rev

Rev 2106 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2104 ghuddy 1
using System;
2
using System.Collections;
3
 
4
namespace EA_DocGen
5
{
6
   /// <summary>
7
   /// Class to sort EA elements alphabetically, in a case insensitive way.
8
   /// This is used by the processRelationshipMatrixElement method.
9
   /// </summary>
10
   public class elementSortByName : IComparer
11
   {
12
      int IComparer.Compare( object x, object y)
13
      {
14
         if (x!=null & y!= null)
15
            return (new CaseInsensitiveComparer()).Compare( ((EA.Element)x).Name, ((EA.Element)y).Name );
16
         else
17
            return 0;
18
      }
19
   }
20
 
21
 
22
   public class attributeSortByPos : IComparer
23
   {
24
      int IComparer.Compare( object x, object y)
25
      {
26
         if (x!=null & y!= null)
27
            return ((EA.Attribute)x).Pos - ((EA.Attribute)y).Pos;
28
         else
29
            return 0;
30
      }
31
   }
32
 
33
 
34
   public class methodSortByPos : IComparer
35
   {
36
      int IComparer.Compare( object x, object y)
37
      {
38
         if (x!=null & y!= null)
39
            return ((EA.Method)x).Pos - ((EA.Method)y).Pos;
40
         else
41
            return 0;
42
      }
43
   }
44
 
45
 
46
   public class parameterSortByPos : IComparer
47
   {
48
      int IComparer.Compare( object x, object y)
49
      {
50
         if (x!=null & y!= null)
51
            return ((EA.Parameter)x).Position - ((EA.Parameter)y).Position;
52
         else
53
            return 0;
54
      }
55
   }
56
 
57
}