public BuildMatchObject( BuildMatchObjectType type, string patternElementUnprefixedName, string patternElementName, string rulePatternClassName, string matchObjectName, string matchClassName) { Debug.Assert(type == BuildMatchObjectType.Independent); Type = type; PatternElementUnprefixedName = patternElementUnprefixedName; PatternElementName = patternElementName; RulePatternClassName = rulePatternClassName; MatchObjectName = matchObjectName; MatchClassName = matchClassName; }
public BuildMatchObject( BuildMatchObjectType type, string patternElementType, string patternElementUnprefixedName, string patternElementName, string rulePatternClassName, string pathPrefixForEnum, string matchObjectName, int numSubpatterns) { Debug.Assert(type != BuildMatchObjectType.Independent); Type = type; PatternElementType = patternElementType; PatternElementUnprefixedName = patternElementUnprefixedName; PatternElementName = patternElementName; RulePatternClassName = rulePatternClassName; PathPrefixForEnum = pathPrefixForEnum; MatchObjectName = matchObjectName; NumSubpatterns = numSubpatterns; // only valid if type == Alternative }
/// <summary> /// Returns name of the given element in the match class with correct match part prefix /// </summary> public static string MatchName(string unprefixedElementName, BuildMatchObjectType matchPart) { switch (matchPart) { case BuildMatchObjectType.Node: return("node_" + unprefixedElementName); case BuildMatchObjectType.Edge: return("edge_" + unprefixedElementName); case BuildMatchObjectType.Variable: return("var_" + unprefixedElementName); case BuildMatchObjectType.Subpattern: return(unprefixedElementName); case BuildMatchObjectType.InlinedSubpattern: return(unprefixedElementName); case BuildMatchObjectType.Iteration: return(unprefixedElementName); case BuildMatchObjectType.Alternative: return(unprefixedElementName); case BuildMatchObjectType.Independent: return(unprefixedElementName); default: return("INTERNAL ERROR"); } }
/// <summary> /// Returns name of the given element in the match class with correct match part prefix /// </summary> public static string MatchName(string unprefixedElementName, BuildMatchObjectType matchPart) { switch (matchPart) { case BuildMatchObjectType.Node: return "node_" + unprefixedElementName; case BuildMatchObjectType.Edge: return "edge_" + unprefixedElementName; case BuildMatchObjectType.Variable: return "var_" + unprefixedElementName; case BuildMatchObjectType.Subpattern: return unprefixedElementName; case BuildMatchObjectType.InlinedSubpattern: return unprefixedElementName; case BuildMatchObjectType.Iteration: return unprefixedElementName; case BuildMatchObjectType.Alternative: return unprefixedElementName; case BuildMatchObjectType.Independent: return unprefixedElementName; default: return "INTERNAL ERROR"; } }
public BuildMatchObject( BuildMatchObjectType type, string patternElementUnprefixedName, string patternElementName, string rulePatternClassName, string matchObjectName, string matchClassName) { Debug.Assert(type == BuildMatchObjectType.Independent); Type = type; PatternElementUnprefixedName = patternElementUnprefixedName; PatternElementName = patternElementName; RulePatternClassName = rulePatternClassName; MatchObjectName = matchObjectName; MatchClassName = matchClassName; }
public BuildMatchObject( BuildMatchObjectType type, string patternElementType, string patternElementUnprefixedName, string patternElementName, string rulePatternClassName, string pathPrefixForEnum, string matchObjectName, int numSubpatterns) { Debug.Assert(type != BuildMatchObjectType.Independent); Type = type; PatternElementType = patternElementType; PatternElementUnprefixedName = patternElementUnprefixedName; PatternElementName = patternElementName; RulePatternClassName = rulePatternClassName; PathPrefixForEnum = pathPrefixForEnum; MatchObjectName = matchObjectName; NumSubpatterns = numSubpatterns; // only valid if type == Alternative }