diff options
author | Sebastian Geerken <devnull@localhost> | 2013-03-05 11:34:03 +0100 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2013-03-05 11:34:03 +0100 |
commit | 9c98b3c16041ebd41aabbb82e71d424a940a1d47 (patch) | |
tree | 496d8b2648a5ad072a2d78b932a4129e7d3dd12d /dw | |
parent | 49ad0b5252190ffbfb4511131af2032f7f341a60 (diff) |
Comparable is now subclass of Object (not pseudo-interface anymore). The old solution would have made RTTI neccessary to work correctly.
Diffstat (limited to 'dw')
-rw-r--r-- | dw/iterator.cc | 10 | ||||
-rw-r--r-- | dw/iterator.hh | 14 | ||||
-rw-r--r-- | dw/table.cc | 2 | ||||
-rw-r--r-- | dw/table.hh | 2 | ||||
-rw-r--r-- | dw/textblock.hh | 2 | ||||
-rw-r--r-- | dw/textblock_iterator.cc | 2 |
6 files changed, 16 insertions, 16 deletions
diff --git a/dw/iterator.cc b/dw/iterator.cc index 5f46cbdb..18d7cd5a 100644 --- a/dw/iterator.cc +++ b/dw/iterator.cc @@ -37,7 +37,7 @@ Iterator::Iterator(Widget *widget, Content::Type mask, bool atEnd) this->mask = mask; } -Iterator::Iterator(Iterator &it): object::Object (), misc::Comparable () +Iterator::Iterator(Iterator &it): object::Comparable () { widget = it.widget; content = it.content; @@ -205,7 +205,7 @@ object::Object *EmptyIterator::clone () return new EmptyIterator (*this); } -int EmptyIterator::compareTo (misc::Comparable *other) +int EmptyIterator::compareTo (object::Comparable *other) { EmptyIterator *otherIt = (EmptyIterator*)other; @@ -257,7 +257,7 @@ TextIterator::TextIterator (TextIterator &it): Iterator (it) text = it.text; } -int TextIterator::compareTo (misc::Comparable *other) +int TextIterator::compareTo (object::Comparable *other) { TextIterator *otherIt = (TextIterator*)other; @@ -535,7 +535,7 @@ object::Object *DeepIterator::clone () return it; } -int DeepIterator::compareTo (misc::Comparable *other) +int DeepIterator::compareTo (object::Comparable *other) { DeepIterator *otherDeepIterator = (DeepIterator*)other; @@ -665,7 +665,7 @@ object::Object *CharIterator::clone() return cloned; } -int CharIterator::compareTo(misc::Comparable *other) +int CharIterator::compareTo(object::Comparable *other) { CharIterator *otherIt = (CharIterator*)other; int c = it->compareTo(otherIt->it); diff --git a/dw/iterator.hh b/dw/iterator.hh index c5cfd72b..d086721c 100644 --- a/dw/iterator.hh +++ b/dw/iterator.hh @@ -16,7 +16,7 @@ namespace core { * * \sa dw::core::Widget::iterator */ -class Iterator: public lout::object::Object, public lout::misc::Comparable +class Iterator: public lout::object::Comparable { protected: Iterator(Widget *widget, Content::Type mask, bool atEnd); @@ -101,7 +101,7 @@ public: EmptyIterator (Widget *widget, Content::Type mask, bool atEnd); lout::object::Object *clone(); - int compareTo(lout::misc::Comparable *other); + int compareTo(lout::object::Comparable *other); bool next (); bool prev (); void highlight (int start, int end, HighlightLayer layer); @@ -126,7 +126,7 @@ public: TextIterator (Widget *widget, Content::Type mask, bool atEnd, const char *text); - int compareTo(lout::misc::Comparable *other); + int compareTo(lout::object::Comparable *other); bool next (); bool prev (); @@ -142,7 +142,7 @@ public: * iterators do not have the limitation, that iteration is only done within * a widget, instead, child widgets are iterated through recursively. */ -class DeepIterator: public lout::object::Object, public lout::misc::Comparable +class DeepIterator: public lout::object::Comparable { private: class Stack: public lout::container::typed::Vector<Iterator> @@ -183,7 +183,7 @@ public: bool next (); bool prev (); inline DeepIterator *cloneDeepIterator() { return (DeepIterator*)clone(); } - int compareTo(lout::misc::Comparable *other); + int compareTo(lout::object::Comparable *other); /** * \brief Highlight a part of the current content. @@ -216,7 +216,7 @@ public: start, end, hpos, vpos); } }; -class CharIterator: public lout::object::Object, public lout::misc::Comparable +class CharIterator: public lout::object::Comparable { public: // START and END must not clash with any char value @@ -234,7 +234,7 @@ public: ~CharIterator (); lout::object::Object *clone(); - int compareTo(lout::misc::Comparable *other); + int compareTo(lout::object::Comparable *other); bool next (); bool prev (); diff --git a/dw/table.cc b/dw/table.cc index 39cfee73..defc4259 100644 --- a/dw/table.cc +++ b/dw/table.cc @@ -1114,7 +1114,7 @@ object::Object *Table::TableIterator::clone() return new TableIterator ((Table*)getWidget(), getMask(), index); } -int Table::TableIterator::compareTo(misc::Comparable *other) +int Table::TableIterator::compareTo(object::Comparable *other) { return index - ((TableIterator*)other)->index; } diff --git a/dw/table.hh b/dw/table.hh index 7bcc6c1b..b8feb835 100644 --- a/dw/table.hh +++ b/dw/table.hh @@ -344,7 +344,7 @@ private: TableIterator (Table *table, core::Content::Type mask, int index); lout::object::Object *clone(); - int compareTo(lout::misc::Comparable *other); + int compareTo(lout::object::Comparable *other); bool next (); bool prev (); diff --git a/dw/textblock.hh b/dw/textblock.hh index e1957740..90185cd2 100644 --- a/dw/textblock.hh +++ b/dw/textblock.hh @@ -376,7 +376,7 @@ protected: int index); lout::object::Object *clone(); - int compareTo(lout::misc::Comparable *other); + int compareTo(lout::object::Comparable *other); bool next (); bool prev (); diff --git a/dw/textblock_iterator.cc b/dw/textblock_iterator.cc index c6aaab57..22f43fb6 100644 --- a/dw/textblock_iterator.cc +++ b/dw/textblock_iterator.cc @@ -57,7 +57,7 @@ object::Object *Textblock::TextblockIterator::clone() return new TextblockIterator ((Textblock*)getWidget(), getMask(), index); } -int Textblock::TextblockIterator::compareTo(misc::Comparable *other) +int Textblock::TextblockIterator::compareTo(object::Comparable *other) { return index - ((TextblockIterator*)other)->index; } |