home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 79 / IOPROG_79.ISO / soft / Tools / XMLSPYEnt2004 / XMLSPYEntComplete2004.exe / Data1.cab / _D3A619E313C34933A2557A3630036F9B < prev    next >
Encoding:
Text File  |  2003-07-18  |  6.7 KB  |  371 lines

  1. //
  2. // SchemaTypes.cs
  3. //
  4. // This file was generated by XMLSPY 2004 Enterprise Edition.
  5. //
  6. // YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
  7. // OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
  8. //
  9. // Refer to the XMLSPY Documentation for further details.
  10. // http://www.altova.com/xmlspy
  11. //
  12.  
  13.  
  14. using System;
  15.  
  16. namespace Altova.Types
  17. {
  18.     public interface ISchemaType : IComparable, ICloneable
  19.     {
  20.     }
  21.  
  22.     public class SchemaBoolean : ISchemaType
  23.     {
  24.         public bool Value;
  25.  
  26.         public SchemaBoolean(SchemaBoolean obj)
  27.         {
  28.             Value = obj.Value;
  29.         }
  30.  
  31.         public SchemaBoolean(bool Value)
  32.         {
  33.             this.Value = Value;
  34.         }
  35.  
  36.         public SchemaBoolean(string Value)
  37.         {
  38.             this.Value = Value == "true" || Value == "1";
  39.         }
  40.  
  41.         public override string ToString()
  42.         {
  43.             return Value ? "true" : "false";
  44.         }
  45.  
  46.         public override int GetHashCode()
  47.         {
  48.             return Value ? 1231 : 1237;
  49.         }
  50.  
  51.         public override bool Equals(object obj)
  52.         {
  53.             if (obj == null)
  54.                 return false;
  55.             if (!(obj is SchemaBoolean))
  56.                 return false;
  57.             return Value == ((SchemaBoolean)obj).Value;
  58.         }
  59.  
  60.         public static bool operator==(SchemaBoolean obj1, SchemaBoolean obj2)
  61.         {
  62.             return obj1.Value == obj2.Value;
  63.         }
  64.  
  65.         public static bool operator!=(SchemaBoolean obj1, SchemaBoolean obj2)
  66.         {
  67.             return obj1.Value != obj2.Value;
  68.         }
  69.  
  70.         public int CompareTo(object obj)
  71.         {
  72.             return Value.CompareTo(((SchemaBoolean)obj).Value);
  73.         }
  74.  
  75.         public object Clone()
  76.         {
  77.             return new SchemaBoolean(Value);
  78.         }
  79.     }
  80.  
  81.     public class SchemaInt : ISchemaType
  82.     {
  83.         public int Value;
  84.  
  85.         public SchemaInt(SchemaInt obj)
  86.         {
  87.             Value = obj.Value;
  88.         }
  89.  
  90.         public SchemaInt(int Value)
  91.         {
  92.             this.Value = Value;
  93.         }
  94.  
  95.         public SchemaInt(string Value)
  96.         {
  97.             this.Value = Convert.ToInt32(Value);
  98.         }
  99.  
  100.         public override string ToString()
  101.         {
  102.             return Convert.ToString(Value);
  103.         }
  104.  
  105.         public override int GetHashCode()
  106.         {
  107.             return Value;
  108.         }
  109.  
  110.         public override bool Equals(object obj)
  111.         {
  112.             if (obj == null)
  113.                 return false;
  114.             if (!(obj is SchemaInt))
  115.                 return false;
  116.             return Value == ((SchemaInt)obj).Value;
  117.         }
  118.  
  119.         public static bool operator==(SchemaInt obj1, SchemaInt obj2)
  120.         {
  121.             return obj1.Value == obj2.Value;
  122.         }
  123.  
  124.         public static bool operator!=(SchemaInt obj1, SchemaInt obj2)
  125.         {
  126.             return obj1.Value != obj2.Value;
  127.         }
  128.  
  129.         public int CompareTo(object obj)
  130.         {
  131.             return Value.CompareTo(((SchemaInt)obj).Value);
  132.         }
  133.  
  134.         public object Clone()
  135.         {
  136.             return new SchemaInt(Value);
  137.         }
  138.     }
  139.  
  140.     public class SchemaLong : ISchemaType
  141.     {
  142.         public long Value;
  143.  
  144.         public SchemaLong(SchemaLong obj)
  145.         {
  146.             Value = obj.Value;
  147.         }
  148.  
  149.         public SchemaLong(long Value)
  150.         {
  151.             this.Value = Value;
  152.         }
  153.  
  154.         public SchemaLong(string Value)
  155.         {
  156.             this.Value = Convert.ToInt64(Value);
  157.         }
  158.  
  159.         public override string ToString()
  160.         {
  161.             return Convert.ToString(Value);
  162.         }
  163.  
  164.         public override int GetHashCode()
  165.         {
  166.             return (int)Value;
  167.         }
  168.  
  169.         public override bool Equals(object obj)
  170.         {
  171.             if (obj == null)
  172.                 return false;
  173.             if (!(obj is SchemaLong))
  174.                 return false;
  175.             return Value == ((SchemaLong)obj).Value;
  176.         }
  177.  
  178.         public static bool operator==(SchemaLong obj1, SchemaLong obj2)
  179.         {
  180.             return obj1.Value == obj2.Value;
  181.         }
  182.  
  183.         public static bool operator!=(SchemaLong obj1, SchemaLong obj2)
  184.         {
  185.             return obj1.Value != obj2.Value;
  186.         }
  187.  
  188.         public int CompareTo(object obj)
  189.         {
  190.             return Value.CompareTo(((SchemaLong)obj).Value);
  191.         }
  192.  
  193.         public object Clone()
  194.         {
  195.             return new SchemaLong(Value);
  196.         }
  197.     }
  198.  
  199.     public class SchemaDecimal : ISchemaType
  200.     {
  201.         public decimal Value;
  202.  
  203.         public SchemaDecimal(SchemaDecimal obj)
  204.         {
  205.             Value = obj.Value;
  206.         }
  207.  
  208.         public SchemaDecimal(decimal Value)
  209.         {
  210.             this.Value = Value;
  211.         }
  212.  
  213.         public SchemaDecimal(string Value)
  214.         {
  215.             this.Value = Convert.ToDecimal(Value);
  216.         }
  217.  
  218.         public override string ToString()
  219.         {
  220.             return Convert.ToString(Value);
  221.         }
  222.  
  223.         public override int GetHashCode()
  224.         {
  225.             return Value.GetHashCode();
  226.         }
  227.  
  228.         public override bool Equals(object obj)
  229.         {
  230.             if (obj == null)
  231.                 return false;
  232.             if (!(obj is SchemaDecimal))
  233.                 return false;
  234.             return Value == ((SchemaDecimal)obj).Value;
  235.         }
  236.  
  237.         public static bool operator==(SchemaDecimal obj1, SchemaDecimal obj2)
  238.         {
  239.             return obj1.Value == obj2.Value;
  240.         }
  241.  
  242.         public static bool operator!=(SchemaDecimal obj1, SchemaDecimal obj2)
  243.         {
  244.             return obj1.Value != obj2.Value;
  245.         }
  246.  
  247.         public int CompareTo(object obj)
  248.         {
  249.             return Value.CompareTo(((SchemaDecimal)obj).Value);
  250.         }
  251.  
  252.         public object Clone()
  253.         {
  254.             return new SchemaDecimal(Value);
  255.         }
  256.     }
  257.  
  258.     public class SchemaDateTime : ISchemaType
  259.     {
  260.         public DateTime Value;
  261.  
  262.         public SchemaDateTime(SchemaDateTime obj)
  263.         {
  264.             Value = obj.Value;
  265.         }
  266.  
  267.         public SchemaDateTime(DateTime Value)
  268.         {
  269.             this.Value = Value;
  270.         }
  271.  
  272.         public SchemaDateTime(string Value)
  273.         {
  274.             this.Value = Convert.ToDateTime(Value);
  275.         }
  276.  
  277.         public override string ToString()
  278.         {
  279.             return Value.GetDateTimeFormats('s')\[0\];
  280.         }
  281.  
  282.         public override int GetHashCode()
  283.         {
  284.             return Value.GetHashCode();
  285.         }
  286.  
  287.         public override bool Equals(object obj)
  288.         {
  289.             if (obj == null)
  290.                 return false;
  291.             if (!(obj is SchemaDateTime))
  292.                 return false;
  293.             return Value == ((SchemaDateTime)obj).Value;
  294.         }
  295.  
  296.         public static bool operator==(SchemaDateTime obj1, SchemaDateTime obj2)
  297.         {
  298.             return obj1.Value == obj2.Value;
  299.         }
  300.  
  301.         public static bool operator!=(SchemaDateTime obj1, SchemaDateTime obj2)
  302.         {
  303.             return obj1.Value != obj2.Value;
  304.         }
  305.  
  306.         public int CompareTo(object obj)
  307.         {
  308.             return Value.CompareTo(((SchemaDateTime)obj).Value);
  309.         }
  310.  
  311.         public object Clone()
  312.         {
  313.             return new SchemaDateTime(Value);
  314.         }
  315.     }
  316.  
  317.     public class SchemaString : ISchemaType
  318.     {
  319.         public string Value;
  320.  
  321.         public SchemaString(SchemaString obj)
  322.         {
  323.             Value = obj.Value;
  324.         }
  325.  
  326.         public SchemaString(string Value)
  327.         {
  328.             this.Value = Value;
  329.         }
  330.  
  331.         public override string ToString()
  332.         {
  333.             return Value;
  334.         }
  335.  
  336.         public override int GetHashCode()
  337.         {
  338.             return Value.GetHashCode();
  339.         }
  340.  
  341.         public override bool Equals(object obj)
  342.         {
  343.             if (obj == null)
  344.                 return false;
  345.             if (!(obj is SchemaString))
  346.                 return false;
  347.             return Value == ((SchemaString)obj).Value;
  348.         }
  349.  
  350.         public static bool operator==(SchemaString obj1, SchemaString obj2)
  351.         {
  352.             return obj1.Value == obj2.Value;
  353.         }
  354.  
  355.         public static bool operator!=(SchemaString obj1, SchemaString obj2)
  356.         {
  357.             return obj1.Value != obj2.Value;
  358.         }
  359.  
  360.         public int CompareTo(object obj)
  361.         {
  362.             return Value.CompareTo(((SchemaString)obj).Value);
  363.         }
  364.  
  365.         public object Clone()
  366.         {
  367.             return new SchemaString(Value);
  368.         }
  369.     }
  370. }
  371.