Libzypp/Design/Resolvable/Interface
From openSUSE
< Libzypp | Design | Resolvable
[edit]
Interface to Resolvable
base::ReferenceCounted ^ Resolvable (identification and dependencies) ^ ResObject (common data, mostly UI driven: summary descrition...) ^ Package, ....(object specific data)
Resolvables are reference counted objects. They are usually created and provided by some kind of [wiki:Design/Source]. They are accessed via Ptr classes, which handle the reference counting.
The Ptr types are declared inside the classes:
Resolvable::Ptr (--> Resolvable*) Resolvable::constPtr (--> const Resolvable*) ResObject::Ptr ResObject::constPtr ...
Automatic conversion is the same as with ordinary pointer:
ResObject::Ptr can be used as ResObject::constPtr Resolvable::Ptr Resolvable::constPtr
ResObject::constPtr can be used as Resolvable::constPtr
Available casts are:
base::static_pointer_cast base::const_pointer_cast base::dynamic_pointer_cast
to be used the same was as you would do with ordinary pointers.
It is that simple to use.
Last edit in Trac '11/24/05 18:24:58' by 'kkaempf'
Last edit in Trac '11/24/05 18:24:58' by 'kkaempf'
Last edit in Trac '11/24/05 18:24:58' by 'kkaempf'
Last edit in Trac '11/24/05 18:24:58' by 'kkaempf'

