#include <stdlib.h>
using namespace HDK_Sample;
void
{
    
    
    
    
    
                          "HDK Switch",                 
                          0,                            
                          "*",                          
                          0,                            
                          1);                           
}
static const char       *theInputRoot = "input";
static PRM_Name          theSwitcherName(
"switcher", 
"Switcher Index");
 
static PRM_Name          theOutOfBoundsName(
"outofbounds",
 
                                            "Out Of Bounds Behavior");
static PRM_Name          theOutOfBoundsChoices[] = 
 
{
    PRM_Name(
"last", 
"Output Last Input Value"),
 
};
enum 
{
};
                                            theOutOfBoundsChoices);
{
}
{
                                &theOutOfBoundsMenu),
    
};
{
}
VOP_Switch::~VOP_Switch()
{
}
bool
{
    
    
    return changed;
}
void
{
    
    
    {
        
        
        
        
        
        {
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            {
                if( !first )
                    os << "else ";
                os << "if( $" << theSwitcherName.getToken();
                os << " == " << j << " )\n";
                os << "    ";
            }
            else if( !first )
            {
                os << "else\n" << "    ";
            }
            os << "$" << outputName << " = $" << inputName << ";\n";
            first = 0;
        }
        
        
        
        {
            if( !first )
                os << "else\n" << "    ";
            os << "$" << outputName << " = ";
            os << const_val.
buffer() << 
";\n";
        }
    }
}
const char *
{
    {
        
        theLabel = "Input Number ";
        theLabel += numstr;
        return theLabel;
    }
    else
        return theSwitcherName.getLabel();
}
const char *
{
    return "Chosen Value";
}
void
{
    {
        
        in = theInputRoot;
        in += numstr;
    }
    else
        in = theSwitcherName.getToken();
}
int
{
    int          inputnum = -1;
    
    if( in == theSwitcherName.getToken() )
        return 0;
    
    if( !strncmp(in, theInputRoot, strlen(theInputRoot)) )
        inputnum = ::atoi((const char *)in + strlen(theInputRoot));
}
void
{
    
    
        
        
        
    else
}
void     
{
    {
        
        
        {
            vop = CAST_VOPNODE(input->
getNode());
            if( vop )
            {
            }
        }
    }
    else
    {
    }
}
void
{
}
void
{
    
    
}
unsigned
{
    
    
    return max + 1;
}
unsigned
{
    
    
    return 1;
}
int
{
    return evalInt(theOutOfBoundsName, 0, 0.0
f);
 
}