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

#include <OP_OpNamespaceHierarchy.h>

+ Inheritance diagram for OP_OpNamespaceHierarchy:

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
 

Detailed Description

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.

Constructor & Destructor Documentation

OP_OpNamespaceHierarchy::OP_OpNamespaceHierarchy ( )
OP_OpNamespaceHierarchy::~OP_OpNamespaceHierarchy ( )

Member Function Documentation

void OP_OpNamespaceHierarchy::buildHierarchy ( const char *  hierarchy,
const char *  table_name 
)

Builds the operator definition hierarchy.

Parameters
hierarchyThe 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.

Parameters
op_nameThe operator type name to resolve.
network_scope_stackThe 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).
Returns
The preferred operator type name for the given name.
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.

Friends And Related Function Documentation

friend class op_OpPrefEntryComparator
friend

Definition at line 106 of file OP_OpNamespaceHierarchy.h.


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