Added new template models for static functions
このコミットが含まれているのは:
1 親
9748187c34
コミット
22d281eee8
2ファイル変更
+102
検索条件に一致するファイルはありません
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using ComputeSharp.Shaders.Extensions;
|
||||
|
||||
namespace ComputeSharp.Shaders.Renderer.Models.Functions
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that contains info on a shader function
|
||||
/// </summary>
|
||||
internal class FunctionInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the return type of the current function in the C# source
|
||||
/// </summary>
|
||||
public string FunctionCsharpReturnType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the fullname of the current function in the C# source
|
||||
/// </summary>
|
||||
public string FunctionFullName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the parameters of the function in the C# source
|
||||
/// </summary>
|
||||
public string FunctionCsharpParameters { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the return type of the current function
|
||||
/// </summary>
|
||||
public string ReturnType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the current function
|
||||
/// </summary>
|
||||
public string FunctionName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the body of the current function
|
||||
/// </summary>
|
||||
public string FunctionBody { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="FunctionInfo"/> instance with the specified parameters
|
||||
/// </summary>
|
||||
/// <param name="functionCsharpType">The concrete return type for the function</param>
|
||||
/// <param name="functionFullname">The fullname of the function in the C# source</param>
|
||||
/// <param name="functionCsharpParameters">The parameters of the function in the C# source</param>
|
||||
/// <param name="returnType">The return type of the current function</param>
|
||||
/// <param name="functionName">The name of the current function</param>
|
||||
/// <param name="functionBody">The current function</param>
|
||||
public FunctionInfo(
|
||||
Type functionCsharpType,
|
||||
string functionFullname,
|
||||
string functionCsharpParameters,
|
||||
string returnType,
|
||||
string functionName,
|
||||
string functionBody)
|
||||
{
|
||||
FunctionCsharpReturnType = functionCsharpType.ToFriendlyString();
|
||||
FunctionFullName = functionFullname;
|
||||
FunctionCsharpParameters = functionCsharpParameters;
|
||||
ReturnType = returnType;
|
||||
FunctionName = functionName;
|
||||
FunctionBody = functionBody;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
namespace ComputeSharp.Shaders.Renderer.Models.Functions
|
||||
{
|
||||
/// <summary>
|
||||
/// A <see langword="class"/> that contains info on a function parameter
|
||||
/// </summary>
|
||||
internal class ParameterInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the type of the current parameter
|
||||
/// </summary>
|
||||
public string ParameterType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name to use for the current parameter
|
||||
/// </summary>
|
||||
public string ParameterName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether or not the current parameter is the last one for the parent function
|
||||
/// </summary>
|
||||
public bool IsLastParameter { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="ParameterInfo"/> instance with the specified parameters
|
||||
/// </summary>
|
||||
/// <param name="parameterType">The type of the current parameter</param>
|
||||
/// <param name="parameterName">The name of the current parameter</param>
|
||||
/// <param name="last">Indicates whether or not the current parameter is the last one</param>
|
||||
public ParameterInfo(string parameterType, string parameterName, bool last)
|
||||
{
|
||||
ParameterType = parameterType;
|
||||
ParameterName = parameterName;
|
||||
IsLastParameter = last;
|
||||
}
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする