diff options
author | Sebastian Geerken <devnull@localhost> | 2013-08-15 12:39:00 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2013-08-15 12:39:00 +0200 |
commit | bd17107d17663c847e671ff736af969b5c441e71 (patch) | |
tree | aabb246d5d8b333ee126c2f66ffa7a55ed7091aa /dw/iterator.cc | |
parent | 8327ae5fc00726c4746c085ed35c3f0d02890616 (diff) |
Some debugging stuff.
Diffstat (limited to 'dw/iterator.cc')
-rw-r--r-- | dw/iterator.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/dw/iterator.cc b/dw/iterator.cc index c31c2706..cdbc58bd 100644 --- a/dw/iterator.cc +++ b/dw/iterator.cc @@ -55,6 +55,24 @@ bool Iterator::equals (Object *other) (getWidget() == otherIt->getWidget() && compareTo(otherIt) == 0); } +void Iterator::intoStringBuffer(misc::StringBuffer *sb) +{ + sb->append ("{ content = "); + Content::intoStringBuffer (&content, sb); + + sb->append (", widget = "); + //widget->intoStringBuffer (sb); + sb->appendPointer (widget); + sb->append (" ("); + sb->append (widget->getClassName()); + sb->append (")>"); + + sb->append (", mask = "); + Content::maskIntoStringBuffer (mask, sb); + + sb->append (" }"); +} + /** * \brief Delete the iterator. * @@ -583,6 +601,9 @@ int DeepIterator::compareTo (object::Comparable *other) { DeepIterator *otherDeepIterator = (DeepIterator*)other; + //printf ("Compare: %s\n", stack.toString ()); + //printf (" to: %s\n", otherDeepIterator->stack.toString ()); + // Search the highest level, where the widgets are the same. int level = 0; @@ -594,10 +615,14 @@ int DeepIterator::compareTo (object::Comparable *other) level++; } + //printf (" => level = %d (temorally)\n", level); + while (stack.get(level)->getWidget () != otherDeepIterator->stack.get(level)->getWidget ()) level--; + //printf (" => level = %d (finally)\n", level); + return stack.get(level)->compareTo (otherDeepIterator->stack.get(level)); } |