/// <summary> /// ICloneable interface implementation /// </summary> /// <returns>Clone of itsel</returns> public override object Clone() { SimpleSymbol ss = new SimpleSymbol(symbol, type, italic, bold, s); ss.doubleValue = doubleValue; ss.ulongValue = ulongValue; return(ss); }
/// <summary> /// Checks whether the symbol is same /// </summary> /// <param name="sym">Symbol</param> /// <returns>True if same and false otherwise</returns> public override bool IsSame(MathSymbol sym) { if (!(sym is SimpleSymbol)) { return(false); } SimpleSymbol ss = sym as SimpleSymbol; return((bold == ss.bold) & (type == ss.type) & (ss.s.Equals(s))); }
/// <summary> /// Copy constructor /// </summary> /// <param name="s">Prototype</param> public SimpleSymbol(SimpleSymbol s) : this(s.symbol, s.type, s.italic, s.bold, s.s) { boolValue = s.boolValue; }