本文整理汇总了C#中Specification.IsSpecializedOutermorphismName方法的典型用法代码示例。如果您正苦于以下问题:C# Specification.IsSpecializedOutermorphismName方法的具体用法?C# Specification.IsSpecializedOutermorphismName怎么用?C# Specification.IsSpecializedOutermorphismName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Specification
的用法示例。
在下文中一共展示了Specification.IsSpecializedOutermorphismName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsSom
/// <summary>
/// Return true if argument 'argIdx' in 'F' is a specialized outermorphism type.
/// </summary>
/// <param name="S">Specification of algebra</param>
/// <param name="F">Function specification</param>
/// <param name="argIdx">Index of argument. If out of range, false is returned.</param>
/// <returns>true if argument 'argIdx' in 'F' is an outermorphism type.</returns>
public static bool IsSom(Specification S, G25.fgs F, int argIdx)
{
if (argIdx >= F.NbArguments) return false;
return (S.IsSpecializedOutermorphismName(F.GetArgumentTypeName(argIdx, "")));
}
示例2: NotUseOm
/// <summary>
/// Return true if 'F' does not use outermorphism types
/// </summary>
/// <param name="S">Specification of algebra</param>
/// <param name="F">Function specification</param>
/// <param name="defaultArgType">Default argument type for all arguments (todo: allow for per-argument type)</param>
/// <param name="nbArgs">Number of arguments.</param>
/// <returns>true if 'F' does not mix arguments of type SMV and GMV</returns>
public static bool NotUseOm(Specification S, G25.fgs F, int nbArgs, String defaultArgType)
{
for (int a = 0; a < nbArgs; a++)
{
String typeName = F.GetArgumentTypeName(a, defaultArgType);
if ((S.IsSpecializedOutermorphismName(typeName)) ||
((S.m_GOM != null) && (S.m_GOM.Name == typeName))) return false;
}
return true;
}