HDK
|
#include <OP_OpNamespaceHierarchy.h>
Classes | |
class | op_PrefEntry |
Public Member Functions | |
OP_OpNamespaceHierarchy () | |
~OP_OpNamespaceHierarchy () | |
void | buildHierarchy (const char *hierarchy, const char *table_name) |
void | handleOperatorAdded (const char *op_name) |
Updates the hierarchy when an operator has been added to the table. More... | |
void | handleOperatorRemoved (const char *op_name) |
Updates the hierarchy when an operator has been removed from the table. More... | |
const char * | findPreferredOpName (const char *op_name, const UT_StringArray *network_scope_stack) |
void | getPrecedenceOrder (UT_StringArray &precedence_order, const char *op_name, const UT_StringArray *network_scope_stack) |
Friends | |
class | op_OpPrefEntryComparator |
Implements an operator name resolution mechanism for unquallified (or not fully qualified) operator names (ie, finds a full operator name with a namespace and version tags, given a partial operatorn name, like just the core name, or core name with a namespace but no version, where several candidates may exist).
Definition at line 30 of file OP_OpNamespaceHierarchy.h.
OP_OpNamespaceHierarchy::OP_OpNamespaceHierarchy | ( | ) |
OP_OpNamespaceHierarchy::~OP_OpNamespaceHierarchy | ( | ) |
void OP_OpNamespaceHierarchy::buildHierarchy | ( | const char * | hierarchy, |
const char * | table_name | ||
) |
Builds the operator definition hierarchy.
hierarchy | The string enumerating the namespace hierarchy. table_name The name of the operator table for which the hierarchy is build. |
const char* OP_OpNamespaceHierarchy::findPreferredOpName | ( | const char * | op_name, |
const UT_StringArray * | network_scope_stack | ||
) |
Resolves a given optype name to a preferred optype name, in case the given name is ambiguous and has several operator definition candidates. For fully qualified or unambiguous names the method will return the given argument.
op_name | The operator type name to resolve. |
network_scope_stack | The array of subnet optype names ( with the table name) inside which the operator node would be created. The first element in the array is the immediate parent, the second is the granparent subnet, etc). |
void OP_OpNamespaceHierarchy::getPrecedenceOrder | ( | UT_StringArray & | precedence_order, |
const char * | op_name, | ||
const UT_StringArray * | network_scope_stack | ||
) |
Obtains a list of available operator names that have the same base (core) name as the given operator. If scope network name is not NULL, the list includes only operators whose nodes can be created in one of these networks (since they represent the stack of nested scopes). Otherwise all operators are included. The list is sorted according to the descending precedence order.
void OP_OpNamespaceHierarchy::handleOperatorAdded | ( | const char * | op_name | ) |
Updates the hierarchy when an operator has been added to the table.
void OP_OpNamespaceHierarchy::handleOperatorRemoved | ( | const char * | op_name | ) |
Updates the hierarchy when an operator has been removed from the table.
|
friend |
Definition at line 106 of file OP_OpNamespaceHierarchy.h.