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

List of input or output values for a CVEX_Context. More...

#include <CVEX_ValueList.h>

Public Member Functions

 CVEX_ValueList ()
 
 ~CVEX_ValueList ()
 
int entries () const
 Returns the number of values in the list. More...
 
const CVEX_ValuegetValue (int i) const
 Get a value by index. More...
 
CVEX_ValuegetValue (int i)
 
const CVEX_ValuegetValue (const UT_StringRef &name, CVEX_Type type) const
 
CVEX_ValuegetValue (const UT_StringRef &name, CVEX_Type type)
 
const CVEX_ValuegetValue (const UT_StringRef &name) const
 Get a value by name. Returns NULL if there's no value by that name. More...
 
CVEX_ValuegetValue (const UT_StringRef &name)
 
bool addValue (const UT_StringHolder &name, CVEX_Type type, bool varying)
 
bool addValue (const UT_StringHolder &name, CVEX_Type type, void *data, int array_size, bool isconstant)
 
bool addValue (const UT_StringHolder &name, CVEX_StringArray &strings, bool isconstant)
 
const CVEX_Valueoperator[] (int i) const
 
CVEX_Valueoperator[] (int i)
 
CVEX_Valueoperator() (int i)
 
CVEX_Valueoperator() (const UT_StringRef &name, CVEX_Type type)
 

Friends

class CVEX_Context
 

Detailed Description

List of input or output values for a CVEX_Context.

This class maintains a list of the input and output parameters for a CVEX context.

Both input and output variables are associated with parameters on the VEX function being run. Output variables are those flagged with the export keyword.

Examples:
CVEX/cvexsample.C.

Definition at line 28 of file CVEX_ValueList.h.

Constructor & Destructor Documentation

CVEX_ValueList::CVEX_ValueList ( )
CVEX_ValueList::~CVEX_ValueList ( )

Member Function Documentation

bool CVEX_ValueList::addValue ( const UT_StringHolder name,
CVEX_Type  type,
bool  varying 
)

Add a value by name type and varying flag. This fails if:

bool CVEX_ValueList::addValue ( const UT_StringHolder name,
CVEX_Type  type,
void data,
int  array_size,
bool  isconstant 
)

Add a value by name, type and provide data.

Note
Users should call CVEX_Context::addInput()
bool CVEX_ValueList::addValue ( const UT_StringHolder name,
CVEX_StringArray strings,
bool  isconstant 
)

Add a string value (with data)

Note
Users should call CVEX_Context::addInput()
int CVEX_ValueList::entries ( ) const
inline

Returns the number of values in the list.

Examples:
CVEX/cvexsample.C.

Definition at line 35 of file CVEX_ValueList.h.

const CVEX_Value* CVEX_ValueList::getValue ( int  i) const
inline

Get a value by index.

Examples:
CVEX/cvexsample.C.

Definition at line 38 of file CVEX_ValueList.h.

CVEX_Value* CVEX_ValueList::getValue ( int  i)
inline

Definition at line 39 of file CVEX_ValueList.h.

const CVEX_Value* CVEX_ValueList::getValue ( const UT_StringRef name,
CVEX_Type  type 
) const

Get a value by name and type. Returns NULL if there's no value by that name and type.

CVEX_Value* CVEX_ValueList::getValue ( const UT_StringRef name,
CVEX_Type  type 
)
const CVEX_Value* CVEX_ValueList::getValue ( const UT_StringRef name) const
inline

Get a value by name. Returns NULL if there's no value by that name.

Definition at line 47 of file CVEX_ValueList.h.

CVEX_Value* CVEX_ValueList::getValue ( const UT_StringRef name)
inline

Definition at line 49 of file CVEX_ValueList.h.

CVEX_Value* CVEX_ValueList::operator() ( int  i)
inline

Convenience operators

Definition at line 76 of file CVEX_ValueList.h.

CVEX_Value* CVEX_ValueList::operator() ( const UT_StringRef name,
CVEX_Type  type 
)
inline

Convenience operators

Definition at line 77 of file CVEX_ValueList.h.

const CVEX_Value* CVEX_ValueList::operator[] ( int  i) const
inline

Convenience operators

Definition at line 73 of file CVEX_ValueList.h.

CVEX_Value* CVEX_ValueList::operator[] ( int  i)
inline

Convenience operators

Definition at line 74 of file CVEX_ValueList.h.

Friends And Related Function Documentation

friend class CVEX_Context
friend

Definition at line 92 of file CVEX_ValueList.h.


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