[libgee] Move key_type/value_type implementation to multimap interface
- From: Maciej Marcin Piechotka <mpiechotka src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgee] Move key_type/value_type implementation to multimap interface
- Date: Mon, 20 Aug 2012 07:20:22 +0000 (UTC)
commit 12a21443764cffdc0218658c31da9d9004e00835
Author: Maciej Piechotka <uzytkownik2 gmail com>
Date: Mon Aug 20 00:00:46 2012 -0700
Move key_type/value_type implementation to multimap interface
gee/abstractmultimap.vala | 4 ----
gee/multimap.vala | 5 +++--
2 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/gee/abstractmultimap.vala b/gee/abstractmultimap.vala
index 2c71ed5..3f0d205 100644
--- a/gee/abstractmultimap.vala
+++ b/gee/abstractmultimap.vala
@@ -135,10 +135,6 @@ public abstract class Gee.AbstractMultiMap<K,V> : Object, MultiMap<K,V> {
protected abstract EqualDataFunc<V> get_value_equal_func ();
- public Type key_type { get { return typeof(K); } }
-
- public Type value_type { get { return typeof(V); } }
-
private class MappingIterator<K, V> : Object {
protected Gee.MapIterator<K, Collection<V>> outer;
protected Iterator<V>? inner = null;
diff --git a/gee/multimap.vala b/gee/multimap.vala
index 49a17fc..5698b33 100644
--- a/gee/multimap.vala
+++ b/gee/multimap.vala
@@ -23,6 +23,7 @@
/**
* A map with multiple values per key.
*/
+[GenericAccessors]
public interface Gee.MultiMap<K,V> : Object {
/**
* The number of key/value pairs in this map.
@@ -117,10 +118,10 @@ public interface Gee.MultiMap<K,V> : Object {
/**
* The type of the keys in this multimap.
*/
- public abstract Type key_type { get; }
+ public virtual Type key_type { get { return typeof (K); } }
/**
* The type of the values in this multimap.
*/
- public abstract Type value_type { get; }
+ public virtual Type value_type { get { return typeof (V); } }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]