/// <summary> /// Add data to the ReferenceLeafNode /// </summary> /// <param name="text"> /// A <see cref="System.String"/> /// </param> /// <param name="model"> /// A <see cref="Model"/> /// </param> public void AddData(string text, Model model) { // Retrieve the object from the model SBase reference = (SBase)model.findObject(text); if (reference != null) { this.idReference = text; this.data = reference; } }
/// <summary> /// Checks all ReferenceLeafNodes so that they point to their SBase object. /// Used to complete a MathTree generated from MathML after it has been parsed and /// more about the model is known (such as paramters). /// </summary> /// <param name="model"> /// A <see cref="Model"/> /// </param> public override void SetSBaseReferences(Model model) { if (this.idReference != null) { SBase reference = (SBase)model.findObject(this.idReference); if (reference != null) { this.data = reference; } } }