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

#include <EXPR.h>

+ Inheritance diagram for EV_EXPRESSION:

Public Member Functions

 EV_EXPRESSION (EV_InlineFuncReturnType ret_type)
 
 ~EV_EXPRESSION ()
 
int64 getMemoryUsage (bool inclusive) const
 
bool changeExpr (const char *source)
 
void unresolveVars (int thread)
 
void dirtyExpr ()
 
EV_InlineFuncReturnType getInlineFuncRetType () const
 
void setInlineFuncRetType (EV_InlineFuncReturnType ret_type)
 
EXPR_Lock & getLock () const
 Return a reference for thread-safe access. More...
 
bool evaluate (int thread, fpreal &result)
 
bool evaluate (int thread, UT_StringHolder &result)
 
bool evaluate (int thread, ev_Vector &result)
 
bool evaluate (int thread, ev_Matrix &result)
 
EV_SYMBOL * evaluate (int thread)
 
EV_SYMBOL * evaluate (EV_InlineFuncReturnType func_ret_type, int thread)
 
void updateOpDependency (void *ref_id, int thread)
 
int changeOpReference (const char *new_fullpath, const char *old_fullpath, const char *old_cwd, const char *chan_name, const char *old_chan_name, int thread)
 
bool saveCompiledCode (std::ostream &os, int thread)
 
bool loadCompiledCode (UT_IStream &is, int thread)
 
unsigned int getFlags () const
 
bool hasFlag (unsigned int bit) const
 
bool isEvaluated () const
 
void clearAllFlags ()
 
void setFlags (unsigned int flags)
 
void appendFlags (unsigned int flag)
 
void setEvaluated ()
 
void clearFlagsBeforeEvaluation ()
 
unsigned int getFlagsUnsafe () const
 
bool hasFlagUnsafe (unsigned int bit) const
 
void clearAllFlagsUnsafe ()
 
void setFlagsUnsafe (unsigned int flags)
 
void appendFlagsUnsafe (unsigned int flag)
 
void setEvaluatedUnsafe ()
 
bool isEvaluatedUnsafe () const
 
void clearFlagsBeforeEvaluationUnsafe ()
 
const char * getSource () const
 
bool isCompiled () const
 
bool isPureCompiled () const
 
void * getSingleFunctionInstanceData (EV_FUNCTION *func, int thread, UT_String &argument)
 
bool isInExprFunc () const
 
void setInExprFunc (bool is_inside)
 

Additional Inherited Members

- Static Public Member Functions inherited from UT_SmallObject< EV_EXPRESSION, UT_SMALLOBJECT_CLEANPAGES_DEFAULT, UT_SMALLOBJECT_PAGESIZE_DEFAULT, UT_SMALLOBJECT_THREADSAFE_ON >
static void * operator new (size_t size)
 Regular new/delete operators. More...
 
static void operator delete (void *p, size_t size)
 Regular new/delete operators. More...
 
static void * operator new (size_t, void *p)
 
static void operator delete (void *, void *)
 

Detailed Description

Definition at line 337 of file EXPR.h.

Constructor & Destructor Documentation

EV_EXPRESSION::EV_EXPRESSION ( EV_InlineFuncReturnType  ret_type)
inline

Definition at line 344 of file EXPR.h.

EV_EXPRESSION::~EV_EXPRESSION ( )
inline

Definition at line 356 of file EXPR.h.

Member Function Documentation

void EV_EXPRESSION::appendFlags ( unsigned int  flag)
inline

Thread-Safe Flags Access

Definition at line 424 of file EXPR.h.

void EV_EXPRESSION::appendFlagsUnsafe ( unsigned int  flag)
inline

Non-Thread-Safe Flags Access. Writes need to be locked using getLock().

Definition at line 445 of file EXPR.h.

bool EV_EXPRESSION::changeExpr ( const char *  source)
int EV_EXPRESSION::changeOpReference ( const char *  new_fullpath,
const char *  old_fullpath,
const char *  old_cwd,
const char *  chan_name,
const char *  old_chan_name,
int  thread 
)

Dependencies

void EV_EXPRESSION::clearAllFlags ( )
inline

Thread-Safe Flags Access

Definition at line 418 of file EXPR.h.

void EV_EXPRESSION::clearAllFlagsUnsafe ( )
inline

Non-Thread-Safe Flags Access. Writes need to be locked using getLock().

Definition at line 441 of file EXPR.h.

void EV_EXPRESSION::clearFlagsBeforeEvaluation ( )
inline

Thread-Safe Flags Access

Definition at line 430 of file EXPR.h.

void EV_EXPRESSION::clearFlagsBeforeEvaluationUnsafe ( )
inline

This function is called before evaluating EXPR expressions and python expressions to clear the appropriate flags on the expression.

Definition at line 454 of file EXPR.h.

void EV_EXPRESSION::dirtyExpr ( )
bool EV_EXPRESSION::evaluate ( int  thread,
fpreal &  result 
)

Common evaluation functions. NOTES:

  • These functions will cast to the desired return type.
  • The thread parameter should be equivalent to SYSgetSTID()
bool EV_EXPRESSION::evaluate ( int  thread,
UT_StringHolder &  result 
)

Common evaluation functions. NOTES:

  • These functions will cast to the desired return type.
  • The thread parameter should be equivalent to SYSgetSTID()
bool EV_EXPRESSION::evaluate ( int  thread,
ev_Vector &  result 
)

Common evaluation functions. NOTES:

  • These functions will cast to the desired return type.
  • The thread parameter should be equivalent to SYSgetSTID()
bool EV_EXPRESSION::evaluate ( int  thread,
ev_Matrix &  result 
)

Common evaluation functions. NOTES:

  • These functions will cast to the desired return type.
  • The thread parameter should be equivalent to SYSgetSTID()
EV_SYMBOL* EV_EXPRESSION::evaluate ( int  thread)
inline

Raw evaluation function that does no casting.

Definition at line 376 of file EXPR.h.

EV_SYMBOL* EV_EXPRESSION::evaluate ( EV_InlineFuncReturnType  func_ret_type,
int  thread 
)

Raw evaluation function that does no casting.

unsigned int EV_EXPRESSION::getFlags ( ) const
inline

Thread-Safe Flags Access

Definition at line 404 of file EXPR.h.

unsigned int EV_EXPRESSION::getFlagsUnsafe ( ) const
inline

Non-Thread-Safe Flags Access. Writes need to be locked using getLock().

Definition at line 437 of file EXPR.h.

EV_InlineFuncReturnType EV_EXPRESSION::getInlineFuncRetType ( ) const
inline

Definition at line 483 of file EXPR.h.

EXPR_Lock& EV_EXPRESSION::getLock ( ) const
inline

Return a reference for thread-safe access.

Definition at line 489 of file EXPR.h.

int64 EV_EXPRESSION::getMemoryUsage ( bool  inclusive) const
void* EV_EXPRESSION::getSingleFunctionInstanceData ( EV_FUNCTION *  func,
int  thread,
UT_String &  argument 
)

getSingleFunctionInstanceData() returns the instance data for this expression's function which must be of form func("literal"). Returns NULL if this expression doesn't have the right form.

const char* EV_EXPRESSION::getSource ( ) const
inline

Other accesors

Definition at line 460 of file EXPR.h.

bool EV_EXPRESSION::hasFlag ( unsigned int  bit) const
inline

Thread-Safe Flags Access

Definition at line 413 of file EXPR.h.

bool EV_EXPRESSION::hasFlagUnsafe ( unsigned int  bit) const
inline

Non-Thread-Safe Flags Access. Writes need to be locked using getLock().

Definition at line 439 of file EXPR.h.

bool EV_EXPRESSION::isCompiled ( ) const
inline

Other accesors

Definition at line 462 of file EXPR.h.

bool EV_EXPRESSION::isEvaluated ( ) const
inline

Thread-Safe Flags Access

Definition at line 415 of file EXPR.h.

bool EV_EXPRESSION::isEvaluatedUnsafe ( ) const
inline

Non-Thread-Safe Flags Access. Writes need to be locked using getLock().

Definition at line 449 of file EXPR.h.

bool EV_EXPRESSION::isInExprFunc ( ) const
inline

isInExprFunc() says whether we are an expression inside a custom expr function. It is turned on in EX_ExprFunc.

Definition at line 476 of file EXPR.h.

bool EV_EXPRESSION::isPureCompiled ( ) const
inline

Other accesors

Definition at line 465 of file EXPR.h.

bool EV_EXPRESSION::loadCompiledCode ( UT_IStream &  is,
int  thread 
)

Save and load compiled expressions

bool EV_EXPRESSION::saveCompiledCode ( std::ostream &  os,
int  thread 
)

Save and load compiled expressions

void EV_EXPRESSION::setEvaluated ( )
inline

Thread-Safe Flags Access

Definition at line 427 of file EXPR.h.

void EV_EXPRESSION::setEvaluatedUnsafe ( )
inline

Non-Thread-Safe Flags Access. Writes need to be locked using getLock().

Definition at line 447 of file EXPR.h.

void EV_EXPRESSION::setFlags ( unsigned int  flags)
inline

Thread-Safe Flags Access

Definition at line 421 of file EXPR.h.

void EV_EXPRESSION::setFlagsUnsafe ( unsigned int  flags)
inline

Non-Thread-Safe Flags Access. Writes need to be locked using getLock().

Definition at line 443 of file EXPR.h.

void EV_EXPRESSION::setInExprFunc ( bool  is_inside)
inline

Other accesors

Definition at line 478 of file EXPR.h.

void EV_EXPRESSION::setInlineFuncRetType ( EV_InlineFuncReturnType  ret_type)
inline

Definition at line 485 of file EXPR.h.

void EV_EXPRESSION::unresolveVars ( int  thread)
void EV_EXPRESSION::updateOpDependency ( void *  ref_id,
int  thread 
)

Dependencies


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