10 #ifndef __VOP_Snippet_h__
11 #define __VOP_Snippet_h__
28 const char *returntype,
30 const char *boundprefix,
32 const char *inputlist,
33 const char *exportlist,
43 static void adjustLocation(
const char *snippet,
bool strict_varnames, VCC_Location &loc);
64 const char *
inputLabel(
unsigned idx)
const override;
65 const char *
outputLabel(
unsigned idx)
const override;
72 bool check_shader_context
82 bool forcesubnet =
false)
override;
85 unsigned outputidx = 0)
override;
90 unsigned outputidx = 0)
override;
131 void adjustOutputParmsForInputChange(
int idx,
133 void adjustOutputParmsForNamedInputChange(
136 void swapInputs(
int srcidx,
int dstidx);
139 const VCC_DiagnosticInfo &diag)
override;
141 int getShaderExtraParametersHelper(
150 void getBaseOutputName(
UT_String &out,
int idx)
const;
151 int NUMPARMS()
const;
152 bool VEX_STRICT()
const;
153 bool FORCECODEGENERATION()
const;
154 bool STRICTVARIABLES()
const;
155 void OUTPUTNAME(
UT_String &str,
int idx,
bool expand)
const;
159 void OUTPUTLABEL(
UT_String &str,
int idx)
const;
161 void getFunctionName(
UT_String &fname)
const;
165 static bool adjustColumnForBindings(
const char *l,
int &col,
bool strict_varnames);
167 bool mySearchingForInputs;
virtual int getInputFromNameSubclass(const UT_String &in) const
Reprsents a language for which VOPs can generate source code.
virtual void getOuterCode(UT_String &codestr, const VOP_CodeGenContext &context)
virtual void addDiagnosticInfo(const VCC_DiagnosticInfo &diag)
void moveInput(int srcidx, int dstidx, bool forcesubnet=false) override
GLuint GLsizei const GLchar * label
OP_ERROR setNamedInputReference(const OP_ConnectorId &input_name, const char *label, int, const OP_ConnectorId *output_name=nullptr) override
bool definesShaderExtraParameters() const override
virtual bool forceCodeGenerationOfInputs(const VOP_CodeGenContext &context, bool check_shader_context) const
virtual unsigned getNumVisibleInputs() const
virtual int getShaderExtraParameters(UT_Array< VOP_Type > &types, UT_IntArray &doexport, UT_StringArray &names, UT_StringArray &def, VOP_Type shader_type=VOP_TYPE_UNDEF) const
virtual const char * inputLabel(unsigned idx) const
OP_ERROR setInput(unsigned idx, OP_Node *op, unsigned outputIdx=0) override
virtual unsigned getNumVisibleOutputs() const
OP_ERROR setInputReference(unsigned idx, const char *label, int keeppos, unsigned outputIdx=0) override
Connects an input to particular node by name in the network.
virtual void getInputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx)
virtual void findSimpleInputCandidatesFromOutput(int output_index, UT_IntArray &input_indices)
virtual void preOpChanged(OP_EventType, void *)
GLuint const GLchar * name
virtual VOP_Node * findSimpleInputFromOutput(int output_index)
virtual void getCode(UT_String &codestr, const VOP_CodeGenContext &context)
Get the code fragment to be included in the shader code.
virtual const char * outputLabel(unsigned idx) const
virtual void getOutputTypeInfoSubclass(VOP_TypeInfo &type_info, int idx)
virtual void getOutputNameSubclass(UT_String &out, int idx) const
void getDescriptiveParmName(UT_String &name) const override
VOP_Type
Enumeration of the built-in (basic) VOP data types.
virtual void getInputNameSubclass(UT_String &in, int idx) const
GLsizei GLenum GLenum * types
OP_ERROR setNamedInput(const OP_ConnectorId &input_name, OP_Node *op, const OP_ConnectorId *output_name=nullptr) override
New input functions that use names instead of indices.
virtual void postOpChanged(OP_EventType, void *)