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

#include <PDG_AttributeInfo.h>

Classes

struct  Config
 
struct  ExprData
 

Public Types

enum  AttribOrigin {
  eOriginNone = 0x0, eOriginGenerate = 0x1, eOriginCook = 0x2, eOriginExpected = 0x4,
  eOriginGenerateExpected = eOriginGenerate | eOriginExpected
}
 Whether the attributes is create/used in the generate/cook stage. More...
 

Public Member Functions

 PDG_AttributeInfo ()
 Default attribute origins are initialized to static. More...
 
void reset ()
 
void addOutputAttribs (const Config &attrib_config)
 Adds the attributes from the maap to the output map of this object. More...
 
void addInputAttribs (const Config &attrib_config)
 Adds attributes that are consumed by this object. More...
 
void addUpstreamAttribs (const PDG_AttributeInfo &info, bool dynamic_generator)
 
void processExpressionAttribs (const PDG_NodeInterface *node_interface, const UT_ArrayStringMap< int > &ports)
 Copies expression attributes to inputs based on the port map. More...
 
bool checkNeedsDynamic (bool require_inputs) const
 
const ConfigoutputAttributes () const
 
const ConfiginputAttributes () const
 Returns the attributes referenced or use during the current cook. More...
 
const ConfigupstreamAttributes () const
 

Static Public Member Functions

static bool fromJSON (Config &config, const UT_JSONValueArray &json_array, UT_WorkBuffer &errors)
 Loads a Config object from a JSON array. More...
 

Detailed Description

Stores information about the attributes needed and created by a node

Definition at line 26 of file PDG_AttributeInfo.h.

Member Enumeration Documentation

Whether the attributes is create/used in the generate/cook stage.

Enumerator
eOriginNone 
eOriginGenerate 
eOriginCook 
eOriginExpected 
eOriginGenerateExpected 

Definition at line 30 of file PDG_AttributeInfo.h.

Constructor & Destructor Documentation

PDG_AttributeInfo::PDG_AttributeInfo ( )

Default attribute origins are initialized to static.

Member Function Documentation

void PDG_AttributeInfo::addInputAttribs ( const Config attrib_config)

Adds attributes that are consumed by this object.

void PDG_AttributeInfo::addOutputAttribs ( const Config attrib_config)

Adds the attributes from the maap to the output map of this object.

void PDG_AttributeInfo::addUpstreamAttribs ( const PDG_AttributeInfo info,
bool  dynamic_generator 
)

Adds the input attributes from the attribute info to the input map of this object

bool PDG_AttributeInfo::checkNeedsDynamic ( bool  require_inputs) const

Returns true if the node needs to be dynamic in order to access the attributes it needs to generate.

static bool PDG_AttributeInfo::fromJSON ( Config config,
const UT_JSONValueArray json_array,
UT_WorkBuffer errors 
)
static

Loads a Config object from a JSON array.

const Config& PDG_AttributeInfo::inputAttributes ( ) const
inline

Returns the attributes referenced or use during the current cook.

Definition at line 95 of file PDG_AttributeInfo.h.

const Config& PDG_AttributeInfo::outputAttributes ( ) const
inline

Returns the output attribute map, i.e. attributes produced by the node that owns this object

Definition at line 91 of file PDG_AttributeInfo.h.

void PDG_AttributeInfo::processExpressionAttribs ( const PDG_NodeInterface node_interface,
const UT_ArrayStringMap< int > &  ports 
)

Copies expression attributes to inputs based on the port map.

void PDG_AttributeInfo::reset ( )

Resets the internal structures of this object. Called during a cook, so the info can be re-filled from the inputs, node options and parms

const Config& PDG_AttributeInfo::upstreamAttributes ( ) const
inline

Returns the upstream attribute map, i.e. the total set of all upstream attributes that might be available to work items in this node.

Definition at line 100 of file PDG_AttributeInfo.h.


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