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

#include <SOP_NodeVerb.h>

Public Member Functions

 CookParms (GU_DetailHandle &destgdh, const UT_Array< GU_ConstDetailHandle > &inputs, SOP_CookEngine cookengine, OP_Node *node, const OP_Context &context, const SOP_NodeParms *parms, SOP_NodeCache *cache, UT_ErrorManager *error, DEP_MicroNode *depnode)
 
virtual ~CookParms ()
 
GU_DetailHandlegdh () const
 The initial state of gdh depends on the cookMode() More...
 
SOP_NodegetNode () const
 
template<typename T >
TgetCookNode () const
 
SOP_NodegetSrcNode () const
 The node that generated this verb, if any... More...
 
OP_NodegetCwd () const
 The getCwd() should be used to evaluate relative paths. More...
 
const OP_ContextgetContext () const
 
fpreal getCookTime () const
 
bool getManagesDataIDs () const
 
exint nInputs () const
 
bool hasInput (exint idx) const
 
const GU_DetailinputGeo (exint idx) const
 
GU_ConstDetailHandle inputGeoHandle (exint idx) const
 
template<typename T >
const Tparms () const
 
SOP_NodeCachecache () const
 
UT_ErrorManagererror () const
 
DEP_MicroNodedepnode () const
 
void addExplicitInput (DEP_MicroNode &inp, bool check_dup=true) const
 Methods to wire directly to the optional depnode. More...
 
UT_ErrorSeverity addMessage (const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0) const
 Methods to add directly to any present error manager. More...
 
UT_ErrorSeverity addWarning (const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0) const
 
UT_ErrorSeverity addError (const char *type, int code, const char *msg=0, const UT_SourceLocation *loc=0) const
 
UT_ErrorSeverity sopAddMessage (int code, const char *msg=0, const UT_SourceLocation *loc=0) const
 
UT_ErrorSeverity sopAddWarning (int code, const char *msg=0, const UT_SourceLocation *loc=0) const
 
UT_ErrorSeverity sopAddError (int code, const char *msg=0, const UT_SourceLocation *loc=0) const
 
void addTransformError (const OP_Node &node, const char *label=0) const
 
void stealErrors (UT_ErrorManager &src, bool borrow_only=false) const
 
void select (GA_GroupType gtype=GA_GROUP_PRIMITIVE) const
 
void select (GU_SelectionHandle selection, bool add_to_sel=false) const
 
void select (const GA_Group &group, bool use_gtype=true, bool add_to_sel=false) const
 
void select (const GEO_Primitive &prim, bool sel_prim=true, bool add_to_sel=false) const
 
void selectPrimitive (GA_Offset primoff, bool prim_sel=true, bool add_to_sel=false) const
 
void selectPoint (GA_Offset ptoff, bool point_sel=true, bool add_to_sel=false) const
 
void selectFrom (const GEO_Primitive &prim, bool sel_prim=true, bool add_to_sel=false) const
 
void selectPointsFrom (GA_Offset ptoff, bool point_sel=true, bool add_to_sel=false) const
 
void select (const GA_Range &range, bool use_rtype=true, bool add_to_sel=false) const
 
void selectInputGroup (const GA_Group *group, GA_GroupType grouptype) const
 
void clearSelection () const
 
void clearSelection (GA_GroupType gtype) const
 
bool destroySelection () const
 
bool selectionEnabled () const
 
bool setupLocalVars () const
 Shims for local variables. More...
 
void resetLocalVarRefs () const
 
void setCurGdh (int index, const GU_DetailHandle &gdh) const
 
void clearCurGdh (int index) const
 
void setCurPoint (int index, GA_Offset off) const
 
void clearCurPoint (int index) const
 
void setCurVertex (int index, GA_Offset off) const
 
void clearCurVertex (int index) const
 
void setCurPrim (int index, GA_Offset off) const
 
void clearCurPrim (int index) const
 
void setCurVertexNum (int index, exint num) const
 
void clearCurVertexNum (int index) const
 
void setVariableOrder (int detail, int prim, int pt, int vtx) const
 
void resetLocalVariableAccessed () const
 Tracks if any local variables were accessed by op functions. More...
 
bool wasLocalVariableAccessed () const
 

Protected Member Functions

UT_StringHolder formatError (const char *msg) const
 Prefix errors so we can get sensible results. More...
 
UT_LockedRawPtr
< UT_ErrorManager, OP_Lock
getLockedErrorManager () const
 

Protected Attributes

bool myCookEngine
 
GU_DetailHandlemyDestGdh
 
const UT_Array
< GU_ConstDetailHandle > & 
myInputs
 
SOP_NodemyNode
 
const OP_ContextmyContext
 
const SOP_NodeParmsmyParms
 
SOP_NodeCachemyCache
 
UT_ErrorManagermyError
 
DEP_MicroNodemyDepNode
 
UT_Lock myErrorLock
 

Detailed Description

Definition at line 609 of file SOP_NodeVerb.h.

Constructor & Destructor Documentation

SOP_NodeVerb::CookParms::CookParms ( GU_DetailHandle destgdh,
const UT_Array< GU_ConstDetailHandle > &  inputs,
SOP_CookEngine  cookengine,
OP_Node node,
const OP_Context context,
const SOP_NodeParms parms,
SOP_NodeCache cache,
UT_ErrorManager error,
DEP_MicroNode depnode 
)
inline

Definition at line 612 of file SOP_NodeVerb.h.

virtual SOP_NodeVerb::CookParms::~CookParms ( )
inlinevirtual

Definition at line 631 of file SOP_NodeVerb.h.

Member Function Documentation

UT_ErrorSeverity SOP_NodeVerb::CookParms::addError ( const char *  type,
int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
) const
inline

Definition at line 715 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::addExplicitInput ( DEP_MicroNode inp,
bool  check_dup = true 
) const
inline

Methods to wire directly to the optional depnode.

Definition at line 703 of file SOP_NodeVerb.h.

UT_ErrorSeverity SOP_NodeVerb::CookParms::addMessage ( const char *  type,
int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
) const
inline

Methods to add directly to any present error manager.

Definition at line 707 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::addTransformError ( const OP_Node node,
const char *  label = 0 
) const
inline

Definition at line 730 of file SOP_NodeVerb.h.

UT_ErrorSeverity SOP_NodeVerb::CookParms::addWarning ( const char *  type,
int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
) const
inline

Definition at line 711 of file SOP_NodeVerb.h.

SOP_NodeCache* SOP_NodeVerb::CookParms::cache ( ) const
inline

Cache may, or may not, persist between cooks. But it is guaranteed this is the only thread using the cache.

Definition at line 695 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::clearCurGdh ( int  index) const
inline

Definition at line 830 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::clearCurPoint ( int  index) const
inline

Definition at line 834 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::clearCurPrim ( int  index) const
inline

Definition at line 842 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::clearCurVertex ( int  index) const
inline

Definition at line 838 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::clearCurVertexNum ( int  index) const
inline

Definition at line 846 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::clearSelection ( ) const
inline

Definition at line 795 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::clearSelection ( GA_GroupType  gtype) const
inline

If the cook selection group is not of the given type, create an empty cook selection group of that type. Otherwise, clear the existing cook selection group.

Definition at line 802 of file SOP_NodeVerb.h.

DEP_MicroNode* SOP_NodeVerb::CookParms::depnode ( ) const
inline

Definition at line 700 of file SOP_NodeVerb.h.

bool SOP_NodeVerb::CookParms::destroySelection ( ) const
inline

Definition at line 809 of file SOP_NodeVerb.h.

UT_ErrorManager* SOP_NodeVerb::CookParms::error ( ) const
inline

Error managers are not locked, so do not pass this to something that forks.

Definition at line 699 of file SOP_NodeVerb.h.

UT_StringHolder SOP_NodeVerb::CookParms::formatError ( const char *  msg) const
inlineprotected

Prefix errors so we can get sensible results.

Definition at line 862 of file SOP_NodeVerb.h.

GU_DetailHandle& SOP_NodeVerb::CookParms::gdh ( ) const
inline

The initial state of gdh depends on the cookMode()

Definition at line 634 of file SOP_NodeVerb.h.

const OP_Context& SOP_NodeVerb::CookParms::getContext ( ) const
inline

Definition at line 652 of file SOP_NodeVerb.h.

template<typename T >
T* SOP_NodeVerb::CookParms::getCookNode ( ) const
inline

Definition at line 643 of file SOP_NodeVerb.h.

fpreal SOP_NodeVerb::CookParms::getCookTime ( ) const
inline

Definition at line 654 of file SOP_NodeVerb.h.

OP_Node* SOP_NodeVerb::CookParms::getCwd ( ) const
inline

The getCwd() should be used to evaluate relative paths.

Definition at line 651 of file SOP_NodeVerb.h.

UT_LockedRawPtr<UT_ErrorManager,OP_Lock> SOP_NodeVerb::CookParms::getLockedErrorManager ( ) const
inlineprotected

Definition at line 884 of file SOP_NodeVerb.h.

bool SOP_NodeVerb::CookParms::getManagesDataIDs ( ) const
inline

Whether the underlying verb manages data ids. All new nodes should manage data ids, this is purely for the SOP_NodeParmsOptions wrapper.

Definition at line 660 of file SOP_NodeVerb.h.

SOP_Node* SOP_NodeVerb::CookParms::getNode ( ) const
inline

The currently cooking SOP. This is only non-null if in the old cook path. When executing compiled nodes it will be null as the verb is supposed to operate independently of the original SOP.

Definition at line 640 of file SOP_NodeVerb.h.

SOP_Node* SOP_NodeVerb::CookParms::getSrcNode ( ) const
inline

The node that generated this verb, if any...

Definition at line 649 of file SOP_NodeVerb.h.

bool SOP_NodeVerb::CookParms::hasInput ( exint  idx) const
inline

Definition at line 672 of file SOP_NodeVerb.h.

const GU_Detail* SOP_NodeVerb::CookParms::inputGeo ( exint  idx) const
inline

Definition at line 678 of file SOP_NodeVerb.h.

GU_ConstDetailHandle SOP_NodeVerb::CookParms::inputGeoHandle ( exint  idx) const
inline

Definition at line 683 of file SOP_NodeVerb.h.

exint SOP_NodeVerb::CookParms::nInputs ( ) const
inline

Accessors designed to simplify porting from old cook code. Just becaues you have nInputs does not mean all are wired or cooked. But, the number demanded by your OP_Operator shall be present. Inputs have been locked & preserve request set

Definition at line 671 of file SOP_NodeVerb.h.

template<typename T >
const T& SOP_NodeVerb::CookParms::parms ( ) const
inline

Definition at line 690 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::resetLocalVariableAccessed ( ) const
inline

Tracks if any local variables were accessed by op functions.

Definition at line 853 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::resetLocalVarRefs ( ) const
inline

Definition at line 826 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::select ( GA_GroupType  gtype = GA_GROUP_PRIMITIVE) const
inline

Definition at line 745 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::select ( GU_SelectionHandle  selection,
bool  add_to_sel = false 
) const
inline

Definition at line 749 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::select ( const GA_Group group,
bool  use_gtype = true,
bool  add_to_sel = false 
) const
inline

Definition at line 755 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::select ( const GEO_Primitive prim,
bool  sel_prim = true,
bool  add_to_sel = false 
) const
inline

Definition at line 760 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::select ( const GA_Range range,
bool  use_rtype = true,
bool  add_to_sel = false 
) const
inline

Definition at line 780 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::selectFrom ( const GEO_Primitive prim,
bool  sel_prim = true,
bool  add_to_sel = false 
) const
inline

Definition at line 772 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::selectInputGroup ( const GA_Group group,
GA_GroupType  grouptype 
) const
inline

Definition at line 788 of file SOP_NodeVerb.h.

bool SOP_NodeVerb::CookParms::selectionEnabled ( ) const
inline

Definition at line 816 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::selectPoint ( GA_Offset  ptoff,
bool  point_sel = true,
bool  add_to_sel = false 
) const
inline

Definition at line 768 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::selectPointsFrom ( GA_Offset  ptoff,
bool  point_sel = true,
bool  add_to_sel = false 
) const
inline

Definition at line 776 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::selectPrimitive ( GA_Offset  primoff,
bool  prim_sel = true,
bool  add_to_sel = false 
) const
inline

Definition at line 764 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::setCurGdh ( int  index,
const GU_DetailHandle gdh 
) const
inline

Definition at line 828 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::setCurPoint ( int  index,
GA_Offset  off 
) const
inline

Definition at line 832 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::setCurPrim ( int  index,
GA_Offset  off 
) const
inline

Definition at line 840 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::setCurVertex ( int  index,
GA_Offset  off 
) const
inline

Definition at line 836 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::setCurVertexNum ( int  index,
exint  num 
) const
inline

Definition at line 844 of file SOP_NodeVerb.h.

bool SOP_NodeVerb::CookParms::setupLocalVars ( ) const
inline

Shims for local variables.

Definition at line 824 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::setVariableOrder ( int  detail,
int  prim,
int  pt,
int  vtx 
) const
inline

Definition at line 848 of file SOP_NodeVerb.h.

UT_ErrorSeverity SOP_NodeVerb::CookParms::sopAddError ( int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
) const
inline

Definition at line 726 of file SOP_NodeVerb.h.

UT_ErrorSeverity SOP_NodeVerb::CookParms::sopAddMessage ( int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
) const
inline

Definition at line 720 of file SOP_NodeVerb.h.

UT_ErrorSeverity SOP_NodeVerb::CookParms::sopAddWarning ( int  code,
const char *  msg = 0,
const UT_SourceLocation loc = 0 
) const
inline

Definition at line 723 of file SOP_NodeVerb.h.

void SOP_NodeVerb::CookParms::stealErrors ( UT_ErrorManager src,
bool  borrow_only = false 
) const
inline

Definition at line 741 of file SOP_NodeVerb.h.

bool SOP_NodeVerb::CookParms::wasLocalVariableAccessed ( ) const
inline

Definition at line 855 of file SOP_NodeVerb.h.

Member Data Documentation

SOP_NodeCache* SOP_NodeVerb::CookParms::myCache
protected

Definition at line 896 of file SOP_NodeVerb.h.

const OP_Context& SOP_NodeVerb::CookParms::myContext
protected

Definition at line 894 of file SOP_NodeVerb.h.

bool SOP_NodeVerb::CookParms::myCookEngine
protected

Definition at line 890 of file SOP_NodeVerb.h.

DEP_MicroNode* SOP_NodeVerb::CookParms::myDepNode
protected

Definition at line 898 of file SOP_NodeVerb.h.

GU_DetailHandle& SOP_NodeVerb::CookParms::myDestGdh
protected

Definition at line 891 of file SOP_NodeVerb.h.

UT_ErrorManager* SOP_NodeVerb::CookParms::myError
protected

Definition at line 897 of file SOP_NodeVerb.h.

UT_Lock SOP_NodeVerb::CookParms::myErrorLock
mutableprotected

Definition at line 899 of file SOP_NodeVerb.h.

const UT_Array<GU_ConstDetailHandle>& SOP_NodeVerb::CookParms::myInputs
protected

Definition at line 892 of file SOP_NodeVerb.h.

SOP_Node* SOP_NodeVerb::CookParms::myNode
protected

Definition at line 893 of file SOP_NodeVerb.h.

const SOP_NodeParms* SOP_NodeVerb::CookParms::myParms
protected

Definition at line 895 of file SOP_NodeVerb.h.


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