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

#include <PDG_Port.h>

Classes

struct  pdg_Connection
 

Public Types

using ExpressionVars = UT_StringMap< UT_StringHolder >
 
using ConnectionArray = UT_Array< pdg_Connection >
 

Public Member Functions

 PDG_Port (PDG_NodeInterface *owner, const PDG_WorkItemDataType *data_type, PDG_PortType portType, const UT_StringHolder &name, const UT_StringHolder &label, int size, bool ordered=true, bool custom=false, bool builtin=false)
 
virtual ~PDG_Port ()
 
int64 getMemoryUsage (bool inclusive) const
 
void addTag (const UT_StringHolder &tag)
 
bool connect (PDG_Port *port, bool reference, bool inverse=true)
 
bool disconnect (PDG_Port *port, bool inverse=true)
 
bool disconnectAll ()
 
bool isConnected ()
 
bool canConnectTo (PDG_Port *port) const
 
bool isConnectedTo (PDG_Port *port, bool reference) const
 
void connectedNodes (PDG_NodeArray &nodes, bool filter_bypassed, bool filter_reference) const
 
int connectionCount (bool filter_bypassed, bool filter_reference) const
 
const ConnectionArrayconnections () const
 
void connectedPorts (PDG_PortArray &ports, bool filter_bypassed, bool filter_reference) const
 
PDG_NodeInterfaceowner () const
 
PDG_Nodenode () const
 
const PDG_WorkItemDataTypeworkItemDataType () const
 
void setWorkItemDataType (const PDG_WorkItemDataType *data_type)
 
PDG_PortType portType () const
 
PDGT_Valuevalue (int index)
 
const PDGT_Valuevalue (int index) const
 
PDGT_ValuedefaultValue (int index)
 
const PDGT_ValuedefaultValue (int index) const
 
void setExpression (int index, const UT_StringHolder &expression, bool multi)
 
void setIsAppParm (int index, bool app_parm)
 
const UT_StringHolderexpression (int index) const
 
bool isAppParm (int index) const
 
const ExpressionVarsexpressionVars () const
 
bool hasExpressionVars () const
 
bool addExpressionVar (const UT_StringHolder &var_name, const UT_StringHolder &var_type)
 
void setExpressionVars (const ExpressionVars &vars)
 
bool multiExpression (int index) const
 
bool hasExpression (int index) const
 
bool isEnabled () const
 
void setIsEnabled (bool enabled)
 
bool hasWorkItemExpression () const
 
const UT_StringArrayexpressionAttribs () const
 
void resetExpressionAttribs ()
 
void setExpressionAttribs (const UT_StringArray &attribs)
 
int evaluationOrigin () const
 
void setEvaluationOrigin (int origin)
 
void setDisplayType (int display_type)
 
void addDisplayType (PDG_PortDisplayType display_type)
 
int displayType () const
 
bool hasDisplayType (PDG_PortDisplayType display_type)
 
void setDisplayMenuList (const UT_StringArray &list)
 
const UT_StringArraydisplayMenuList () const
 
void setDisplayMenuScript (const UT_StringHolder &script)
 
const UT_StringHolderdisplayMenuScript () const
 
const UT_StringArraytags () const
 
const UT_StringHoldername () const
 
const UT_StringHolderlabel () const
 
const PDG_ConditionalcookCondition () const
 
void setCookCondition (const UT_StringHolder &pattern)
 
const UT_StringHolderdisableCondition () const
 
void setDisableCondition (const UT_StringHolder &condition)
 
bool hasTag (const UT_StringHolder &tag) const
 
void setDataType (PDGT_Value::DataType type)
 
PDGT_Value::DataType dataType () const
 
UT_StringArray resultTypeTags (bool strip_prefix) const
 
bool isOrdered () const
 
bool isCustom () const
 
bool isBuiltin () const
 
int size () const
 
bool asJSON (UT_JSONWriter &writer, bool skip_defaults) const
 
UT_StringHolder dataTypeAsString () const
 
bool evaluate (int index, fpreal &result, const PDG_WorkItem *work_item, UT_WorkBuffer &errors) const
 
bool evaluate (UT_FprealArray &result, const PDG_WorkItem *work_item, UT_WorkBuffer &errors) const
 
bool evaluate (int index, exint &result, const PDG_WorkItem *work_item, UT_WorkBuffer &errors) const
 
bool evaluate (int index, bool &result, const PDG_WorkItem *work_item, UT_WorkBuffer &errors) const
 
template<typename T , std::enable_if_t< std::is_enum< T >::value, bool > = true>
bool evaluate (int index, T &result, const PDG_WorkItem *work_item, UT_WorkBuffer &errors)
 
bool evaluate (UT_ExintArray &result, const PDG_WorkItem *work_item, UT_WorkBuffer &errors) const
 
bool evaluate (int index, UT_StringHolder &result, const PDG_WorkItem *work_item, UT_WorkBuffer &errors) const
 
bool evaluate (UT_StringArray &result, const PDG_WorkItem *work_item, UT_WorkBuffer &errors) const
 
bool evaluateRaw (int index, UT_StringHolder &result, const PDG_WorkItem *work_item, UT_WorkBuffer &errors) const
 
bool evaluateRaw (UT_StringArray &result, const PDG_WorkItem *work_item, UT_WorkBuffer &errors) const
 
UT_StringHolder expressionFile (int index) const
 

Static Public Member Functions

static bool fromJSON (const UT_JSONValue *value, PDG_NodeInterface *interface, UT_WorkBuffer &errors)
 
static void splitName (const UT_StringHolder &full_name, UT_StringHolder &node, UT_StringHolder &port)
 

Static Public Attributes

static const UT_StringHolder theNameKey
 
static const UT_StringHolder theTypeKey
 
static const UT_StringHolder theLabelKey
 
static const UT_StringHolder theSizeKey
 
static const UT_StringHolder theTagsKey
 
static const UT_StringHolder theExpressionKey
 
static const UT_StringHolder theValueKey
 

Detailed Description

Definition at line 39 of file PDG_Port.h.

Member Typedef Documentation

Definition at line 55 of file PDG_Port.h.

Definition at line 54 of file PDG_Port.h.

Constructor & Destructor Documentation

PDG_Port::PDG_Port ( PDG_NodeInterface owner,
const PDG_WorkItemDataType data_type,
PDG_PortType  portType,
const UT_StringHolder name,
const UT_StringHolder label,
int  size,
bool  ordered = true,
bool  custom = false,
bool  builtin = false 
)
virtual PDG_Port::~PDG_Port ( )
virtual

Member Function Documentation

void PDG_Port::addDisplayType ( PDG_PortDisplayType  display_type)
bool PDG_Port::addExpressionVar ( const UT_StringHolder var_name,
const UT_StringHolder var_type 
)
void PDG_Port::addTag ( const UT_StringHolder tag)
bool PDG_Port::asJSON ( UT_JSONWriter writer,
bool  skip_defaults 
) const
bool PDG_Port::canConnectTo ( PDG_Port port) const
bool PDG_Port::connect ( PDG_Port port,
bool  reference,
bool  inverse = true 
)
void PDG_Port::connectedNodes ( PDG_NodeArray nodes,
bool  filter_bypassed,
bool  filter_reference 
) const
void PDG_Port::connectedPorts ( PDG_PortArray ports,
bool  filter_bypassed,
bool  filter_reference 
) const
int PDG_Port::connectionCount ( bool  filter_bypassed,
bool  filter_reference 
) const
const ConnectionArray& PDG_Port::connections ( ) const
const PDG_Conditional& PDG_Port::cookCondition ( ) const
PDGT_Value::DataType PDG_Port::dataType ( ) const
UT_StringHolder PDG_Port::dataTypeAsString ( ) const
PDGT_Value* PDG_Port::defaultValue ( int  index)
const PDGT_Value* PDG_Port::defaultValue ( int  index) const
const UT_StringHolder& PDG_Port::disableCondition ( ) const
bool PDG_Port::disconnect ( PDG_Port port,
bool  inverse = true 
)
bool PDG_Port::disconnectAll ( )
const UT_StringArray& PDG_Port::displayMenuList ( ) const
const UT_StringHolder& PDG_Port::displayMenuScript ( ) const
int PDG_Port::displayType ( ) const
bool PDG_Port::evaluate ( int  index,
fpreal result,
const PDG_WorkItem work_item,
UT_WorkBuffer errors 
) const
bool PDG_Port::evaluate ( UT_FprealArray result,
const PDG_WorkItem work_item,
UT_WorkBuffer errors 
) const
bool PDG_Port::evaluate ( int  index,
exint result,
const PDG_WorkItem work_item,
UT_WorkBuffer errors 
) const
bool PDG_Port::evaluate ( int  index,
bool &  result,
const PDG_WorkItem work_item,
UT_WorkBuffer errors 
) const
template<typename T , std::enable_if_t< std::is_enum< T >::value, bool > = true>
bool PDG_Port::evaluate ( int  index,
T result,
const PDG_WorkItem work_item,
UT_WorkBuffer errors 
)
inline

Definition at line 217 of file PDG_Port.h.

bool PDG_Port::evaluate ( UT_ExintArray result,
const PDG_WorkItem work_item,
UT_WorkBuffer errors 
) const
bool PDG_Port::evaluate ( int  index,
UT_StringHolder result,
const PDG_WorkItem work_item,
UT_WorkBuffer errors 
) const
bool PDG_Port::evaluate ( UT_StringArray result,
const PDG_WorkItem work_item,
UT_WorkBuffer errors 
) const
bool PDG_Port::evaluateRaw ( int  index,
UT_StringHolder result,
const PDG_WorkItem work_item,
UT_WorkBuffer errors 
) const
bool PDG_Port::evaluateRaw ( UT_StringArray result,
const PDG_WorkItem work_item,
UT_WorkBuffer errors 
) const
int PDG_Port::evaluationOrigin ( ) const
const UT_StringHolder& PDG_Port::expression ( int  index) const
const UT_StringArray& PDG_Port::expressionAttribs ( ) const
UT_StringHolder PDG_Port::expressionFile ( int  index) const
const ExpressionVars& PDG_Port::expressionVars ( ) const
static bool PDG_Port::fromJSON ( const UT_JSONValue value,
PDG_NodeInterface interface,
UT_WorkBuffer errors 
)
static
int64 PDG_Port::getMemoryUsage ( bool  inclusive) const
bool PDG_Port::hasDisplayType ( PDG_PortDisplayType  display_type)
bool PDG_Port::hasExpression ( int  index) const
bool PDG_Port::hasExpressionVars ( ) const
bool PDG_Port::hasTag ( const UT_StringHolder tag) const
bool PDG_Port::hasWorkItemExpression ( ) const
bool PDG_Port::isAppParm ( int  index) const
bool PDG_Port::isBuiltin ( ) const
bool PDG_Port::isConnected ( )
bool PDG_Port::isConnectedTo ( PDG_Port port,
bool  reference 
) const
bool PDG_Port::isCustom ( ) const
bool PDG_Port::isEnabled ( ) const
bool PDG_Port::isOrdered ( ) const
const UT_StringHolder& PDG_Port::label ( ) const
bool PDG_Port::multiExpression ( int  index) const
const UT_StringHolder& PDG_Port::name ( ) const
PDG_Node* PDG_Port::node ( ) const
PDG_NodeInterface* PDG_Port::owner ( ) const
PDG_PortType PDG_Port::portType ( ) const
void PDG_Port::resetExpressionAttribs ( )
UT_StringArray PDG_Port::resultTypeTags ( bool  strip_prefix) const
void PDG_Port::setCookCondition ( const UT_StringHolder pattern)
void PDG_Port::setDataType ( PDGT_Value::DataType  type)
void PDG_Port::setDisableCondition ( const UT_StringHolder condition)
void PDG_Port::setDisplayMenuList ( const UT_StringArray list)
void PDG_Port::setDisplayMenuScript ( const UT_StringHolder script)
void PDG_Port::setDisplayType ( int  display_type)
void PDG_Port::setEvaluationOrigin ( int  origin)
void PDG_Port::setExpression ( int  index,
const UT_StringHolder expression,
bool  multi 
)
void PDG_Port::setExpressionAttribs ( const UT_StringArray attribs)
void PDG_Port::setExpressionVars ( const ExpressionVars vars)
void PDG_Port::setIsAppParm ( int  index,
bool  app_parm 
)
void PDG_Port::setIsEnabled ( bool  enabled)
void PDG_Port::setWorkItemDataType ( const PDG_WorkItemDataType data_type)
int PDG_Port::size ( ) const
static void PDG_Port::splitName ( const UT_StringHolder full_name,
UT_StringHolder node,
UT_StringHolder port 
)
static
const UT_StringArray& PDG_Port::tags ( ) const
PDGT_Value* PDG_Port::value ( int  index)
const PDGT_Value* PDG_Port::value ( int  index) const
const PDG_WorkItemDataType* PDG_Port::workItemDataType ( ) const

Member Data Documentation

const UT_StringHolder PDG_Port::theExpressionKey
static

Definition at line 62 of file PDG_Port.h.

const UT_StringHolder PDG_Port::theLabelKey
static

Definition at line 59 of file PDG_Port.h.

const UT_StringHolder PDG_Port::theNameKey
static

Definition at line 57 of file PDG_Port.h.

const UT_StringHolder PDG_Port::theSizeKey
static

Definition at line 60 of file PDG_Port.h.

const UT_StringHolder PDG_Port::theTagsKey
static

Definition at line 61 of file PDG_Port.h.

const UT_StringHolder PDG_Port::theTypeKey
static

Definition at line 58 of file PDG_Port.h.

const UT_StringHolder PDG_Port::theValueKey
static

Definition at line 63 of file PDG_Port.h.


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