Class GlslFunctionNode
java.lang.Object
io.github.ocelot.glslprocessor.api.node.function.GlslFunctionNode
- All Implemented Interfaces:
GlslNode,GlslRootNode
Defines a function in a GLSL file with an optional body.
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionGlslFunctionNode(GlslFunctionHeader header, @Nullable Collection<GlslNode> body) -
Method Summary
Modifier and TypeMethodDescriptionboolean@Nullable GlslNodeListgetBody()@NotNull StringgetName()inthashCode()booleansetBody(@Nullable Collection<GlslNode> body) Sets the body of this function ornullto make this a function prototype.voidsetHeader(GlslFunctionHeader header) Sets the function header of this function to the specified value.stream()toString()voidvisit(GlslNodeVisitor visitor) Visits this node.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.ocelot.glslprocessor.api.node.GlslNode
getType, setBody, toList, toSourceStringMethods inherited from interface io.github.ocelot.glslprocessor.api.node.GlslRootNode
asDeclaration, asField, asFunction, asStruct, isDeclaration, isField, isFunction, isStruct
-
Constructor Details
-
GlslFunctionNode
-
-
Method Details
-
visit
Description copied from interface:GlslNodeVisits this node. -
getNodeType
- Specified by:
getNodeTypein interfaceGlslNode- Returns:
- The type of node this class represents
-
getHeader
- Returns:
- The full signature of this function
-
getName
- Specified by:
getNamein interfaceGlslRootNode
-
getReturnType
- Returns:
- The return type of the function
-
getParameters
- Returns:
- The parameters of the function
-
getBody
-
setHeader
Sets the function header of this function to the specified value.- Parameters:
header- The new header
-
setName
- Specified by:
setNamein interfaceGlslRootNode
-
setBody
Sets the body of this function ornullto make this a function prototype. -
stream
-
equals
-
hashCode
public int hashCode() -
toString
-