protected override int InsertNC(IPhNaturalClass nc, SelectionHelper sel, out int cellIndex, out IPhSimpleContextNC ctxt) { ctxt = m_cache.ServiceLocator.GetInstance <IPhSimpleContextNCFactory>().Create(); var cellId = InsertContext(ctxt, sel, out cellIndex); ctxt.FeatureStructureRA = nc; return(cellId); }
private static XElement ExportNaturalClass(IPhNaturalClass naturalClass, Icu.UNormalizationMode mode) { return new XElement(naturalClass.ClassName, new XAttribute("Id", naturalClass.Hvo), ExportBestAnalysis(naturalClass.Name, "Name", mode), ExportBestAnalysis(naturalClass.Description, "Description", mode), ExportBestAnalysis(naturalClass.Abbreviation, "Abbreviation", mode), (naturalClass is IPhNCFeatures) ? ExportNaturalClassContents(naturalClass as IPhNCFeatures) : ExportNaturalClassContents(naturalClass as IPhNCSegments)); }
protected override int InsertNC(IPhNaturalClass nc, SelectionHelper sel, out int cellIndex, out IPhSimpleContextNC ctxt) { ctxt = m_cache.ServiceLocator.GetInstance<IPhSimpleContextNCFactory>().Create(); var cellId = InsertContext(ctxt, sel, out cellIndex); ctxt.FeatureStructureRA = nc; return cellId; }
private IPhSimpleContextNC AddNCContext(IPhNaturalClass nc) { IPhSimpleContextNC ncCtxt = Cache.ServiceLocator.GetInstance<IPhSimpleContextNCFactory>().Create(); Cache.LanguageProject.PhonologicalDataOA.ContextsOS.Add(ncCtxt); ncCtxt.FeatureStructureRA = nc; return ncCtxt; }
/// <summary> /// Inserts an item from a natural class. /// </summary> /// <param name="nc">The natural class.</param> /// <param name="sel">The selection.</param> /// <param name="cellIndex">Index of the new item.</param> /// <param name="ctxt">The new context.</param> /// <returns> /// The ID of the cell that the item was inserted into /// </returns> protected virtual int InsertNC(IPhNaturalClass nc, SelectionHelper sel, out int cellIndex, out IPhSimpleContextNC ctxt) { throw new NotImplementedException(); }
private int InsertNC(IPhNaturalClass nc, SelectionHelper sel, out int cellIndex) { IPhSimpleContextNC ctxt; return InsertNC(nc, sel, out cellIndex, out ctxt); }