+
+ # Comparaison in a total order that superset the class refinement and the class specialisation relations
+ fun total_order_compare(b: MMLocalClass): Int
+ do
+ var a = self
+ if a == b then
+ return 0
+ else if a.mmmodule.mhe < b.mmmodule then
+ return 1
+ else if b.mmmodule.mhe < a.mmmodule then
+ return -1
+ end
+ var ar = a.cshe.rank
+ var br = b.cshe.rank
+ if ar > br then
+ return 1
+ else if br > ar then
+ return -1
+ else
+ return b.name.to_s <=> a.name.to_s
+ end
+ end