HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HUSD_CvexCode Class Reference

#include <HUSD_CvexCode.h>

Public Types

enum  ReturnType { ReturnType::NONE, ReturnType::BOOLEAN, ReturnType::STRING }
 

Public Member Functions

 HUSD_CvexCode (const UT_StringRef &cmd_or_vexpr, bool is_cmd=true)
 Creates the cvex code object given the string and its meaning. More...
 
const UT_StringHoldergetSource () const
 Returns the source string (either a command or vexpression). More...
 
bool isCommand () const
 Returns true if the source is a command, or false if it's a vexpression. More...
 
void setReturnType (ReturnType type)
 
ReturnType getReturnType () const
 
void setExportsPattern (const UT_StringRef &pattern)
 Sets the export variables (useful for Vexpressions) More...
 
const UT_StringHoldergetExportsPattern () const
 Sets the export variables (useful for Vexpressions) More...
 

Detailed Description

Abstracts the CVEX source code (either command or vexpression), along with some aspects of it, such as return type and export parameter mask for expressions.

Definition at line 27 of file HUSD_CvexCode.h.

Member Enumeration Documentation

Enumerator
NONE 
BOOLEAN 
STRING 

Definition at line 42 of file HUSD_CvexCode.h.

Constructor & Destructor Documentation

HUSD_CvexCode::HUSD_CvexCode ( const UT_StringRef cmd_or_vexpr,
bool  is_cmd = true 
)

Creates the cvex code object given the string and its meaning.

Member Function Documentation

const UT_StringHolder& HUSD_CvexCode::getExportsPattern ( ) const
inline

Sets the export variables (useful for Vexpressions)

Definition at line 64 of file HUSD_CvexCode.h.

ReturnType HUSD_CvexCode::getReturnType ( ) const
inline

Sets the return type for the code. Cvex scripts that select (match) primitives or faces return a boolean. Cvex scripts that partition with keyword, usually return a string. Cvex scripts that partition with all outupt values, or run on all attributes (ie, are not used for selection or partitionin), usually return void (which is a default value).

Definition at line 57 of file HUSD_CvexCode.h.

const UT_StringHolder& HUSD_CvexCode::getSource ( ) const
inline

Returns the source string (either a command or vexpression).

Definition at line 34 of file HUSD_CvexCode.h.

bool HUSD_CvexCode::isCommand ( ) const
inline

Returns true if the source is a command, or false if it's a vexpression.

Definition at line 38 of file HUSD_CvexCode.h.

void HUSD_CvexCode::setExportsPattern ( const UT_StringRef pattern)
inline

Sets the export variables (useful for Vexpressions)

Definition at line 62 of file HUSD_CvexCode.h.

void HUSD_CvexCode::setReturnType ( ReturnType  type)
inline

Sets the return type for the code. Cvex scripts that select (match) primitives or faces return a boolean. Cvex scripts that partition with keyword, usually return a string. Cvex scripts that partition with all outupt values, or run on all attributes (ie, are not used for selection or partitionin), usually return void (which is a default value).

Definition at line 55 of file HUSD_CvexCode.h.


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