VOP_ParmGenerator Class Reference

#include <VOP_ParmGenerator.h>

Inheritance diagram for VOP_ParmGenerator:

VOP_Node OP_Network OP_Node OP_Parameters OP_NetworkBoxItem PRM_ParmOwner VOP_ParameterBase VOP_Parameter

List of all members.

Public Member Functions

virtual void getCode (UT_String &codestr, VOP_CodeVarMapperContext *context=NULL)
virtual unsigned getNumVisibleInputs () const
virtual bool forceCodeGenerationOfInputs (VOP_ContextType type, bool essential) const
virtual const char * outputLabel (unsigned idx) const
virtual bool areOutputVariablesFixed (VOP_ContextType type)
virtual void getFixedOutputVariable (UT_String &var, int idx)
virtual bool getIsParmGenerator () const
 Returns true if this VOP is a VOP_ParmGenerator or subclass.
virtual bool getExportParm (VOP_ContextType context_type, UT_String &varname)
virtual void initializeNode ()
virtual VOP_NodegetRealDefinition ()
virtual void opChanged (OP_EventType reason, void *data=0)
virtual void getTypesForCodeGeneration (VOP_ContextTypeList &types) const
void getExportedShaderContextTypes (VOP_ContextTypeList &types) const
void recalculateParmDefiner (bool sendchangeevents)
void cacheParmName ()
const UT_StringgetParmNameCache () const
VOP_ParmGeneratorgetParmDefiner () const
void getParmChannels (UT_StringArray &channels)
virtual unsigned nInputs () const
virtual void PARMNAME (UT_String &str)=0
virtual void PARMLABEL (UT_String &str)=0
virtual int PARMTYPEINDEX ()=0
virtual bool isParmVisible () const =0
virtual void copySettingsFrom (VOP_ParmGenerator *pvop)
 Copy settings from a source parameter generator.
virtual void copyDefaultValuesFrom (const PI_EditScriptedParm *parm)
VOP_Type getParameterType (const VOP_Language *l=NULL)
 Get the type of the parameter (possibly filtered for a given language).
virtual bool evalIntegerValue (int &value)

Protected Member Functions

 VOP_ParmGenerator (OP_Network *parent, const char *name, OP_Operator *entry)
virtual ~VOP_ParmGenerator ()
virtual void postOpChanged (OP_EventType reason, void *data)
virtual void getInputNameSubclass (UT_String &in, int idx) const
virtual int getInputFromNameSubclass (const UT_String &in) const
virtual void getOutputNameSubclass (UT_String &out, int idx) const
virtual void getOutputTypeInfoSubclass (VOP_TypeInfo &type_info, int idx)
virtual void getParmDeclarationCode (UT_String &parm_decl, const VOP_Language *language=NULL, const VOP_CodeVarMapperContext *context=NULL, bool export_parms=false)
virtual bool USEASPARMDEFINER ()=0
virtual int UNIFORM ()=0
virtual int USEBOUND () const =0
virtual int EXPORTPARM () const =0
virtual void EXPORTSHADERCONTEXTS (VOP_ContextTypeList &types) const =0
virtual int PROVIDEMENU ()=0
virtual void MENUCHOICES (UT_String &str)=0
virtual bool needsInput (void)=0
virtual void getUnboundCode (UT_String &codestr)=0
virtual void handleParmNameChange (const UT_String &oldparmname, const UT_String &newparmname)
virtual bool getParmCanAffectParmName (int pidx) const =0
virtual void getNodeSpecificInfoText (OP_Context &context, OP_NodeInfoParms &iparms)
int useBound () const
int exportParm (bool check_connected=true) const
void exportShaderContexts (VOP_ContextTypeList &types) const
int getParmTypeIndex ()
int provideMenu ()
void menuChoices (UT_String &str)
void parmLabel (UT_String &str)
VOP_Type getUniformType (int pidx, bool conditioned=true, const VOP_Language *language=0)
void copyParameterValue (const VOP_ParmGenerator *src, const char *name, bool just_value=true)
virtual void preDelete ()


Detailed Description

Definition at line 28 of file VOP_ParmGenerator.h.


Constructor & Destructor Documentation

VOP_ParmGenerator::VOP_ParmGenerator ( OP_Network parent,
const char *  name,
OP_Operator entry 
) [protected]

virtual VOP_ParmGenerator::~VOP_ParmGenerator (  )  [protected, virtual]


Member Function Documentation

virtual bool VOP_ParmGenerator::areOutputVariablesFixed ( VOP_ContextType  context_type  )  [virtual]

Returns whether or not this op outputs variabls in a given context. If so, the second function returns the name of this output variable.

Reimplemented from VOP_Node.

void VOP_ParmGenerator::cacheParmName (  ) 

virtual void VOP_ParmGenerator::copyDefaultValuesFrom ( const PI_EditScriptedParm parm  )  [virtual]

Copy the default values from the given parameter and use them as the default values for this node's generated parameter.

Reimplemented in VOP_Parameter.

void VOP_ParmGenerator::copyParameterValue ( const VOP_ParmGenerator src,
const char *  name,
bool  just_value = true 
) [protected]

Copy a single parameter's value from the source parameter This is a convenience method for the copySettingsFrom() method

virtual void VOP_ParmGenerator::copySettingsFrom ( VOP_ParmGenerator pvop  )  [virtual]

Copy settings from a source parameter generator.

Reimplemented in VOP_Parameter.

virtual bool VOP_ParmGenerator::evalIntegerValue ( int &  value  )  [virtual]

Get the value of the parameter as an integer. This checks the owner (i.e. network) for a parameter, then will evaluate the parameter as an integer.

int VOP_ParmGenerator::exportParm ( bool  check_connected = true  )  const [protected]

virtual int VOP_ParmGenerator::EXPORTPARM (  )  const [protected, pure virtual]

Implemented in VOP_Parameter.

void VOP_ParmGenerator::exportShaderContexts ( VOP_ContextTypeList types  )  const [protected]

virtual void VOP_ParmGenerator::EXPORTSHADERCONTEXTS ( VOP_ContextTypeList types  )  const [protected, pure virtual]

Implemented in VOP_Parameter.

virtual bool VOP_ParmGenerator::forceCodeGenerationOfInputs ( VOP_ContextType  context_type,
bool  essential 
) const [virtual]

Determines if the code generation should collect code-generating nodes by recursively traversing the input nodes starting from this node. This returns true for nodes such as: output node, output variable, code node, print node, etc, and returns false for nodes such as global variables, add node, etc. The essential flag is used to urge the nodes to report true if they really think they are essential. This was introduced with multi-context vopnets because previously a wide range of nodes would report true (eg, a null, as context-specific subnets) which would then make way into incompatible contexts. The essential flag is meant to weed out all such nodes and only let through output and export variables nodes.

Reimplemented from VOP_Node.

virtual void VOP_ParmGenerator::getCode ( UT_String codestr,
VOP_CodeVarMapperContext context = NULL 
) [virtual]

Reimplemented from VOP_Node.

void VOP_ParmGenerator::getExportedShaderContextTypes ( VOP_ContextTypeList types  )  const

Obtains a list of shader context types in which the parameter is exported.

virtual bool VOP_ParmGenerator::getExportParm ( VOP_ContextType  context_type,
UT_String varname 
) [virtual]

Returns true when this VOP is a VOP_ParmGenerator and it's also an export parameter in a given context type.

Parameters:
context_type context type to which the query applies
varname outgoing parameter that will contain the export parameter name.

Reimplemented from VOP_Node.

virtual void VOP_ParmGenerator::getFixedOutputVariable ( UT_String var,
int  idx 
) [virtual]

Reimplemented from VOP_Node.

virtual int VOP_ParmGenerator::getInputFromNameSubclass ( const UT_String in  )  const [protected, virtual]

Reimplemented from VOP_Node.

virtual void VOP_ParmGenerator::getInputNameSubclass ( UT_String in,
int  idx 
) const [protected, virtual]

Returns the variable name associated with a given input number. Implementers of this function should also implement the reverse function.

Reimplemented from VOP_Node.

virtual bool VOP_ParmGenerator::getIsParmGenerator (  )  const [virtual]

Returns true if this VOP is a VOP_ParmGenerator or subclass.

Reimplemented from VOP_Node.

virtual void VOP_ParmGenerator::getNodeSpecificInfoText ( OP_Context context,
OP_NodeInfoParms iparms 
) [protected, virtual]

Reimplemented from VOP_Node.

virtual unsigned VOP_ParmGenerator::getNumVisibleInputs (  )  const [virtual]

Number of input connectors that should be visible on a node. This is only used by VOPs and DOPs. All other OPs return maxInputs() here.

Reimplemented from OP_Node.

virtual void VOP_ParmGenerator::getOutputNameSubclass ( UT_String out,
int  idx 
) const [protected, virtual]

Functions to get information about our operator outputs. These functions are used for variable name replacement and for creating output labels on the op tiles.

Reimplemented from VOP_Node.

virtual void VOP_ParmGenerator::getOutputTypeInfoSubclass ( VOP_TypeInfo type_info,
int  idx 
) [protected, virtual]

Reimplemented from VOP_Node.

VOP_Type VOP_ParmGenerator::getParameterType ( const VOP_Language l = NULL  ) 

Get the type of the parameter (possibly filtered for a given language).

virtual bool VOP_ParmGenerator::getParmCanAffectParmName ( int  pidx  )  const [protected, pure virtual]

Implemented in VOP_Parameter.

void VOP_ParmGenerator::getParmChannels ( UT_StringArray channels  ) 

virtual void VOP_ParmGenerator::getParmDeclarationCode ( UT_String parm_decl,
const VOP_Language language = NULL,
const VOP_CodeVarMapperContext context = NULL,
bool  export_parms = false 
) [protected, virtual]

Pass back the declaration code for the parameters defined by this VOP node.

Reimplemented in VOP_Parameter.

VOP_ParmGenerator* VOP_ParmGenerator::getParmDefiner (  )  const

const UT_String& VOP_ParmGenerator::getParmNameCache (  )  const

int VOP_ParmGenerator::getParmTypeIndex (  )  [protected]

virtual VOP_Node* VOP_ParmGenerator::getRealDefinition (  )  [virtual]

This virtual is overridden by VOP_ParmGenerator so we can find out which VOP defines the actual parameter attributes.

Reimplemented from VOP_Node.

virtual void VOP_ParmGenerator::getTypesForCodeGeneration ( VOP_ContextTypeList types  )  const [virtual]

Obtains a list of shader context types that this node is interested in supporting.

Reimplemented from VOP_Node.

virtual void VOP_ParmGenerator::getUnboundCode ( UT_String codestr  )  [protected, pure virtual]

Implemented in VOP_Parameter.

VOP_Type VOP_ParmGenerator::getUniformType ( int  pidx,
bool  conditioned = true,
const VOP_Language language = 0 
) [protected]

virtual void VOP_ParmGenerator::handleParmNameChange ( const UT_String oldparmname,
const UT_String newparmname 
) [protected, virtual]

Reimplemented in VOP_ParameterBase.

virtual void VOP_ParmGenerator::initializeNode (  )  [virtual]

Gives the node a chance to initialize itself when it is first created. This is only used for VOP_ParmGenerator nodes.

Reimplemented from VOP_Node.

Reimplemented in VOP_Parameter.

virtual bool VOP_ParmGenerator::isParmVisible (  )  const [pure virtual]

Return true if the promoted parameter is visible on the VOPNET creator node.

Implemented in VOP_Parameter.

void VOP_ParmGenerator::menuChoices ( UT_String str  )  [protected]

virtual void VOP_ParmGenerator::MENUCHOICES ( UT_String str  )  [protected, pure virtual]

Implemented in VOP_Parameter.

virtual bool VOP_ParmGenerator::needsInput ( void   )  [protected, pure virtual]

Implemented in VOP_Parameter.

virtual unsigned VOP_ParmGenerator::nInputs (  )  const [virtual]

Returns the index of the last connected input incremented by one. If there are no inputs connected, returns 0. This means that the function behaves as if the lasted connected input was always the last entry in the inputs array. Note that other array entries up to the index of the one returned may contain null entries, so this is not necessarily the same as the number of connections. Also note that there may be more null entries at indices beyond the returned one.

Reimplemented from OP_Node.

virtual void VOP_ParmGenerator::opChanged ( OP_EventType  reason,
void *  data = 0 
) [virtual]

Whenever a variable type parm changes, we have to send out an event to get our tile to update.

Reimplemented from VOP_Node.

virtual const char* VOP_ParmGenerator::outputLabel ( unsigned  idx  )  const [virtual]

Reimplemented from OP_Node.

void VOP_ParmGenerator::parmLabel ( UT_String str  )  [protected]

virtual void VOP_ParmGenerator::PARMLABEL ( UT_String str  )  [pure virtual]

Implemented in VOP_Parameter.

virtual void VOP_ParmGenerator::PARMNAME ( UT_String str  )  [pure virtual]

Implemented in VOP_Parameter.

virtual int VOP_ParmGenerator::PARMTYPEINDEX (  )  [pure virtual]

Implemented in VOP_Parameter.

virtual void VOP_ParmGenerator::postOpChanged ( OP_EventType  reason,
void *  data 
) [protected, virtual]

Reimplemented from VOP_Node.

virtual void VOP_ParmGenerator::preDelete (  )  [protected, virtual]

Overriden in VOPs to remove any channel refrences we may have to the node being deleted.

Reimplemented from OP_Node.

int VOP_ParmGenerator::provideMenu (  )  [protected]

virtual int VOP_ParmGenerator::PROVIDEMENU (  )  [protected, pure virtual]

Implemented in VOP_Parameter.

void VOP_ParmGenerator::recalculateParmDefiner ( bool  sendchangeevents  ) 

virtual int VOP_ParmGenerator::UNIFORM (  )  [protected, pure virtual]

Implemented in VOP_Parameter.

virtual bool VOP_ParmGenerator::USEASPARMDEFINER (  )  [protected, pure virtual]

Implemented in VOP_Parameter.

int VOP_ParmGenerator::useBound (  )  const [protected]

virtual int VOP_ParmGenerator::USEBOUND (  )  const [protected, pure virtual]

Implemented in VOP_Parameter.


The documentation for this class was generated from the following file:

Generated on Thu Jan 31 00:34:20 2013 for HDK by  doxygen 1.5.9