SIL.FieldWorks.IText.ComplexConcMorphNode.GeneratePattern C# (CSharp) Method

GeneratePattern() public method

public GeneratePattern ( FeatureSystem featSys ) : ShapeNode>.PatternNode
featSys FeatureSystem
return ShapeNode>.PatternNode
		public override PatternNode<ComplexConcParagraphData, ShapeNode> GeneratePattern(FeatureSystem featSys)
		{
			var fs = new FeatureStruct();
			var typeFeat = featSys.GetFeature<SymbolicFeature>("type");
			fs.AddValue(typeFeat, typeFeat.PossibleSymbols["morph"]);
			AddStringValue(featSys, fs, Form, "form");
			AddStringValue(featSys, fs, Gloss, "gloss");
			AddStringValue(featSys, fs, Entry, "entry");
			if (Category != null)
			{
				var catFeat = featSys.GetFeature<SymbolicFeature>("cat");
				IEnumerable<FeatureSymbol> symbols = Category.ReallyReallyAllPossibilities.Concat(Category).Select(pos => catFeat.PossibleSymbols[pos.Hvo.ToString(CultureInfo.InvariantCulture)]);
				if (NegateCategory)
					symbols = catFeat.PossibleSymbols.Except(symbols);
				fs.AddValue(catFeat, symbols);
			}
			if (m_inflFeatures.Count > 0)
			{
				var inflFeat = featSys.GetFeature<ComplexFeature>("infl");
				fs.AddValue(inflFeat, GetFeatureStruct(featSys, m_inflFeatures));
			}

			return AddQuantifier(new Constraint<ComplexConcParagraphData, ShapeNode>(fs));
		}
	}