Billy Barrow 4 päivää sitten
vanhempi
sitoutus
b83c80f979

+ 1 - 1
src/lib/Debug.vala

@@ -146,7 +146,7 @@ namespace Invercargill {
             if(type.is_a(typeof(Properties))) {
                 names.add("Properties");
             }
-            if(type.is_a(typeof(PromotionWrapper))) {
+            if(type.is_a(typeof(Promotion))) {
                 names.add("Promotion");
             }
 

+ 3 - 3
src/lib/Enumerable.vala

@@ -563,7 +563,7 @@ namespace Invercargill {
             if(!type.is_instantiatable()) {
                 throw new PromotionError.INVALID_PROMOTION_TYPE(@"Promotion type $(type.name()) is not instansiatable.");
             }
-            if(!type.is_a(typeof(PromotionWrapper))) {
+            if(!type.is_a(typeof(Promotion))) {
                 throw new PromotionError.INVALID_PROMOTION_TYPE(@"Promotion type $(type.name()) does not implement Invercargill.Promotion.");
             }
             if(!type.is_a(typeof(Enumerable)) && typeof(TPromotion) == type) {
@@ -571,11 +571,11 @@ namespace Invercargill {
             }
 
             var promotion = Object.new(type);
-            if(!((PromotionWrapper)promotion).call_can_wrap(element_type)) {
+            if(!((Promotion)promotion).call_can_wrap(element_type)) {
                 throw new PromotionError.INCOMPATIBLE_ELEMENT_TYPE(@"Enumerable has an element type of $(element_type.name()) which cannot be wrapped by $(type.name())");
             }
 
-            return ((PromotionWrapper<T, TPromotion>)promotion).call_wrap(this);
+            return ((Promotion<T, TPromotion>)promotion).call_wrap(this);
         }
 
         public virtual TPromotion assert_promotion<TPromotion>() {

+ 1 - 1
src/lib/Promotion.vala

@@ -22,7 +22,7 @@ namespace Invercargill {
     }
 
 
-    public interface PromotionWrapper<TSelf, T> : Enumerable<T>, Sticky<TSelf, T> {
+    public interface Promotion<TSelf, T> : Enumerable<T>, Sticky<TSelf, T> {
 
         protected abstract bool can_wrap(Type element_type);
         protected abstract TSelf wrap(Enumerable<T> enumerable);

+ 1 - 1
src/lib/Promotions/BinaryData.vala

@@ -46,7 +46,7 @@ namespace Invercargill {
         
     }
 
-    private class BinaryDataPromotionImplementation : StickyProxyPromotion<BinaryData, uint8>, PromotionWrapper<BinaryData, uint8>, Equatable<Enumerable<uint8>>, Hashable, BinaryData {
+    private class BinaryDataPromotionImplementation : StickyProxyPromotion<BinaryData, uint8>, Promotion<BinaryData, uint8>, Equatable<Enumerable<uint8>>, Hashable, BinaryData {
 
         protected override BinaryData adhere (Enumerable<uint8> enumerable) {
             return (BinaryData)new BinaryDataPromotionImplementation().wrap(enumerable);

+ 1 - 1
src/lib/Promotions/Numbers/Implementations.vala

@@ -1,6 +1,6 @@
 namespace Invercargill {
 
-    public class SignedNativeIntegers : Numbers<SignedNativeIntegers, int>, PromotionWrapper<SignedNativeIntegers, int> {
+    public class SignedNativeIntegers : Numbers<SignedNativeIntegers, int>, Promotion<SignedNativeIntegers, int> {
 
         protected override SignedNativeIntegers passthrough() {
             return this;

+ 1 - 1
src/lib/Promotions/Numbers/Numbers.vala

@@ -1,6 +1,6 @@
 namespace Invercargill {
 
-    public abstract class Numbers<TSelf, T> : StickyProxyPromotion<TSelf, T>, PromotionWrapper<TSelf, T>, Equatable<Enumerable<T>> {
+    public abstract class Numbers<TSelf, T> : StickyProxyPromotion<TSelf, T>, Promotion<TSelf, T>, Equatable<Enumerable<T>> {
 
         protected abstract bool greater_than(T a, T b);
         protected abstract bool less_than(T a, T b);

+ 1 - 1
src/lib/StickyProxyPromotion.vala

@@ -1,7 +1,7 @@
 
 namespace Invercargill {
 
-    public abstract class StickyProxyPromotion<TPromotion, T> : StickyProxy<TPromotion, T>, Sticky<TPromotion, T>, PromotionWrapper<TPromotion, T> {
+    public abstract class StickyProxyPromotion<TPromotion, T> : StickyProxy<TPromotion, T>, Sticky<TPromotion, T>, Promotion<TPromotion, T> {
         protected abstract bool can_wrap (GLib.Type element_type);
         protected virtual TPromotion wrap (Enumerable<T> enumerable) {
             inner = enumerable;