summaryrefslogtreecommitdiff
path: root/swig/ResTraits.i
diff options
context:
space:
mode:
authorMichael Andres <ma@suse.de>2008-09-05 16:43:40 +0000
committerMichael Andres <ma@suse.de>2008-09-05 16:43:40 +0000
commitc6fcfe47d295c4c8dabc469836fd6f4e87bbe529 (patch)
tree2c691fe1594ab99030eb49ad705dd8143549d7b5 /swig/ResTraits.i
parent743e0c0f0eb1aa853b24322e46c78bc7b981c14d (diff)
downloadlibzypp-bindings-c6fcfe47d295c4c8dabc469836fd6f4e87bbe529.tar.gz
libzypp-bindings-c6fcfe47d295c4c8dabc469836fd6f4e87bbe529.tar.bz2
libzypp-bindings-c6fcfe47d295c4c8dabc469836fd6f4e87bbe529.zip
Fix basic resolvabe attributes as needed by list_resolvables.py example.
Diffstat (limited to 'swig/ResTraits.i')
-rw-r--r--swig/ResTraits.i25
1 files changed, 16 insertions, 9 deletions
diff --git a/swig/ResTraits.i b/swig/ResTraits.i
index fcd6519..0b24cac 100644
--- a/swig/ResTraits.i
+++ b/swig/ResTraits.i
@@ -5,18 +5,25 @@
typedef KindOf<Resolvable> KindType;
};*/
-/** ResTraits. Defines common types and the Kind value. */
-template<typename _Res>
+namespace zypp
+{
+ /** ResTraits. Defines common types and the Kind value. */
+ template<typename _Res>
struct ResTraits
{
- typedef intrusive_ptr<_Res> PtrType;
- typedef intrusive_ptr<const _Res> constPtrType;
+ typedef zypp::intrusive_ptr<_Res> PtrType;
+ typedef zypp::intrusive_ptr<const _Res> constPtrType;
};
-%template(ResTraitsResolvable) ResTraits<Resolvable>;
+ typedef intrusive_ptr<const ResObject> ResObject_constPtr;
+ typedef intrusive_ptr<ResObject> ResObject_Ptr;
+ %template(ResObject_constPtr) intrusive_ptr<const zypp::ResObject>;
+ %template(ResObject_Ptr) intrusive_ptr<zypp::ResObject>;
+
+}
-%template(ResObject_constPtr) intrusive_ptr<const ResObject>;
-%template(ResObject_Ptr) intrusive_ptr<ResObject>;
+%template(ResTraitsResolvable) zypp::ResTraits<zypp::Resolvable>;
+%template(ResTraitsResObject) zypp::ResTraits<zypp::ResObject>;
// Common definitions for all Resolvable types
// - *_Ptr and *_constPtr
@@ -28,8 +35,8 @@ template<typename _Res>
typedef intrusive_ptr<const X> X##_constPtr;
typedef intrusive_ptr<X> X##_Ptr;
-%template(X##_constPtr) intrusive_ptr<const X>;
-%template(X##_Ptr) intrusive_ptr<X>;
+%template(X##_constPtr) zypp::intrusive_ptr<const X>;
+%template(X##_Ptr) zypp::intrusive_ptr<X>;
bool isKind##X( const Resolvable::constPtr & p );
bool isKind##X( const PoolItem & p );