HDK_Sample::VOP_Switch Class Reference

C++ VOP node to select one of its inputs and feed it into the output. More...

#include <VOP_Switch.h>

Inheritance diagram for HDK_Sample::VOP_Switch:

VOP_Node OP_Network OP_Node OP_Parameters OP_NetworkBoxItem PRM_ParmOwner

List of all members.

Public Member Functions

virtual unsigned disableParms ()
 Disable our parameters based on which inputs are connected.
virtual void getCode (UT_String &codestr, VOP_CodeVarMapperContext *context=NULL)
 Generate the code for this operator.
virtual const char * inputLabel (unsigned idx) const
 Provides the labels to appear on input and output buttons.
virtual const char * outputLabel (unsigned idx) const
virtual unsigned getNumVisibleInputs () const
 Controls the number of input buttons visible on the node tile.
virtual unsigned orderedInputs () const

Static Public Member Functions

static OP_NodemyConstructor (OP_Network *net, const char *name, OP_Operator *entry)
 Creates an instance of this node with the given name in the given network.

Static Public Attributes

static PRM_Template myTemplateList []
 Our parameter templates.

Protected Member Functions

 VOP_Switch (OP_Network *net, const char *name, OP_Operator *entry)
virtual ~VOP_Switch ()
virtual void getInputNameSubclass (UT_String &in, int idx) const
virtual int getInputFromNameSubclass (const UT_String &in) const
 Reverse mapping of internal input names to an input index.
virtual VOP_Type getInputTypeSubclass (int idx)
 Returns the data type that must be connected to the supplied input.
virtual void getOutputNameSubclass (UT_String &out, int idx) const
virtual VOP_Type getOutputTypeSubclass (int idx)
 Returns the data type of each output connector.
void getAllowedInputTypesSubclass (unsigned idx, VOP_VopTypeArray &voptypes)
int OUTOFBOUNDS ()


Detailed Description

C++ VOP node to select one of its inputs and feed it into the output.

Definition at line 38 of file VOP_Switch.h.


Constructor & Destructor Documentation

VOP_Switch::VOP_Switch ( OP_Network net,
const char *  name,
OP_Operator entry 
) [protected]

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 95 of file VOP_Switch.C.

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

Examples:
VOP/VOP_Switch.h.

Definition at line 100 of file VOP_Switch.C.


Member Function Documentation

unsigned VOP_Switch::disableParms ( void   )  [virtual]

Disable our parameters based on which inputs are connected.

Reimplemented from OP_Parameters.

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 105 of file VOP_Switch.C.

void VOP_Switch::getAllowedInputTypesSubclass ( unsigned  idx,
VOP_VopTypeArray voptypes 
) [protected, virtual]

This methods should be overriden in most VOP nodes. It should fill in voptypes vector with vop types that are allowed to be connected to this node at the input at index idx. Note that unlike getInputTypeSubclass(), this method should return valid vop types even when nothing is connected to the corresponding input.

Reimplemented from VOP_Node.

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 270 of file VOP_Switch.C.

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

Generate the code for this operator.

Reimplemented from VOP_Node.

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 117 of file VOP_Switch.C.

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

Reverse mapping of internal input names to an input index.

Reimplemented from VOP_Node.

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 230 of file VOP_Switch.C.

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

Returns the internal name of the supplied input. This input name is used when the code generator substitutes variables return by getCode.

Reimplemented from VOP_Node.

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 214 of file VOP_Switch.C.

VOP_Type VOP_Switch::getInputTypeSubclass ( int  idx  )  [protected, virtual]

Returns the data type that must be connected to the supplied input.

Reimplemented from VOP_Node.

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 246 of file VOP_Switch.C.

unsigned VOP_Switch::getNumVisibleInputs (  )  const [virtual]

Controls the number of input buttons visible on the node tile.

Reimplemented from OP_Node.

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 309 of file VOP_Switch.C.

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

Returns the internal name of the supplied output. This name is used when the code generator substitutes variables return by getCode.

Reimplemented from VOP_Node.

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 291 of file VOP_Switch.C.

VOP_Type VOP_Switch::getOutputTypeSubclass ( int  idx  )  [protected, virtual]

Returns the data type of each output connector.

Reimplemented from VOP_Node.

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 299 of file VOP_Switch.C.

const char * VOP_Switch::inputLabel ( unsigned  idx  )  const [virtual]

Provides the labels to appear on input and output buttons.

Reimplemented from OP_Node.

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 187 of file VOP_Switch.C.

OP_Node * VOP_Switch::myConstructor ( OP_Network net,
const char *  name,
OP_Operator entry 
) [static]

Creates an instance of this node with the given name in the given network.

Examples:
VOP/VOP_Switch.h.

Definition at line 81 of file VOP_Switch.C.

unsigned VOP_Switch::orderedInputs (  )  const [virtual]

Returns the index of the first "unordered" input, meaning that inputs before this one should not be collapsed when they are disconnected.

Reimplemented from OP_Node.

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 322 of file VOP_Switch.C.

int VOP_Switch::OUTOFBOUNDS (  )  [protected]

Accesses the parameter that controls how out of bounds switch indices are handled.

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 330 of file VOP_Switch.C.

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

Reimplemented from OP_Node.

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 206 of file VOP_Switch.C.


Member Data Documentation

Initial value:

 
{
    PRM_Template(PRM_INT,       1, &theSwitcherName, PRMzeroDefaults),
    PRM_Template(PRM_ORD,       1, &theOutOfBoundsName, PRMzeroDefaults,
                                &theOutOfBoundsMenu),
    
    PRM_Template()      
}
Our parameter templates.

Examples:
VOP/VOP_Switch.C, and VOP/VOP_Switch.h.

Definition at line 47 of file VOP_Switch.h.


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

Generated on Mon Jan 28 00:49:28 2013 for HDK by  doxygen 1.5.9