#include <NodeFactory.h>
Static Public Member Functions | |
| static void | initialize () |
| Initializes the node factory for producing nodes. | |
| static void | registerType (const QString &filename) |
| Loads the XML description of a node type from the file with the given name. | |
| static unsigned int | getNumCategories () |
| Returns the number of node type categories available in the node factory. | |
| static QString | getCategoryName (unsigned int index) |
| Returns the name of the node type category with the given index. | |
| static QString | getCategoryName (const QString &typeName) |
| Returns the name of the category under which nodes of the given type name should be filed. | |
| static QString | getCategoryIconName (unsigned int index) |
| Returns the name of the icon of the node type category with the given index. | |
| static QString | getCategoryIconName (const QString &typeName) |
| Returns the name of the icon of the category under which nodes of the given type name should be filed. | |
| static QStringList | getTypeNames (bool internalTypes=false) |
| Returns the list of types that are registered with the NodeFactory. | |
| static QColor | getColor (const QString &typeName) |
| Returns the color associated with the node type of the given name. | |
| static bool | isErroneous (const QString &typeName) |
| Returns whether errors or warnings occured while parsing the description file for the node type with the given name. | |
| static Node * | createNode (const QString &typeName, const QString &name) |
| Creates a node of the given type name with the given name. | |
| static void | freeResources () |
| Frees all resources that were used by private static data of the node factory class. | |
Static Private Attributes | |
| static NodeType::CategoryList | s_nodeTypeCategories |
| A list of node type categories available in the node factory. | |
| static NodeType::Map | s_nodeTypes |
| The map of node types with node type names as keys and pointers to node type objects as values. | |
| void NodeFactory::initialize | ( | ) | [static] |
Initializes the node factory for producing nodes.
Public Static Functions.
| void NodeFactory::registerType | ( | const QString & | filename | ) | [static] |
Loads the XML description of a node type from the file with the given name.
| filename | The name of an XML file describing a node type. |
| unsigned int NodeFactory::getNumCategories | ( | ) | [static] |
Returns the number of node type categories available in the node factory.
| QString NodeFactory::getCategoryName | ( | unsigned int | index | ) | [static] |
Returns the name of the node type category with the given index.
| index | The index of the node type category whose name to return. |
| QString NodeFactory::getCategoryName | ( | const QString & | typeName | ) | [static] |
Returns the name of the category under which nodes of the given type name should be filed.
| typeName | The name of a node type for which to return the category name. |
| QString NodeFactory::getCategoryIconName | ( | unsigned int | index | ) | [static] |
Returns the name of the icon of the node type category with the given index.
| index | The index of the node type category whose icon name to return. |
| QString NodeFactory::getCategoryIconName | ( | const QString & | typeName | ) | [static] |
Returns the name of the icon of the category under which nodes of the given type name should be filed.
| typeName | The name of a node type for which to return the category icon. |
| QStringList NodeFactory::getTypeNames | ( | bool | internalTypes = false |
) | [static] |
Returns the list of types that are registered with the NodeFactory.
| internalTypes | Flag to control whether to include internal node types in the result. |
| QColor NodeFactory::getColor | ( | const QString & | typeName | ) | [static] |
Returns the color associated with the node type of the given name.
| typeName | The name of the node type for which to return the associated color. |
| bool NodeFactory::isErroneous | ( | const QString & | typeName | ) | [static] |
Returns whether errors or warnings occured while parsing the description file for the node type with the given name.
| typeName | The name of the node type for which to return whether errors or warnings occured. |
| Node * NodeFactory::createNode | ( | const QString & | typeName, | |
| const QString & | name | |||
| ) | [static] |
Creates a node of the given type name with the given name.
| typeName | The name of the type to use for the new node. | |
| name | The name to give to the new node. |
| void NodeFactory::freeResources | ( | ) | [static] |
Frees all resources that were used by private static data of the node factory class.
QList< NodeType::Category > NodeFactory::s_nodeTypeCategories [static, private] |
A list of node type categories available in the node factory.
Private Static Data.
QMap< QString, NodeType * > NodeFactory::s_nodeTypes [static, private] |
The map of node types with node type names as keys and pointers to node type objects as values.
1.5.9