#include <LingDef.h>
Public Types | |
typedef std::vector< const Node * > | NodeList |
typedef NodeList::const_iterator | NodeIterator |
Public Member Functions | |
Tree (const std::string &name) | |
Tree (const Tree &) | |
Copy constructor. | |
~Tree () | |
const std::string & | getName () const |
Returns the name by which this tree is identified. | |
NodeIterator | nodesBegin () const |
NodeIterator | nodesEnd () const |
Node & | getRootNode () |
Returns the root node, which is nameless and invisible. | |
const Node * | getNode (const std::string &) const |
Friends | |
class | LingDef |
Classes | |
class | Node |
The most obvious use is in sematic features:
If salesperson is set, then querying concrete will return true.
The tree is a shared resource for the whole definition. To use a tree, a feature of type virtual tree needs to be declared, with an identifier referring to the tree in question. This way the trees can be easily reused in different poses. The names used in the tree will then be defined for the whole pos, and may consequently not be used in other features.
Definition at line 176 of file LingDef.h.
typedef NodeList::const_iterator LinguisticDefinition::LingDef::Tree::NodeIterator |
typedef std::vector<const Node *> LinguisticDefinition::LingDef::Tree::NodeList |
LinguisticDefinition::LingDef::Tree::Tree | ( | const std::string & | name | ) |
LingDef::Tree::Tree | ( | const Tree & | ) |
Copy constructor.
Definition at line 790 of file LingDef.cc.
References d_ancestorsMap, LinguisticDefinition::LingDef::Tree::Node::d_parentTree, LinguisticDefinition::LingDef::Tree::Node::getName(), nodesBegin(), and nodesEnd().
LingDef::Tree::~Tree | ( | ) |
const string & LingDef::Tree::getName | ( | ) | const |
const Node* LinguisticDefinition::LingDef::Tree::getNode | ( | const std::string & | ) | const |
Referenced by LinguisticDefinition::LingDef::LingDef().
LingDef::Tree::Node & LingDef::Tree::getRootNode | ( | ) |
Returns the root node, which is nameless and invisible.
Definition at line 908 of file LingDef.cc.
Referenced by main().
LingDef::Tree::NodeIterator LingDef::Tree::nodesBegin | ( | ) | const |
Definition at line 937 of file LingDef.cc.
Referenced by LinguisticDefinition::LingDef::Feature::setTree(), Tree(), and ~Tree().
LingDef::Tree::NodeIterator LingDef::Tree::nodesEnd | ( | ) | const |
Definition at line 944 of file LingDef.cc.
Referenced by LinguisticDefinition::LingDef::Feature::setTree(), Tree(), and ~Tree().