Override read_only_view property in ReadOnlySortedMap and its subclasses
authorMaciej Piechotka <uzytkownik2@gmail.com>
Sat, 14 Sep 2013 11:07:59 +0000 (13:07 +0200)
committerMaciej Piechotka <uzytkownik2@gmail.com>
Sat, 14 Sep 2013 11:07:59 +0000 (13:07 +0200)
gee/readonlybidirsortedmap.vala
gee/readonlysortedmap.vala

index 95c0327..e621ee6 100644 (file)
@@ -46,6 +46,15 @@ internal class Gee.ReadOnlyBidirSortedMap<K,V> : ReadOnlySortedMap<K,V>, BidirSo
                return new BidirMapIterator<K,V> ((_map as BidirSortedMap<K,V>).bidir_map_iterator ());
        }
 
+       /**
+        * {@inheritDoc}
+        */
+       public BidirSortedMap<K,V> read_only_view {
+               owned get {
+                       return this;
+               }
+       }
+
        protected class BidirMapIterator<K,V> : Gee.ReadOnlyMap.MapIterator<K,V>, Gee.BidirMapIterator<K,V> {
                public BidirMapIterator (Gee.BidirMapIterator<K,V> iterator) {
                        base (iterator);
index 56d7fb6..d6e7b2b 100644 (file)
@@ -77,5 +77,14 @@ internal class Gee.ReadOnlySortedMap<K,V> : ReadOnlyMap<K,V>, SortedMap<K,V> {
                        return (_map as SortedMap<K,V>).ascending_entries.read_only_view;
                }
        }
+
+       /**
+        * {@inheritDoc}
+        */
+       public SortedMap<K, V> read_only_view {
+               owned get {
+                       return this;
+               }
+       }
 }