using ComputeSharp.Graphics.Extensions;
using System;
using System.Collections.Generic;
namespace ComputeSharp.Shaders.Renderer.Models.Functions
{
///
/// A that contains info on a shader function
///
internal sealed class FunctionInfo
{
///
/// Gets the return type of the current function in the C# source
///
public string FunctionCsharpReturnType { get; }
///
/// Gets the fullname of the current function in the C# source
///
public string FunctionFullName { get; }
///
/// Gets the parameters of the function in the C# source
///
public string FunctionCsharpParameters { get; }
///
/// Gets the return type of the current function
///
public string ReturnType { get; }
///
/// Gets the name of the current function
///
public string FunctionName { get; }
///
/// Gets the list of parameters for the current function
///
public IReadOnlyList ParametersList { get; }
///
/// Gets the body of the current function
///
public string FunctionBody { get; }
///
/// Creates a new instance with the specified parameters
///
/// The concrete return type for the function
/// The fullname of the function in the C# source
/// The parameters of the function in the C# source
/// The return type of the current function
/// The name of the current function
/// The function parameters, if any
/// The current function
public FunctionInfo(
Type functionCsharpType,
string functionFullname,
string functionCsharpParameters,
string returnType,
string functionName,
IReadOnlyList parameters,
string functionBody)
{
FunctionCsharpReturnType = functionCsharpType.ToFriendlyString();
FunctionFullName = functionFullname;
FunctionCsharpParameters = functionCsharpParameters;
ReturnType = returnType;
FunctionName = functionName;
ParametersList = parameters;
FunctionBody = functionBody;
}
}
}