Class GlslFunctionNode

java.lang.Object
foundry.veil.impl.glsl.node.function.GlslFunctionNode
All Implemented Interfaces:
GlslNode

public class GlslFunctionNode extends Object implements GlslNode
Defines a function in a GLSL file with an optional body.
  • Constructor Details

  • Method Details

    • visit

      public void visit(GlslFunctionVisitor visitor)
    • getHeader

      public GlslFunctionHeader getHeader()
      Returns:
      The full signature of this function
    • getBody

      @Nullable public @Nullable List<GlslNode> getBody()
      Returns:
      The body of the function or null if this is just a function prototype
    • setHeader

      public void setHeader(GlslFunctionHeader header)
      Sets the function header of this function to the specified value.
      Parameters:
      header - The new header
    • setBody

      public void setBody(@Nullable @Nullable Collection<GlslNode> body)
      Sets the body of this function or null to make this a function prototype.
      Parameters:
      body - The new function body
    • setBody

      public void setBody(GlslNode... body)
      Sets the body of this function or null to make this a function prototype.
      Parameters:
      body - The new function body
    • getSourceString

      public String getSourceString()
      Specified by:
      getSourceString in interface GlslNode
    • stream

      public Stream<GlslNode> stream()
      Specified by:
      stream in interface GlslNode
    • toString

      public String toString()
      Overrides:
      toString in class Object