EXPR/EXPR.h File Reference

#include "EXPR_API.h"
#include "EX_Error.h"
#include "EXPR_Lock.h"
#include <UT/UT_SmallObject.h>
#include <UT/UT_String.h>
#include <SYS/SYS_Types.h>

Go to the source code of this file.

Classes

union  EV_TOKENVALUE
 union used to hold a token's value More...
struct  EV_SYMBOL
 class representing a symbol operated upon by expressions More...
struct  EV_TYPEDEF
struct  EV_OPERATOR
 struct describing an operator's characteristics More...
class  EV_FUNCTION
struct  EV_ChangeOpReferenceParms
class  EV_EXPRESSION
struct  EV_SYMTABLE
struct  EV_FUNCHELP

Defines

#define EV_OPTIMIZE0   0
#define EV_OPTIMIZE1   1
#define MAX_RECURSION   20
#define EV_NHELPARGS   10
#define EX_USERFLAGMASK   (0x03ffffff | EV_EXFUNC_REF)
#define OP_PLUS   1
#define OP_MINUS   2
#define OP_TIMES   3
#define OP_DIVIDE   4
#define OP_POWER   5
#define OP_MOD   6
#define OP_NOT   7
#define OP_EQ   8
#define OP_NE   9
#define OP_LT   10
#define OP_LE   11
#define OP_GT   12
#define OP_GE   13
#define OP_LOGAND   14
#define OP_LOGOR   15
#define OP_COMMA   16
#define OP_QUESTION   20
#define OP_COLON   21
#define OP_AND   22
#define OP_OR   23
#define OP_DOT   24
#define OP_TILDE   25
#define OP_AT   26
#define OP_SBRACKET   30
#define OP_BRACE   31
#define OP_EQUATE   32
#define MAX_OPERATOR_TOKEN   32
#define EV_SYMTRANSIENT   0x04000000
 Symbol is result of operation.
#define EV_SYMCONSTANT   0x08000000
 Symbol has a constant value.
#define EV_FLAGS_SET   0x10000000
 User flags have been set.
#define EV_SYMEXPAND   0x20000000
 String should be expanded.
#define EV_EXFUNC_REF   0x40000000
 Refers to an expression function.
#define EV_FOR_EXFUNC   0x80000000
#define EV_TYPEFLOAT   0
 Float type of symbol.
#define EV_TYPESTRING   1
 String type of symbol.
#define EV_TYPEUNIXVAR   2
 Unix variable type.
#define EV_TYPEEXPANDVAR   4
 Variable of form ${foo$x}.
#define EV_TYPEVECTOR   5
 Vector.
#define EV_TYPEMATRIX   6
#define EV_TYPE_LOCAL_VAR   10
 A node local variable.
#define EV_TYPE_UNRESOLVED_VAR   11
 An unknown variable.
#define EV_TYPE_DEFINE   12
 A node local variable.
#define EV_TYPE_GLOBAL_VAR   20
 A global variable.
#define EV_TYPE_CPPSYMBOL   45
 A symbol inside a function.
#define EV_TYPE_UNRESOLVED_CPPSYMBOL   46
#define EV_START_FN(name)
#define EV_START_FNNA(name)
#define EV_START_FUNC(name)
#define EV_END_FN(answer)   result->value.fval = (answer)
#define EV_END_FNS(answer)   result->value.sval = (answer)

Typedefs

typedef char *(* ev_Expander )(const char *str, int thread)
typedef void(* EXPRopDependencyCallback )(EV_FUNCTION *me, EV_SYMBOL **argv, void *ref_id)
typedef void(* EXPRopChangeRefCallback )(EV_FUNCTION *me, EV_SYMBOL **argv, char *new_args[], const char *new_fullpath, const char *old_fullpath, const char *old_cwd, const char *chan_name, const char *old_chan_name)
typedef void(* EXPRfuncCallback )(EV_FUNCTION *me, EV_SYMBOL *result, EV_SYMBOL **argv, int thread, unsigned &func_flags)
typedef struct EV_TYPEDEF EV_TYPEDEF
typedef struct EV_OPERATOR EV_OPERATOR
typedef struct EV_FUNCHELP EV_FUNCHELP
typedef struct EV_SYMTABLE EV_SYMTABLE

Enumerations

enum  EV_InlineFuncReturnType {
  EV_EXPR_RETURN_NONE, EV_EXPR_RETURN_FLOAT, EV_EXPR_RETURN_STRING, EV_EXPR_RETURN_VECTOR,
  EV_EXPR_RETURN_MATRIX
}

Functions

EXPR_API void ev_InitFloat (void)
EXPR_API void ev_InitString (void)
 initialize string operations
EXPR_API void ev_InitVariable (void)
EXPR_API void ev_InitVector (void)
 initialize vector operations
EXPR_API void ev_InitMatrix (void)
 initialize matrix operations
EXPR_API void ev_InitUserFunc (void)
EXPR_API int ev_GetNFunctions ()
EXPR_API EV_FUNCTIONev_GetFunction (int i)
EXPR_API EV_TYPEDEFev_GetTypeDef (int key)
EXPR_API int ev_FindFunction (const char *name)
EXPR_API void ev_SetFunctionDependencyCallbacks (const char *func, EXPRopDependencyCallback depend_cb, EXPRopChangeRefCallback changeref_cb)
EXPR_API EV_EXPRESSIONev_AllocExpr (EV_InlineFuncReturnType rettype)
EXPR_API int ev_ChangeExpr (EV_EXPRESSION *expr, const char *source)
EXPR_API void ev_UnresolveVars (EV_EXPRESSION *expr, int thread)
EXPR_API fpreal ev_EvaluateFloat (EV_EXPRESSION *expr, int thread)
EXPR_API void ev_EvaluateString (UT_String &result, EV_EXPRESSION *expr, int thread)
EXPR_API int ev_EvaluateVector (EV_EXPRESSION *expr, ev_Vector &result, int thread)
EXPR_API int ev_EvaluateMatrix (EV_EXPRESSION *expr, ev_Matrix &result, int thread)
EXPR_API void ev_FreeExpr (EV_EXPRESSION *expr)
EXPR_API void ev_UpdateOpDependency (EV_EXPRESSION *expr, void *ref_id, int thread)
EXPR_API int ev_ChangeOpReference (EV_EXPRESSION *expr, const char *new_fullpath, const char *old_fullpath, const char *old_cwd, const char *chan_name, const char *old_chan_name, int thread)
EXPR_API EV_SYMBOLev_Evaluate (EV_EXPRESSION *expr, EV_InlineFuncReturnType func_ret_type, int thread)
EXPR_API void ev_SetExpander (ev_Expander expander)
EXPR_API EXPR_GlobalStaticLockev_GlobalEvalLock ()
template<typename LOCK_SCOPE , typename LOCK >
bool EXPRsafeEvalLock (LOCK_SCOPE &lock_scope, LOCK &lock)
EXPR_API void ev_AddType (EV_TYPEDEF *type)
EXPR_API void ev_AddVariableType (EV_TYPEDEF *type, int atEnd)
EXPR_API void ev_DeleteVariableType (EV_TYPEDEF *type)
EXPR_API void ev_AddOperator (EV_OPERATOR *op, int level)
EXPR_API void ev_AddFunction (EV_FUNCTION *func)
EXPR_API void ev_DeleteFunction (EV_FUNCTION *func)
EXPR_API void ev_SetOptimization (int level)
EXPR_API void ev_SetFunctionInstanceAllocator (const char *function, void *(*alloc)(), void(*free)(void *))
 Functions for supplying state data for custom expressions.
EXPR_API void * ev_GetFunctionData (int thread)
EXPR_API bool ev_SaveCompiledCode (EV_EXPRESSION *expr, ostream &os, int thread)
EXPR_API bool ev_LoadCompiledCode (EV_EXPRESSION *expr, UT_IStream &is, int thread)
EXPR_API EV_SYMBOLev_AllocSymbol (int type, int thread)
EXPR_API void ev_FreeSymbol (EV_SYMBOL *symbol, int thread)
EXPR_API void ev_setSafeMode (bool safe_mode)
EXPR_API bool ev_isInSafeMode ()
EXPR_API bool ev_isKeyword (const char *string)


Define Documentation

#define EV_END_FN ( answer   )     result->value.fval = (answer)

Handy macros for defining expression functions. They only differ by which function parameters are supplied to avoid unused parameter warnings.

Definition at line 223 of file EXPR.h.

#define EV_END_FNS ( answer   )     result->value.sval = (answer)

Handy macros for defining expression functions. They only differ by which function parameters are supplied to avoid unused parameter warnings.

Definition at line 225 of file EXPR.h.

#define EV_EXFUNC_REF   0x40000000

Refers to an expression function.

Definition at line 88 of file EXPR.h.

#define EV_FLAGS_SET   0x10000000

User flags have been set.

Definition at line 86 of file EXPR.h.

#define EV_FOR_EXFUNC   0x80000000

Symbol is to be used by expr func

Definition at line 89 of file EXPR.h.

#define EV_NHELPARGS   10

Definition at line 41 of file EXPR.h.

#define EV_OPTIMIZE0   0

Definition at line 36 of file EXPR.h.

#define EV_OPTIMIZE1   1

Definition at line 37 of file EXPR.h.

#define EV_START_FN ( name   ) 

Value:

static void name(EV_FUNCTION *, EV_SYMBOL *result,\
                             EV_SYMBOL **argv, int thread, unsigned &func_flags)
Handy macros for defining expression functions. They only differ by which function parameters are supplied to avoid unused parameter warnings.
Examples:
expr/functions.C.

Definition at line 214 of file EXPR.h.

#define EV_START_FNNA ( name   ) 

Value:

static void name(EV_FUNCTION *, EV_SYMBOL *result, \
                             EV_SYMBOL **, int thread, unsigned &func_flags)
Handy macros for defining expression functions. They only differ by which function parameters are supplied to avoid unused parameter warnings.
Examples:
expr/channel.C.

Definition at line 217 of file EXPR.h.

#define EV_START_FUNC ( name   ) 

Value:

static void name(EV_FUNCTION *func, EV_SYMBOL *result,\
                             EV_SYMBOL **argv, int thread, unsigned &func_flags)
Handy macros for defining expression functions. They only differ by which function parameters are supplied to avoid unused parameter warnings.

Definition at line 220 of file EXPR.h.

#define EV_SYMCONSTANT   0x08000000

Symbol has a constant value.

Definition at line 85 of file EXPR.h.

#define EV_SYMEXPAND   0x20000000

String should be expanded.

Definition at line 87 of file EXPR.h.

#define EV_SYMTRANSIENT   0x04000000

Symbol is result of operation.

These flags are common to symbols, operators and functions

NOTE: The high 8 bits of the flag are reserved for internal use User flags should start at not go higher than 0x800000

Note: when changing this definition, update EX_USERFLAGMASK

Definition at line 84 of file EXPR.h.

#define EV_TYPE_CPPSYMBOL   45

A symbol inside a function.

Definition at line 119 of file EXPR.h.

#define EV_TYPE_DEFINE   12

A node local variable.

These types are used in Houdini outside of EXPR. DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 117 of file EXPR.h.

#define EV_TYPE_GLOBAL_VAR   20

A global variable.

Definition at line 118 of file EXPR.h.

#define EV_TYPE_LOCAL_VAR   10

A node local variable.

These types are used in Houdini outside of EXPR. DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 115 of file EXPR.h.

#define EV_TYPE_UNRESOLVED_CPPSYMBOL   46

An unknown function symbol

Definition at line 120 of file EXPR.h.

#define EV_TYPE_UNRESOLVED_VAR   11

An unknown variable.

Definition at line 116 of file EXPR.h.

#define EV_TYPEEXPANDVAR   4

Variable of form ${foo$x}.

Definition at line 107 of file EXPR.h.

#define EV_TYPEFLOAT   0

Float type of symbol.

Implicit types known by expression language

  • The type identifiers must be positive unique integers
  • Eventhough Variables are handled as a special case, the type identifier for each variable type must be unique
  • It is suggested that applications start their typedefs identifiers 10 or greater. The identifiers do not have to be sequential.

DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 104 of file EXPR.h.

#define EV_TYPEMATRIX   6

Matrix

Definition at line 109 of file EXPR.h.

#define EV_TYPESTRING   1

String type of symbol.

Definition at line 105 of file EXPR.h.

#define EV_TYPEUNIXVAR   2

Unix variable type.

Definition at line 106 of file EXPR.h.

#define EV_TYPEVECTOR   5

Vector.

Definition at line 108 of file EXPR.h.

#define EX_USERFLAGMASK   (0x03ffffff | EV_EXFUNC_REF)

Definition at line 92 of file EXPR.h.

#define MAX_OPERATOR_TOKEN   32

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 74 of file EXPR.h.

#define MAX_RECURSION   20

Definition at line 39 of file EXPR.h.

#define OP_AND   22

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 66 of file EXPR.h.

#define OP_AT   26

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 70 of file EXPR.h.

#define OP_BRACE   31

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 72 of file EXPR.h.

#define OP_COLON   21

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 65 of file EXPR.h.

#define OP_COMMA   16

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 63 of file EXPR.h.

#define OP_DIVIDE   4

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 51 of file EXPR.h.

#define OP_DOT   24

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 68 of file EXPR.h.

#define OP_EQ   8

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 55 of file EXPR.h.

#define OP_EQUATE   32

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 73 of file EXPR.h.

#define OP_GE   13

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 60 of file EXPR.h.

#define OP_GT   12

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 59 of file EXPR.h.

#define OP_LE   11

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 58 of file EXPR.h.

#define OP_LOGAND   14

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 61 of file EXPR.h.

#define OP_LOGOR   15

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 62 of file EXPR.h.

#define OP_LT   10

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 57 of file EXPR.h.

#define OP_MINUS   2

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 49 of file EXPR.h.

#define OP_MOD   6

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 53 of file EXPR.h.

#define OP_NE   9

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 56 of file EXPR.h.

#define OP_NOT   7

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 54 of file EXPR.h.

#define OP_OR   23

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 67 of file EXPR.h.

#define OP_PLUS   1

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 48 of file EXPR.h.

#define OP_POWER   5

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 52 of file EXPR.h.

#define OP_QUESTION   20

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 64 of file EXPR.h.

#define OP_SBRACKET   30

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 71 of file EXPR.h.

#define OP_TILDE   25

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 69 of file EXPR.h.

#define OP_TIMES   3

Valid operator tokens - used by the operator typedef below DON'T CHANGE THESE VALUES - They are saved as ints for compiled expressions.

Definition at line 50 of file EXPR.h.


Typedef Documentation

typedef char*(* ev_Expander)(const char *str, int thread)

Definition at line 43 of file EXPR.h.

typedef struct EV_FUNCHELP EV_FUNCHELP

Definition at line 137 of file EXPR.h.

typedef struct EV_OPERATOR EV_OPERATOR

Definition at line 136 of file EXPR.h.

typedef struct EV_SYMTABLE EV_SYMTABLE

Following are the defines/typedefs for the language handler

Definition at line 586 of file EXPR.h.

typedef struct EV_TYPEDEF EV_TYPEDEF

Definition at line 135 of file EXPR.h.

typedef void(* EXPRfuncCallback)(EV_FUNCTION *me, EV_SYMBOL *result, EV_SYMBOL **argv, int thread, unsigned &func_flags)

Definition at line 229 of file EXPR.h.

typedef void(* EXPRopChangeRefCallback)(EV_FUNCTION *me, EV_SYMBOL **argv, char *new_args[], const char *new_fullpath, const char *old_fullpath, const char *old_cwd, const char *chan_name, const char *old_chan_name)

Definition at line 146 of file EXPR.h.

typedef void(* EXPRopDependencyCallback)(EV_FUNCTION *me, EV_SYMBOL **argv, void *ref_id)

This callback is used to scan for op dependencies and add/remove dependencies. Unlike evaluation, this callback can have null arguments. A null argument signifies a non-constant parameter to the function.

Definition at line 143 of file EXPR.h.


Enumeration Type Documentation

This is an enumeration of the type of return values that an inline function may be expected to return. Setting this value to EV_EXPR_RETURN_NONE will disallow an expression from supporting inline functions.

Enumerator:
EV_EXPR_RETURN_NONE 
EV_EXPR_RETURN_FLOAT 
EV_EXPR_RETURN_STRING 
EV_EXPR_RETURN_VECTOR 
EV_EXPR_RETURN_MATRIX 

Definition at line 312 of file EXPR.h.


Function Documentation

EXPR_API void ev_AddFunction ( EV_FUNCTION func  ) 

Functions for expansion of library Add operators, type definitions and functions.

Examples:
expr/channel.C, and expr/functions.C.

EXPR_API void ev_AddOperator ( EV_OPERATOR op,
int  level 
)

Functions for expansion of library Add operators, type definitions and functions.

EXPR_API void ev_AddType ( EV_TYPEDEF type  ) 

Functions for expansion of library Add operators, type definitions and functions.

EXPR_API void ev_AddVariableType ( EV_TYPEDEF type,
int  atEnd 
)

Functions for expansion of library Add operators, type definitions and functions.

EXPR_API EV_EXPRESSION* ev_AllocExpr ( EV_InlineFuncReturnType  rettype  ) 

EXPR_API EV_SYMBOL* ev_AllocSymbol ( int  type,
int  thread 
)

Functions used internally by type declarations

EXPR_API int ev_ChangeExpr ( EV_EXPRESSION expr,
const char *  source 
)

EXPR_API int ev_ChangeOpReference ( EV_EXPRESSION expr,
const char *  new_fullpath,
const char *  old_fullpath,
const char *  old_cwd,
const char *  chan_name,
const char *  old_chan_name,
int  thread 
)

EXPR_API void ev_DeleteFunction ( EV_FUNCTION func  ) 

Functions for expansion of library Add operators, type definitions and functions.

EXPR_API void ev_DeleteVariableType ( EV_TYPEDEF type  ) 

Functions for expansion of library Add operators, type definitions and functions.

EXPR_API EV_SYMBOL* ev_Evaluate ( EV_EXPRESSION expr,
EV_InlineFuncReturnType  func_ret_type,
int  thread 
)

EXPR_API fpreal ev_EvaluateFloat ( EV_EXPRESSION expr,
int  thread 
)

EXPR_API int ev_EvaluateMatrix ( EV_EXPRESSION expr,
ev_Matrix result,
int  thread 
)

EXPR_API void ev_EvaluateString ( UT_String result,
EV_EXPRESSION expr,
int  thread 
)

EXPR_API int ev_EvaluateVector ( EV_EXPRESSION expr,
ev_Vector result,
int  thread 
)

EXPR_API int ev_FindFunction ( const char *  name  ) 

EXPR_API void ev_FreeExpr ( EV_EXPRESSION expr  ) 

EXPR_API void ev_FreeSymbol ( EV_SYMBOL symbol,
int  thread 
)

Functions used internally by type declarations

EXPR_API EV_FUNCTION* ev_GetFunction ( int  i  ) 

EXPR_API void* ev_GetFunctionData ( int  thread  ) 

From within an expression function, use this to retrieve the data created by the alloc function specified in ev_SetFunctionInstanceAllocator().

Parameters:
thread Thread id supplied to the expression function callback

EXPR_API int ev_GetNFunctions (  ) 

EXPR_API EV_TYPEDEF* ev_GetTypeDef ( int  key  ) 

EXPR_API EXPR_GlobalStaticLock& ev_GlobalEvalLock (  ) 

The global evaluation lock is a global mutex for protecting any non-threadsafe evaluation (both expressions and node) code. This is necessary to guard against code that might access global objects.

EXPR_API void ev_InitFloat ( void   ) 

initialize floating point operations Float initialization will automatically initialize vector/matrix

EXPR_API void ev_InitMatrix ( void   ) 

initialize matrix operations

EXPR_API void ev_InitString ( void   ) 

initialize string operations

EXPR_API void ev_InitUserFunc ( void   ) 

EXPR_API void ev_InitVariable ( void   ) 

EXPR_API void ev_InitVector ( void   ) 

initialize vector operations

EXPR_API bool ev_isInSafeMode (  ) 

These functions put the expression evaluator into/out of "safe" mode. In safe mode, certain functions will not be executed.

EXPR_API bool ev_isKeyword ( const char *  string  ) 

These functions put the expression evaluator into/out of "safe" mode. In safe mode, certain functions will not be executed.

EXPR_API bool ev_LoadCompiledCode ( EV_EXPRESSION expr,
UT_IStream is,
int  thread 
)

These functions save and load compiled expressions.

EXPR_API bool ev_SaveCompiledCode ( EV_EXPRESSION expr,
ostream &  os,
int  thread 
)

These functions save and load compiled expressions.

EXPR_API void ev_SetExpander ( ev_Expander  expander  ) 

EXPR_API void ev_SetFunctionDependencyCallbacks ( const char *  func,
EXPRopDependencyCallback  depend_cb,
EXPRopChangeRefCallback  changeref_cb 
)

Examples:
expr/functions.C.

EXPR_API void ev_SetFunctionInstanceAllocator ( const char *  function,
void *(*)()  alloc,
void(*)(void *)  free 
)

Functions for supplying state data for custom expressions.

This function specifies the constructor/destructor functions for the state data.

Parameters:
function Name of the custom expression function
alloc This allocates and initializes the state data
free This deallocates the state data

EXPR_API void ev_SetOptimization ( int  level  ) 

Functions for expansion of library Add operators, type definitions and functions.

EXPR_API void ev_setSafeMode ( bool  safe_mode  ) 

These functions put the expression evaluator into/out of "safe" mode. In safe mode, certain functions will not be executed.

EXPR_API void ev_UnresolveVars ( EV_EXPRESSION expr,
int  thread 
)

EXPR_API void ev_UpdateOpDependency ( EV_EXPRESSION expr,
void *  ref_id,
int  thread 
)

template<typename LOCK_SCOPE , typename LOCK >
bool EXPRsafeEvalLock ( LOCK_SCOPE &  lock_scope,
LOCK &  lock 
) [inline]

If you have a local lock section that also tries to obtain the global eval lock, then deadlock's might occur. Therefore for all such locks, you should use this template function to detect such situations. If it returns false, then a potential deadlock was found.

Definition at line 624 of file EXPR.h.


Generated on Thu Jan 31 00:28:53 2013 for HDK by  doxygen 1.5.9