Logo Search packages:      
Sourcecode: ndoc version File versions  Download package

Operators.cs

using System;

namespace NDoc.Test.Operator
{
      /// <summary>
      /// Various permutations of operators
      /// </summary>
00008       public class NamespaceDoc {}

      /// <summary>This class contains some operators; some overloaded and some not.</summary>
00011       public class OpOverloads 
      {
            ///<overloads>Addition Operator.</overloads>
            /// <summary>Add OperatorOverloads to OperatorOverloads.</summary>
00015             public static int operator +(OpOverloads x, OpOverloads y) { return 0; }
            /// <summary>Add int to OperatorOverloads.</summary>
00017             public static int operator +(OpOverloads x, int y) { return 0; }
            /// <summary>double to OperatorOverloads.</summary>
00019             public static int operator +(OpOverloads x, double y) { return 0; }

            /// <summary>Subtraction operator.</summary>
00022             public static int operator -(OpOverloads x, OpOverloads y) { return 0; }
            /// <summary>Subtraction operator.</summary>
00024             public static int operator -(OpOverloads x, int y) { return 0; }
            /// <summary>Subtraction operator.</summary>
00026             public static int operator -(OpOverloads x, double y) { return 0; }

            /// <summary>divide OperatorOverloads by OperatorOverloads.</summary>
00029             public static int operator *(OpOverloads x, OpOverloads y) { return 0; }
            /// <summary>multiply OperatorOverloads with OperatorOverloads.</summary>
00031             public static int operator /(OpOverloads x, OpOverloads y) { return 0; }
      }

      /// <summary>This class contains various overloaded type conversions.</summary>
00035       public class ConvExplicit 
      {
      
            /// <summary>Explicit conversion to an int.</summary>
00039             public static explicit operator int (ConvExplicit t) {return      0;}

            /// <summary>Explicit conversion to an float.</summary>
00042             public static explicit operator float (ConvExplicit t) {return    0;}
            
            /// <summary>Explicit conversion to an double.</summary>
00045             public static explicit operator double (ConvExplicit t) {return   0;}

            /// <summary>Explicit conversion from a double.</summary>
00048             public static explicit operator ConvExplicit (double d) {return   new ConvExplicit();}
      }

      /// <summary>This class contains various overloaded type conversions.</summary>
00052       public class ConvImplicit 
      {
      
            /// <summary>Implicit conversion to an int.</summary>
00056             public static implicit operator int (ConvImplicit t) {return      0;}

            /// <summary>Implicit conversion to an float.</summary>
00059             public static implicit operator float (ConvImplicit t) {return    0;}
            
            /// <summary>Implicit conversion to an double.</summary>
00062             public static implicit operator double (ConvImplicit t) {return   0;}

            /// <summary>Implicit conversion from a double.</summary>
00065             public static implicit operator ConvImplicit (double d) {return   new ConvImplicit();}
      }

      /// <summary>This class contains various overloaded operators and type conversions.</summary>
00069       public class MixedOps 
      {
      
            /// <summary>Implicit conversion to a string.</summary>
00073             public static implicit operator string (MixedOps t) {return "abcd";}

            /// <summary>Implicit conversion to an int.</summary>
00076             public static implicit operator int (MixedOps t) {return    0;}

            /// <summary>Implicit conversion to an float.</summary>
00079             public static implicit operator float (MixedOps t) {return  0;}
            
            /// <summary>Implicit conversion to an double.</summary>
00082             public static implicit operator double (MixedOps t) {return 0;}

            /// <summary>Implicit conversion from a double.</summary>
00085             public static implicit operator MixedOps (double d) {return new MixedOps();}

            /// <summary>Implicit conversion to a boolean.</summary>
00088             public static implicit operator bool (MixedOps t) {return true;}

            ///<overloads>Addition Operator.</overloads>
            /// <summary>Add OperatorOverloads to OperatorOverloads.</summary>
            public static int operator +(MixedOps x, MixedOps y) { return 0; }
            /// <summary>Add int to OperatorOverloads.</summary>
00094             public static int operator +(MixedOps x, int y) { return 0; }
            /// <summary>double to OperatorOverloads.</summary>
00096             public static int operator +(MixedOps x, double y) { return 0; }

            /// <summary>Subtraction operator.</summary>
00099             public static int operator -(MixedOps x, MixedOps y) { return 0; }
            /// <summary>Subtraction operator.</summary>
00101             public static int operator -(MixedOps x, int y) { return 0; }
            /// <summary>Subtraction operator.</summary>
00103             public static int operator -(MixedOps x, double y) { return 0; }

            /// <summary>Greater-than operator.</summary>
00106             public static bool operator >(MixedOps x, MixedOps y) { return true; }
            /// <summary>Greater-than operator.</summary>
00108             public static bool operator >(MixedOps x, double y) { return true; }
            /// <summary>Less-than operator.</summary>
00110             public static bool operator <(MixedOps x, MixedOps y) { return true; }
            /// <summary>Less-than operator.</summary>
00112             public static bool operator <(MixedOps x, double y) { return true; }
      }

      /// <summary>This class contains all the overloadable operators.</summary>
00116       public class Operators
      {
            /// <summary>Unary plus operator.</summary>
00119             public static int operator +(Operators o) { return 0; }

            /// <summary>Unary minus operator.</summary>
00122             public static int operator -(Operators o) { return 0; }

            /// <summary>Logical negation operator.</summary>
00125             public static int operator !(Operators o) { return 0; }

            /// <summary>Bitwise complement operator.</summary>
00128             public static int operator ~(Operators o) { return 0; }

            /// <summary>Increment operator.</summary>
00131             public static Operators operator ++(Operators o) { return null; }

            /// <summary>Decrement operator.</summary>
00134             public static Operators operator --(Operators o) { return null; }

            /// <summary>Definitely true operator.</summary>
00137             public static bool operator true(Operators o) { return true; }

            /// <summary>Definitely false operator.</summary>
00140             public static bool operator false(Operators o) { return false; }

            /// <summary>Addition operator.</summary>
00143             public static int operator +(Operators x, Operators y) { return 0; }

            /// <summary>Subtraction operator.</summary>
00146             public static int operator -(Operators x, Operators y) { return 0; }

            /// <summary>Multiplication operator.</summary>
00149             public static int operator *(Operators x, Operators y) { return 0; }

            /// <summary>Division operator.</summary>
00152             public static int operator /(Operators x, Operators y) { return 0; }

            /// <summary>Remainder operator.</summary>
00155             public static int operator %(Operators x, Operators y) { return 0; }

            /// <summary>And operator.</summary>
00158             public static int operator &(Operators x, Operators y) { return 0; }

            /// <summary>Or operator.</summary>
00161             public static int operator |(Operators x, Operators y) { return 0; }

            /// <summary>Exclusive-or operator.</summary>
00164             public static int operator ^(Operators x, Operators y) { return 0; }

            /// <summary>Left-shift operator.</summary>
00167             public static int operator <<(Operators x, int y) { return 0; }

            /// <summary>Right-shift operator.</summary>
00170             public static int operator >>(Operators x, int y) { return 0; }

            /// <summary>Equality operator.</summary>
00173             public static bool operator ==(Operators x, Operators y) { return false; }

            /// <summary>Inequality operator.</summary>
00176             public static bool operator !=(Operators x, Operators y) { return false; }

            /// <summary>Equals method.</summary>
00179             public override bool Equals(Object o) { return false; }

            /// <summary>GetHashCode method.</summary>
00182             public override int GetHashCode() { return 0; }

            /// <summary>Less-than operator.</summary>
00185             public static bool operator <(Operators x, Operators y) { return false; }

            /// <summary>Greater-than operator.</summary>
00188             public static bool operator >(Operators x, Operators y) { return false; }

            /// <summary>Less-than-or-equal operator.</summary>
00191             public static bool operator <=(Operators x, Operators y) { return false; }

            /// <summary>Greater-than-or-equal operator.</summary>
00194             public static bool operator >=(Operators x, Operators y) { return false; }

            /// <summary>A multiplication method.</summary>
00197             public static int Multiply(Operators x, Operators y) { return 0; }
      }

}

Generated by  Doxygen 1.6.0   Back to index