- added kind_to_s workaround for another kind
authorArvin Schnell <aschnell@suse.de>
Tue, 31 Jul 2007 13:47:33 +0000 (13:47 +0000)
committerArvin Schnell <aschnell@suse.de>
Tue, 31 Jul 2007 13:47:33 +0000 (13:47 +0000)
swig/ResObject.i

index e0d2c01..fcca8af 100644 (file)
@@ -30,3 +30,21 @@ class ResObject : public Resolvable
     virtual ~ResObject();
 };
 
+// FIXME: this is just a workaround, see Kind.i
+%extend intrusive_ptr<const ResObject> {
+    const char* kindToS()
+    {
+       if (isKind<Package>(*self))
+           return "package";
+       else if (isKind<Patch>(*self))
+           return "patch";
+       else if (isKind<Product>(*self))
+           return "product";
+       else if (isKind<Pattern>(*self))
+           return "pattern";
+       else if (isKind<Language>(*self))
+           return "language";
+       return "unknown";
+    }
+}
+