%template(ResObject_constPtr) intrusive_ptr; class ResObject : public Resolvable { public: typedef detail::ResObjectImplIf Impl; typedef ResObject Self; typedef ResTraits TraitsType; typedef intrusive_ptr Ptr; typedef TraitsType::constPtrType constPtr; public: Text summary() const; Text description() const; Text insnotify() const; Text delnotify() const; Text licenseToConfirm() const; Vendor vendor() const; ByteCount size() const; ByteCount downloadSize() const; Repository repository() const; unsigned mediaNr() const; bool installOnly() const; Date buildtime() const; Date installtime() const; protected: ResObject( const Kind & kind_r, const NVRAD & nvrad_r ); virtual ~ResObject(); }; %extend intrusive_ptr { // FIXME: this is just a workaround, see Kind.i const char* kindToS() { if (isKind(*self)) return "package"; else if (isKind(*self)) return "patch"; else if (isKind(*self)) return "product"; else if (isKind(*self)) return "pattern"; else if (isKind(*self)) return "language"; return "unknown"; } int __cmp__(intrusive_ptr& other) { return compareByNVRA(*self, other); } }