BindingsGenerator.Parameter.BasicTypeId C# (CSharp) Метод

BasicTypeId() публичный Метод

Returns the basic type as a sanitated identifier. If type "const float3 &" -> BasicType() returns "float3". If type "const float3 &" -> BasicType() returns "float3". If type "float3 * const" -> BasicType() returns "float3_ptr". If type "const float3 * const" -> BasicType() returns "float3_ptr".
public BasicTypeId ( ) : string
Результат string
        public string BasicTypeId()
        {
            string t = type.Trim();
            if (t.EndsWith("&"))
                t = t.Substring(0, t.Length - 1).Trim();
            if (t.StartsWith("const"))
                t = t.Substring(5).Trim();
            if (t.EndsWith("const"))
                t = t.Substring(0, t.Length - 5).Trim();
            if (t.EndsWith("*"))
            {
                t = t.Substring(0, t.Length - 1).Trim();

                if (t.EndsWith("const"))
                    t = t.Substring(0, t.Length - 5).Trim();

                t = t + "_ptr";
            }
            return t;
        }
    };