diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-09 15:33:03 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-09 15:33:03 +0100 |
commit | 192794c711571f1689a62d56342c1c9ef1ccc805 (patch) | |
tree | 89cb690c39756b2727fa354b54d646bfece8a120 | |
parent | 3c28ac2fbca95c8b635b38e4c48a183c8159355a (diff) |
removed resolve debug printouts and simplified resolve method in Document.
-rw-r--r-- | src/core/model/Document.cpp | 15 | ||||
-rw-r--r-- | src/core/model/Node.cpp | 14 |
2 files changed, 3 insertions, 26 deletions
diff --git a/src/core/model/Document.cpp b/src/core/model/Document.cpp index 912a04e..d01fbd6 100644 --- a/src/core/model/Document.cpp +++ b/src/core/model/Document.cpp @@ -93,18 +93,9 @@ NodeVector<StructuredEntity> &DocumentEntity::getField( void Document::continueResolve(ResolutionState &state) { - // Try to resolve annotations and other document nodes first - bool hasResult = - continueResolveComposita(annotations, annotations.getIndex(), state); - if (root != nullptr) { - hasResult = hasResult | continueResolveCompositum(root, state); - } - - // If no direct child has been found, continue resolving the referenced - // domains - if (!hasResult) { - continueResolveReferences(domains, state); - } + continueResolveComposita(annotations, annotations.getIndex(), state); + continueResolveCompositum(root, state); + continueResolveReferences(domains, state); } } diff --git a/src/core/model/Node.cpp b/src/core/model/Node.cpp index 930fbff..d1aee53 100644 --- a/src/core/model/Node.cpp +++ b/src/core/model/Node.cpp @@ -16,8 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include <iostream> - #include <functional> #include <unordered_set> @@ -254,13 +252,9 @@ bool Node::resolve(ResolutionState &state) { // Try to mark this note as visited, do nothing if already has been visited if (state.markVisited(this)) { - std::cout << "visiting " << name << " (" << state.idx << ")" - << std::endl; - // Add this node to the result if it matches the current description if (state.atEndOfPath()) { if (state.typeMatches(type())) { - std::cout << "found match!" << std::endl; state.addToResult(this); return true; } @@ -318,7 +312,6 @@ bool Node::continueResolveReference(Handle<Node> h, ResolutionState &state) // if the node the reference points to is known to contain the type that is // currently asked for in the resolution process if (canFollowReferences(state) && state.canContainType(h->type())) { - std::cout << "following reference to " << h->getName() << std::endl; ResolutionState forkedState = state.fork(this); return continueResolveCompositum(h, forkedState); } @@ -333,13 +326,6 @@ std::vector<ResolutionResult> Node::resolve( ResolutionState state(sharedState, this); // Kickstart the resolution process by treating this very node as compositum - std::cout << "------------" << std::endl; - std::cout << "resolving: "; - for (auto s : path) { - std::cout << s << " "; - } - std::cout << " of type " << type.name << std::endl; - if (path.size() > 0) { continueResolveCompositum(this, state); } |