/// <summary> /// Gets the string representing this type instance in generated code. /// </summary> /// <param name="truncateNamespace">If set to <c>true</c> namespace won't be added to the generated type string.</param> /// <returns>The string representing this type instance in generated code.</returns> public override string GetTypeString(bool truncateNamespace = false) { string elementTypeString = ElementType.GetTypeString(truncateNamespace); if (IsPhysical) { return($"{elementTypeString}[]"); } return($"{CodeNaming.ToString(typeof(CodeArray))}<{elementTypeString}>"); }
/// <summary> /// Function that should evaluate <see cref="UserType.TypeName"/> property. /// </summary> /// <returns>User type name.</returns> protected override string GetTypeName() { if (Symbol is EnumConstantSymbol enumConstant) { return(CodeNaming.FixUserNaming($"{enumConstant.EnumSymbol.UserType.FullTypeName}_{enumConstant.Value}")); } if (Symbol is IntegralConstantSymbol integralConstant) { return(CodeNaming.FixUserNaming($"{CodeNaming.ToString(integralConstant.Value.GetType())}_{integralConstant.Value}")); } throw new System.NotImplementedException(); }
/// <summary> /// Gets the string representing this type instance in generated code. /// </summary> /// <param name="truncateNamespace">If set to <c>true</c> namespace won't be added to the generated type string.</param> /// <returns>The string representing this type instance in generated code.</returns> public override string GetTypeString(bool truncateNamespace = false) { return(CodeNaming.ToString(typeof(CodeFunction))); }
/// <summary> /// Gets the string representing this type instance in generated code. /// </summary> /// <param name="truncateNamespace">If set to <c>true</c> namespace won't be added to the generated type string.</param> /// <returns>The string representing this type instance in generated code.</returns> public override string GetTypeString(bool truncateNamespace = false) { return(IsVariable ? CodeNaming.ToString(typeof(Variable)) : CodeNaming.ToString(typeof(UserType))); }
/// <summary> /// Gets the string representing this type instance in generated code. /// </summary> /// <param name="truncateNamespace">If set to <c>true</c> namespace won't be added to the generated type string.</param> /// <returns>The string representing this type instance in generated code.</returns> public override string GetTypeString(bool truncateNamespace = false) { return(CodeNaming.ToString(BasicType)); }
/// <summary> /// Gets the string representing this type instance in generated code. /// </summary> /// <param name="truncateNamespace">If set to <c>true</c> namespace won't be added to the generated type string.</param> /// <returns>The string representing this type instance in generated code.</returns> public override string GetTypeString(bool truncateNamespace = false) { string elementTypeString = ElementType.GetTypeString(truncateNamespace); return($"{CodeNaming.ToString(typeof(CodePointer))}<{elementTypeString}>"); }