and pointer types. Compiles again, but need documentation.
Dependencies.h \
Edition.h \
ResKind.h \
+ ResObject.h \
Resolvable.h \
ResTraits.h \
Package.h \
Dependencies.cc \
Edition.cc \
ResKind.cc \
+ ResObject.cc \
Resolvable.cc \
ResTraits.cc \
Package.cc \
/** \file zypp/Message.cc
*
*/
-#include <iostream>
-
#include "zypp/Message.h"
-#include "zypp/detail/MessageImpl.h"
using namespace std;
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- IMPL_PTR_TYPE(Message)
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : Message::Message
// METHOD TYPE : Ctor
//
- Message::Message( detail::MessageImplPtr impl_r )
- : Resolvable( impl_r )
- , _pimpl( impl_r )
+ Message::Message( const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r )
+ : ResObject( ResKind("Message"), name_r, edition_r, arch_r )
{}
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
//
- // METHOD NAME : Message::text
- // Get the text of the message
+ // Message interface forwarded to implementation
//
+ ///////////////////////////////////////////////////////////////////
+
std::string Message::text()
- {
- return _pimpl->text();
- }
+ { return pimpl().text(); }
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : Message::text
- // Get the type of the message ("OK", "YesNo")
- //
std::string Message::type()
- {
- return _pimpl->type();
- }
+ { return pimpl().type(); }
/////////////////////////////////////////////////////////////////
} // namespace zypp
#ifndef ZYPP_MESSAGE_H
#define ZYPP_MESSAGE_H
-#include "zypp/Resolvable.h"
+#include "zypp/ResObject.h"
+#include "zypp/detail/MessageImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
- namespace detail
- { /////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(MessageImpl)
- /////////////////////////////////////////////////////////////////
- } // namespace detail
- ///////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(Message)
-
- ///////////////////////////////////////////////////////////////////
//
// CLASS NAME : Message
//
- /** Class representing the message to be shown during update */
- class Message : public Resolvable
+ /** Class representing the message to be shown during update.
+ */
+ class Message : public ResObject
{
public:
- /** Default ctor */
- Message( detail::MessageImplPtr impl_r );
- /** Dtor */
- ~Message();
+ typedef Message Self;
+ typedef detail::MessageImplIf Impl;
+ typedef base::intrusive_ptr<Self> Ptr;
+ typedef base::intrusive_ptr<const Self> constPtr;
+
public:
/** Get the text of the message */
std::string text();
/** Get the type of the message (YesNo / OK) */
std::string type();
+
+ protected:
+ /** Ctor */
+ Message( const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r );
+ /** Dtor */
+ virtual ~Message();
+
private:
- /** Pointer to implementation */
- detail::MessageImplPtr _pimpl;
+ /** Access implementation */
+ virtual Impl & pimpl() = 0;
+ /** Access implementation */
+ virtual const Impl & pimpl() const = 0;
};
/////////////////////////////////////////////////////////////////
/** \file zypp/Package.cc
*
*/
-#include <iostream>
-
#include "zypp/Package.h"
-#include "zypp/detail/PackageImpl.h"
using namespace std;
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- IMPL_PTR_TYPE(Package)
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : Package::Package
// METHOD TYPE : Ctor
//
- Package::Package( detail::PackageImplPtr impl_r )
- : Resolvable( impl_r )
- , _pimpl( impl_r )
+ Package::Package( const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r )
+ : ResObject( ResKind("Package"), name_r, edition_r, arch_r )
{}
///////////////////////////////////////////////////////////////////
Package::~Package()
{}
- std::string Package::summary() const
- { return _pimpl->summary(); }
+ ///////////////////////////////////////////////////////////////////
+ //
+ // Package interface forwarded to implementation
+ //
+ ///////////////////////////////////////////////////////////////////
+
- std::list<std::string> Package::description() const
- { return _pimpl->description(); }
/////////////////////////////////////////////////////////////////
} // namespace zypp
#ifndef ZYPP_PACKAGE_H
#define ZYPP_PACKAGE_H
-#include <list>
-
-#include "zypp/base/ReferenceCounted.h"
-#include "zypp/base/NonCopyable.h"
-
-#include "zypp/Resolvable.h"
+#include "zypp/ResObject.h"
+#include "zypp/detail/PackageImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- namespace detail
- { /////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(PackageImpl)
- /////////////////////////////////////////////////////////////////
- } // namespace detail
- ///////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(Package)
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : Package
//
- /** */
- class Package : public Resolvable
+ /** Package interface.
+ */
+ class Package : public ResObject
{
public:
- /** Default ctor */
- Package( detail::PackageImplPtr impl_r );
- /** Dtor */
- virtual ~Package();
+ typedef Package Self;
+ typedef detail::PackageImplIf Impl;
+ typedef base::intrusive_ptr<Self> Ptr;
+ typedef base::intrusive_ptr<const Self> constPtr;
public:
-
- /** */
- std::string summary() const;
/** */
- std::list<std::string> description() const;
+ // data here:
+
+ protected:
+ /** Ctor */
+ Package( const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r );
+ /** Dtor */
+ virtual ~Package();
private:
- /** Pointer to implementation */
- detail::PackageImplPtr _pimpl;
+ /** Access implementation */
+ virtual Impl & pimpl() = 0;
+ /** Access implementation */
+ virtual const Impl & pimpl() const = 0;
};
///////////////////////////////////////////////////////////////////
/** \file zypp/Patch.cc
*
*/
-#include <iostream>
-
#include "zypp/Patch.h"
-#include "zypp/detail/PatchImpl.h"
using namespace std;
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- IMPL_PTR_TYPE(Patch)
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : Patch::Patch
// METHOD TYPE : Ctor
//
- Patch::Patch( detail::PatchImplPtr impl_r )
- : Resolvable( impl_r )
- , _pimpl( impl_r )
- {
- }
+ Patch::Patch( const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r )
+ : ResObject( ResKind("Patch"), name_r, edition_r, arch_r )
+ {}
///////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////
//
- // METHOD NAME : Patch::id
- // Get the patch id
+ // Patch interface forwarded to implementation
//
- std::string Patch::id() const
- {
- return _pimpl->id();
- }
-
///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : Patch::id
- // Get the patch id
- //
- unsigned int Patch::timestamp() const
- {
- return _pimpl->timestamp();
- }
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : Patch::summary
- // Get the patch summary
- //
- std::string Patch::summary() const
- {
- return _pimpl->summary();
- }
+ std::string Patch::id() const
+ { return pimpl().id(); }
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : Patch::description
- // Get the patch description
- //
- std::list<std::string> Patch::description() const
- {
- return _pimpl->description();
- }
+ unsigned int Patch::timestamp() const
+ { return pimpl().timestamp(); }
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : Patch::category
- // Get the category of the patch
- //
std::string Patch::category() const
- {
- return _pimpl->category();
- }
+ { return pimpl().category(); }
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : Patch::reboot_needed
- // Check whether reboot is needed to finish the patch installation
- //
- bool Patch::reboot_needed() const {
- return _pimpl->reboot_needed();
- }
+ bool Patch::reboot_needed() const
+ { return pimpl().reboot_needed(); }
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : Patch::affects_pkg_manager
- // Check whether the patch installation affects package manager
- // (and it should be restarted after patch installation)
- //
- bool Patch::affects_pkg_manager() const {
- return _pimpl->affects_pkg_manager();
- }
+ bool Patch::affects_pkg_manager() const
+ { return pimpl().affects_pkg_manager(); }
+
+ Patch::AtomList Patch::atoms()
+ { return pimpl().all_atoms(); }
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : Patch::atoms
- // Get the list of all atoms building the patch
- //
- atom_list Patch::atoms() const {
- return _pimpl->all_atoms();
- }
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : Patch::interactive
- // Check whether patch can be applied only interactivly
- //
bool Patch::interactive()
- {
- return _pimpl->interactive();
- }
+ { return pimpl().interactive(); }
void Patch::mark_atoms_to_freshen(bool freshen)
- {
- _pimpl->mark_atoms_to_freshen(freshen);
- }
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : Patch::any_atom_selected
- // Check whether there is at least one atom of the solution selected
- //
+ { pimpl().mark_atoms_to_freshen(freshen); }
+
bool Patch::any_atom_selected()
- {
- return _pimpl->any_atom_selected();
- }
+ { return pimpl().any_atom_selected(); }
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : Patch::select
- // Mark all atoms to be updated (set them as freshen) and mark
- // the patch itself as selected for being installed/updated
- //
- // FIXME to be changed to inherit Resolvable's method
void Patch::select()
-// : Resolvable::select()
- {
- mark_atoms_to_freshen(true); // FIXME
- }
+ { pimpl().mark_atoms_to_freshen(true); }
/////////////////////////////////////////////////////////////////
} // namespace zypp
#ifndef ZYPP_PATCH_H
#define ZYPP_PATCH_H
-#include <list>
-
-#include "zypp/Resolvable.h"
+#include "zypp/ResObject.h"
+#include "zypp/detail/PatchImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
- namespace detail
- { /////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(PatchImpl)
- /////////////////////////////////////////////////////////////////
- } // namespace detail
- ///////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(Patch)
-
- #define atom_list std::list<ResolvablePtr>
-
- ///////////////////////////////////////////////////////////////////
//
// CLASS NAME : Patch
//
- /** Class representing a patch */
- class Patch : public Resolvable
+ /** Class representing a patch.
+ * \todo Patch::atoms can't be const, if Impl does not
+ * provide a const method. Check it.
+ */
+ class Patch : public ResObject
{
public:
- /** Default ctor */
- Patch( detail::PatchImplPtr impl_r );
- /** Dtor */
- ~Patch();
+ typedef Patch Self;
+ typedef detail::PatchImplIf Impl;
+ typedef base::intrusive_ptr<Self> Ptr;
+ typedef base::intrusive_ptr<const Self> constPtr;
+
+ public:
+ typedef Impl::AtomList AtomList;
+
public:
/** Patch ID */
std::string id() const;
/** Patch time stamp */
unsigned int timestamp() const;
- /** Patch summary */
- std::string summary() const;
- /** Patch description */
- std::list<std::string> description() const;
/** Patch category (recommended, security,...) */
std::string category() const;
/** Does the system need to reboot to finish the update process? */
/** Does the patch affect the package manager itself? */
bool affects_pkg_manager() const;
/** The list of all atoms building the patch */
- atom_list atoms() const;
+ AtomList atoms();
/** Is the patch installation interactive? (does it need user input?) */
bool interactive();
// TODO add comments and reevaluate the need for functions below
void mark_atoms_to_freshen(bool freshen);
bool any_atom_selected();
void select(); // TODO parameter to specify select/unselect or another function
+
+ protected:
+ /** Ctor */
+ Patch( const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r );
+ /** Dtor */
+ virtual ~Patch();
+
private:
- /** Pointer to implementation */
- detail::PatchImplPtr _pimpl;
+ /** Access implementation */
+ virtual Impl & pimpl() = 0;
+ /** Access implementation */
+ virtual const Impl & pimpl() const = 0;
};
/////////////////////////////////////////////////////////////////
#include <iostream>
#include "zypp/Product.h"
-#include "zypp/detail/ProductImpl.h"
using namespace std;
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- IMPL_PTR_TYPE(Product)
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : Product::Product
// METHOD TYPE : Ctor
//
- Product::Product( detail::ProductImplPtr impl_r )
- : Resolvable( impl_r )
- , _pimpl( impl_r )
+ Product::Product( const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r )
+ : ResObject( ResKind("Product"), name_r, edition_r, arch_r )
{}
///////////////////////////////////////////////////////////////////
Product::~Product()
{}
- std::list<std::string> Product::description() const
- {
- return _pimpl->description();
- }
///////////////////////////////////////////////////////////////////
//
- // METHOD NAME : Product::do_script
- // Get the product category
+ // Package interface forwarded to implementation
//
- std::string Product::category()
- {
- return _pimpl->category();
- }
+ ///////////////////////////////////////////////////////////////////
+
+ std::string Product::category() const
+ { return pimpl().category(); }
/////////////////////////////////////////////////////////////////
} // namespace zypp
#ifndef ZYPP_PRODUCT_H
#define ZYPP_PRODUCT_H
-#include "zypp/Resolvable.h"
-#include <list>
-#include <string>
+#include "zypp/ResObject.h"
+#include "zypp/detail/ProductImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
- namespace detail
- { /////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(ProductImpl)
- /////////////////////////////////////////////////////////////////
- } // namespace detail
- ///////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(Product)
-
- ///////////////////////////////////////////////////////////////////
//
- // CLASS NAME : Product
+ // CLASS NAME : ResObject
//
- /** Class representing an update script */
- class Product : public Resolvable
+ /** Product interface.
+ */
+ class Product : public ResObject
{
public:
- /** Default ctor */
- Product( detail::ProductImplPtr impl_r );
- /** Dtor */
- ~Product();
+ typedef Product Self;
+ typedef detail::ProductImplIf Impl;
+ typedef base::intrusive_ptr<Self> Ptr;
+ typedef base::intrusive_ptr<const Self> constPtr;
+
public:
- /** Get the product description */
- std::list<std::string> description() const;
/** Get the product categoty (base, add-on) */
- std::string category();
+ std::string category() const;
+
+ protected:
+ /** Ctor */
+ Product( const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r );
+ /** Dtor */
+ virtual ~Product();
+
private:
- /** Pointer to implementation */
- detail::ProductImplPtr _pimpl;
+ /** Access implementation */
+ virtual Impl & pimpl() = 0;
+ /** Access implementation */
+ virtual const Impl & pimpl() const = 0;
};
/////////////////////////////////////////////////////////////////
--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/ResObject.cc
+ *
+*/
+#include "zypp/ResObject.h"
+
+using namespace std;
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : ResObject::ResObject
+ // METHOD TYPE : Ctor
+ //
+ ResObject::ResObject( const ResKind & kind_r,
+ const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r )
+ : Resolvable( kind_r, name_r, edition_r, arch_r )
+ {}
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : ResObject::~ResObject
+ // METHOD TYPE : Dtor
+ //
+ ResObject::~ResObject()
+ {}
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // ResObject interface forwarded to implementation
+ //
+ ///////////////////////////////////////////////////////////////////
+
+ string ResObject::summary() const
+ { return pimpl().summary(); }
+
+ text ResObject::description() const
+ { return pimpl().description(); }
+
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/ResObject.h
+ *
+*/
+#ifndef ZYPP_RESOBJECT_H
+#define ZYPP_RESOBJECT_H
+
+#include "zypp/Resolvable.h"
+#include "zypp/detail/ResObjectImplIf.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : ResObject
+ //
+ /** Interface base for resolvable objects (common data).
+ */
+ class ResObject : public Resolvable
+ {
+ public:
+ typedef ResObject Self;
+ typedef detail::ResObjectImplIf Impl;
+ typedef base::intrusive_ptr<Self> Ptr;
+ typedef base::intrusive_ptr<const Self> constPtr;
+
+ public:
+ /** */
+ line summary() const;
+ /** */
+ text description() const;
+
+ protected:
+ /** Ctor */
+ ResObject( const ResKind & kind_r,
+ const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r );
+ /** Dtor */
+ virtual ~ResObject();
+
+ private:
+ /** Access implementation */
+ virtual Impl & pimpl() = 0;
+ /** Access implementation */
+ virtual const Impl & pimpl() const = 0;
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_RESOBJECT_H
*
*/
+#include "zypp/ResTraits.h"
+#include "zypp/ResKind.h"
+
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
-
+ const ResKind ResTraits<Package> ::_kind( "Package" );
+ const ResKind ResTraits<Selection>::_kind( "Selection" );
+ const ResKind ResTraits<Product> ::_kind( "Product" );
+ const ResKind ResTraits<Patch> ::_kind( "Patch" );
+ const ResKind ResTraits<Script> ::_kind( "Script" );
+ const ResKind ResTraits<Message> ::_kind( "Message" );
/////////////////////////////////////////////////////////////////
} // namespace zypp
#ifndef ZYPP_RESTRAITS_H
#define ZYPP_RESTRAITS_H
-#include "zypp/ResKind.h"
-
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
+ class ResKind;
+
template<typename _Res>
- class ResTraits;
+ class ResTraits {};
class Package;
template<>
/** \file zypp/Resolvable.cc
*
*/
+#include <iostream>
+
#include "zypp/Resolvable.h"
#include "zypp/detail/ResolvableImpl.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- IMPL_PTR_TYPE(Resolvable)
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : Resolvable::Resolvable
// METHOD TYPE : Ctor
//
- Resolvable::Resolvable( detail::ResolvableImplPtr impl_r )
- : _pimpl( impl_r )
+ Resolvable::Resolvable( const ResKind & kind_r,
+ const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r )
+ : _pimpl( new Impl( kind_r, name_r, edition_r, arch_r ) )
{}
///////////////////////////////////////////////////////////////////
Resolvable::~Resolvable()
{}
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : Resolvable::dumpOn
+ // METHOD TYPE : std::ostream
+ //
+ std::ostream & Resolvable::dumpOn( std::ostream & str ) const
+ {
+ return str << '[' << kind() << ']'
+ << name() << '-' << edition() << '.' << arch();
+ }
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // Resolvable interface forwarded to implementation
+ //
+ ///////////////////////////////////////////////////////////////////
+
const ResKind & Resolvable::kind() const
{ return _pimpl->kind(); }
void Resolvable::setDeps( const Dependencies & val_r )
{ _pimpl->setDeps( val_r ); }
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : Resolvable::~Resolvable
- // METHOD TYPE : Dtor
- //
- detail::constResolvableImplPtr Resolvable::sayFriend() const
- { return _pimpl; }
-
- /******************************************************************
- **
- ** FUNCTION NAME : operator<<
- ** FUNCTION TYPE : std::ostream &
- */
- std::ostream & operator<<( std::ostream & str, const Resolvable & obj )
- {
- return str << *obj.sayFriend();
- }
-
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
#include "zypp/base/ReferenceCounted.h"
#include "zypp/base/NonCopyable.h"
+#include <zypp/base/PtrTypes.h>
-#include "zypp/ResolvableFwd.h"
+#include "zypp/ResKind.h"
+#include "zypp/Edition.h"
+#include "zypp/Arch.h"
+#include "zypp/Dependencies.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- namespace detail
- { /////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(ResolvableImpl)
- /////////////////////////////////////////////////////////////////
- } // namespace detail
- ///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : Resolvable
//
- /**
+ /** Interface base for resolvable objects (identification and depndencies).
* \todo Solve ResKind problems via traits template?
*/
class Resolvable : public base::ReferenceCounted, private base::NonCopyable
{
public:
- /** Ctor */
- Resolvable( detail::ResolvableImplPtr impl_r );
- /** Dtor */
- virtual ~Resolvable();
+ typedef Resolvable Self;
+ typedef base::intrusive_ptr<Self> Ptr;
+ typedef base::intrusive_ptr<const Self> constPtr;
+ friend std::ostream & operator<<( std::ostream & str, const Resolvable & obj );
public:
/** */
/** */
void setDeps( const Dependencies & val_r );
+ protected:
+ /** Ctor */
+ Resolvable( const ResKind & kind_r,
+ const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r );
+ /** Dtor */
+ virtual ~Resolvable();
+ /** Helper for stream output */
+ virtual std::ostream & dumpOn( std::ostream & str ) const;
+
private:
+ /** Implementation */
+ struct Impl;
/** Pointer to implementation */
- detail::ResolvableImplPtr _pimpl;
- public:
- /** Avoid a bunch of friend decl. */
- detail::constResolvableImplPtr sayFriend() const;
+ base::ImplPtr<Impl> _pimpl;
};
///////////////////////////////////////////////////////////////////
- /** \relates Resolvable Stream output */
- extern std::ostream & operator<<( std::ostream & str, const Resolvable & obj );
+ /** Required by base::intrusive_ptr to add a reference. */
+ inline void intrusive_ptr_add_ref( const Resolvable * ptr_r )
+ { base::ReferenceCounted::add_ref( ptr_r ); }
+
+ /** Required by base::intrusive_ptr to release a reference. */
+ inline void intrusive_ptr_release( const Resolvable * ptr_r )
+ { base::ReferenceCounted::release( ptr_r ); }
+
+ /** \relates Resolvable Stream output via Resolvable::dumpOn */
+ inline std::ostream & operator<<( std::ostream & str, const Resolvable & obj )
+ { return obj.dumpOn( str ); }
/////////////////////////////////////////////////////////////////
} // namespace zypp
/** \file zypp/Script.cc
*
*/
-#include <iostream>
-
#include "zypp/Script.h"
-#include "zypp/detail/ScriptImpl.h"
using namespace std;
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- IMPL_PTR_TYPE(Script)
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : Script::Script
// METHOD TYPE : Ctor
//
- Script::Script( detail::ScriptImplPtr impl_r )
- : Resolvable( impl_r )
- , _pimpl( impl_r )
+ Script::Script( const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r )
+ : ResObject( ResKind("Script"), name_r, edition_r, arch_r )
{}
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
//
- // METHOD NAME : Script::do_script
- // Get the script to perform the action
+ // Script interface forwarded to implementation
//
+ ///////////////////////////////////////////////////////////////////
+
std::string Script::do_script()
- {
- return _pimpl->do_script();
- }
+ { return pimpl().do_script(); }
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : Script::undo_script
- // Get the script to revert the action
- //
std::string Script::undo_script()
- {
- return _pimpl->undo_script();
- }
+ { return pimpl().undo_script(); }
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : Script::undo_available
- // Check whether the action can be reverted
- //
bool Script::undo_available()
- {
- return _pimpl->undo_available();
- }
+ { return pimpl().undo_available(); }
/////////////////////////////////////////////////////////////////
} // namespace zypp
#ifndef ZYPP_SCRIPT_H
#define ZYPP_SCRIPT_H
-#include "zypp/Resolvable.h"
+#include "zypp/ResObject.h"
+#include "zypp/detail/ScriptImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
- namespace detail
- { /////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(ScriptImpl)
- /////////////////////////////////////////////////////////////////
- } // namespace detail
- ///////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(Script)
-
- ///////////////////////////////////////////////////////////////////
//
// CLASS NAME : Script
//
- /** Class representing an update script */
- class Script : public Resolvable
+ /** Class representing an update script.
+ */
+ class Script : public ResObject
{
public:
- /** Default ctor */
- Script( detail::ScriptImplPtr impl_r );
- /** Dtor */
- ~Script();
+ typedef Script Self;
+ typedef detail::ScriptImplIf Impl;
+ typedef base::intrusive_ptr<Self> Ptr;
+ typedef base::intrusive_ptr<const Self> constPtr;
+
public:
/** Get the script to perform the change */
std::string do_script();
std::string undo_script();
/** Check whether script to undo the change is available */
bool undo_available();
+
+ protected:
+ /** Ctor */
+ Script( const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r );
+ /** Dtor */
+ virtual ~Script();
+
private:
- /** Pointer to implementation */
- detail::ScriptImplPtr _pimpl;
+ /** Access implementation */
+ virtual Impl & pimpl() = 0;
+ /** Access implementation */
+ virtual const Impl & pimpl() const = 0;
};
/////////////////////////////////////////////////////////////////
#include <iostream>
#include "zypp/Selection.h"
-#include "zypp/detail/SelectionImpl.h"
using namespace std;
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- IMPL_PTR_TYPE(Selection)
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : Selection::Selection
// METHOD TYPE : Ctor
//
- Selection::Selection( detail::SelectionImplPtr impl_r )
- : Resolvable( impl_r )
- , _pimpl( impl_r )
+ Selection::Selection( const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r )
+ : ResObject( ResKind("Selection"), name_r, edition_r, arch_r )
{}
///////////////////////////////////////////////////////////////////
Selection::~Selection()
{}
- std::string Selection::summary() const
- { return _pimpl->summary(); }
+ ///////////////////////////////////////////////////////////////////
+ //
+ // Selection interface forwarded to implementation
+ //
+ ///////////////////////////////////////////////////////////////////
- std::list<std::string> Selection::description() const
- { return _pimpl->description(); }
/////////////////////////////////////////////////////////////////
} // namespace zypp
#ifndef ZYPP_SELECTION_H
#define ZYPP_SELECTION_H
-#include <list>
-
-#include "zypp/base/ReferenceCounted.h"
-#include "zypp/base/NonCopyable.h"
-
-#include "zypp/Resolvable.h"
+#include "zypp/ResObject.h"
+#include "zypp/detail/SelectionImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- namespace detail
- { /////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(SelectionImpl)
- /////////////////////////////////////////////////////////////////
- } // namespace detail
- ///////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(Selection)
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : Selection
//
- /** */
- class Selection : public Resolvable
+ /** Selection interface.
+ */
+ class Selection : public ResObject
{
public:
- /** Default ctor */
- Selection( detail::SelectionImplPtr impl_r );
- /** Dtor */
- virtual ~Selection();
+ typedef Selection Self;
+ typedef detail::SelectionImplIf Impl;
+ typedef base::intrusive_ptr<Self> Ptr;
+ typedef base::intrusive_ptr<const Self> constPtr;
public:
-
- /** */
- std::string summary() const;
/** */
- std::list<std::string> description() const;
+ // data here:
+
+ protected:
+ /** Ctor */
+ Selection( const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r );
+ /** Dtor */
+ virtual ~Selection();
private:
- /** Pointer to implementation */
- detail::SelectionImplPtr _pimpl;
+ /** Access implementation */
+ virtual Impl & pimpl() = 0;
+ /** Access implementation */
+ virtual const Impl & pimpl() const = 0;
};
///////////////////////////////////////////////////////////////////
include_HEADERS = \
ResolvableImpl.h \
+ ResObjectImplIf.h \
+ PackageImplIf.h \
PackageImpl.h \
+ SelectionImplIf.h \
SelectionImpl.h \
+ MessageImplIf.h \
MessageImpl.h \
+ ScriptImplIf.h \
ScriptImpl.h \
+ PatchImplIf.h \
PatchImpl.h \
+ ProductImplIf.h \
ProductImpl.h
///////////////////////////////////////////////////////////////////
namespace detail
{ /////////////////////////////////////////////////////////////////
- IMPL_PTR_TYPE(MessageImpl)
///////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////
/** Default ctor */
- MessageImpl::MessageImpl( const std::string & name_r,
- const Edition & edition_r,
- const Arch & arch_r )
- : ResolvableImpl( ResKind( "message" ),
- name_r,
- edition_r,
- arch_r )
- {
- }
+ MessageImpl::MessageImpl()
+ {}
/** Dtor */
MessageImpl::~MessageImpl()
- {
- }
+ {}
std::string MessageImpl::type() const {
return _type;
#ifndef ZYPP_DETAIL_MESSAGEIMPL_H
#define ZYPP_DETAIL_MESSAGEIMPL_H
-#include "zypp/detail/ResolvableImpl.h"
+#include "zypp/detail/MessageImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
///////////////////////////////////////////////////////////////////
namespace detail
{ /////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(MessageImpl)
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : MessageImpl
//
/** Class representing the message to be shown during update */
- class MessageImpl : public ResolvableImpl
+ class MessageImpl : public MessageImplIf
{
public:
/** Default ctor */
- MessageImpl( const std::string & name_r,
- const Edition & edition_r,
- const Arch & arch_r );
+ MessageImpl();
/** Dtor */
- ~MessageImpl();
+ virtual ~MessageImpl();
public:
/** Get the text of the message */
--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/detail/MessageImplIf.h
+ *
+*/
+#ifndef ZYPP_DETAIL_MESSAGEIMPLIF_H
+#define ZYPP_DETAIL_MESSAGEIMPLIF_H
+
+#include "zypp/detail/ResObjectImplIf.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+ class Message;
+
+ ///////////////////////////////////////////////////////////////////
+ namespace detail
+ { /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : MessageImplIf
+ //
+ /** Abstact Message implementation interface.
+ */
+ class MessageImplIf : public ResObjectImplIf
+ {
+ public:
+ typedef Message ResType;
+
+ public:
+ /** Get the text of the message */
+ virtual std::string text() const = 0;
+ /** Get the type of the message (YesNo / OK) */
+ virtual std::string type() const = 0;
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace detail
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_DETAIL_MESSAGEIMPLIF_H
/** \file zypp/detail/PackageImpl.cc
*
*/
-#include <iostream>
-
#include "zypp/detail/PackageImpl.h"
using namespace std;
///////////////////////////////////////////////////////////////////
namespace detail
{ /////////////////////////////////////////////////////////////////
- IMPL_PTR_TYPE(PackageImpl)
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : PackageImpl::PackageImpl
// METHOD TYPE : Ctor
//
- PackageImpl::PackageImpl( const std::string & name_r,
- const Edition & edition_r,
- const Arch & arch_r )
- : ResolvableImpl( ResKind("package"), name_r, edition_r, arch_r )
+ PackageImpl::PackageImpl()
{}
///////////////////////////////////////////////////////////////////
PackageImpl::~PackageImpl()
{}
- std::string PackageImpl::summary() const
- { return std::string(); }
-
- std::list<std::string> PackageImpl::description() const
- { return std::list<std::string>(); }
-
/////////////////////////////////////////////////////////////////
} // namespace detail
///////////////////////////////////////////////////////////////////
#ifndef ZYPP_DETAIL_PACKAGEIMPL_H
#define ZYPP_DETAIL_PACKAGEIMPL_H
-#include <list>
-
-#include "zypp/detail/ResolvableImpl.h"
+#include "zypp/detail/PackageImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
///////////////////////////////////////////////////////////////////
namespace detail
{ /////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(PackageImpl)
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : PackageImpl
//
- /** */
- class PackageImpl : public ResolvableImpl
+ /**
+ */
+ class PackageImpl : public PackageImplIf
{
public:
- /** */
- PackageImpl( const std::string & name_r,
- const Edition & edition_r,
- const Arch & arch_r );
- /** Dtor */
+ PackageImpl();
virtual ~PackageImpl();
-
- public:
- /** */
- virtual std::string summary() const;
- /** */
- virtual std::list<std::string> description() const;
-#if 0
- /** */
- virtual std::list<std::string> insnotify() const;
- /** */
- virtual std::list<std::string> delnotify() const;
- /** */
- virtual FSize size() const;
- /** */
- virtual bool providesSources() const;
- /** */
- virtual std::string instSrcLabel() const;
- /** */
- virtual Vendor instSrcVendor() const;
- /** */
- virtual unsigned instSrcRank() const;
- /** */
- virtual PkgSplitSet splitprovides() const;
- /** */
- virtual Date buildtime() const;
- /** */
- virtual std::string buildhost() const;
- /** */
- virtual Date installtime() const;
- /** */
- virtual std::string distribution() const;
- /** */
- virtual Vendor vendor() const;
- /** */
- virtual std::string license() const;
- /** */
- virtual std::list<std::string> licenseToConfirm() const;
- /** */
- virtual std::string packager() const;
- /** */
- virtual std::string group() const;
- /** */
- virtual YStringTreeItem * group_ptr() const;
- /** */
- virtual std::list<std::string> changelog() const;
- /** */
- virtual std::string url() const;
- /** */
- virtual std::string os() const;
- /** */
- virtual std::list<std::string> prein() const;
- /** */
- virtual std::list<std::string> postin() const;
- /** */
- virtual std::list<std::string> preun() const;
- /** */
- virtual std::list<std::string> postun() const;
- /** */
- virtual std::string sourceloc() const;
- /** */
- virtual FSize sourcesize() const;
- /** */
- virtual FSize archivesize() const;
- /** */
- virtual std::list<std::string> authors() const;
- /** */
- virtual std::list<std::string> filenames() const;
- /** */
- virtual std::list<std::string> recommends() const;
- /** */
- virtual std::list<std::string> suggests() const;
- /** */
- virtual std::string location() const;
- /** */
- virtual unsigned int medianr() const;
- /** */
- virtual std::list<std::string> keywords() const;
- /** */
- virtual std::string md5sum() const;
- /** */
- virtual std::string externalUrl() const;
- /** */
- virtual std::list<PkgEdition> patchRpmBaseVersions() const;
- /** */
- virtual FSize patchRpmSize() const;
- /** */
- virtual bool forceInstall() const;
- /** */
- virtual std::string patchRpmMD5() const;
- /** */
- virtual bool isRemote() const;
- /** */
- virtual PMError providePkgToInstall( Pathname& path_r ) const;
- /** */
- virtual PMError provideSrcPkgToInstall( Pathname& path_r ) const;
- /** */
- virtual constInstSrcPtr source() const;
- /** */
- virtual bool prefererCandidate() const;
- /** */
- virtual void du( PkgDu & dudata_r ) const;
- /** */
- virtual std::list<PMPackageDelta> deltas() const;
-#endif
};
///////////////////////////////////////////////////////////////////
--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/detail/PackageImplIf.h
+ *
+*/
+#ifndef ZYPP_DETAIL_PACKAGEIMPLIF_H
+#define ZYPP_DETAIL_PACKAGEIMPLIF_H
+
+#include "zypp/detail/ResObjectImplIf.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+ class Package;
+
+ ///////////////////////////////////////////////////////////////////
+ namespace detail
+ { /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : PackageImplIf
+ //
+ /** Abstact Package implementation interface.
+ */
+ class PackageImplIf : public ResObjectImplIf
+ {
+ public:
+ typedef Package ResType;
+
+ public:
+#if 0
+ /** */
+ virtual std::list<std::string> insnotify() const;
+ /** */
+ virtual std::list<std::string> delnotify() const;
+ /** */
+ virtual FSize size() const;
+ /** */
+ virtual bool providesSources() const;
+ /** */
+ virtual std::string instSrcLabel() const;
+ /** */
+ virtual Vendor instSrcVendor() const;
+ /** */
+ virtual unsigned instSrcRank() const;
+ /** */
+ virtual PkgSplitSet splitprovides() const;
+ /** */
+ virtual Date buildtime() const;
+ /** */
+ virtual std::string buildhost() const;
+ /** */
+ virtual Date installtime() const;
+ /** */
+ virtual std::string distribution() const;
+ /** */
+ virtual Vendor vendor() const;
+ /** */
+ virtual std::string license() const;
+ /** */
+ virtual std::list<std::string> licenseToConfirm() const;
+ /** */
+ virtual std::string packager() const;
+ /** */
+ virtual std::string group() const;
+ /** */
+ virtual YStringTreeItem * group_ptr() const;
+ /** */
+ virtual std::list<std::string> changelog() const;
+ /** */
+ virtual std::string url() const;
+ /** */
+ virtual std::string os() const;
+ /** */
+ virtual std::list<std::string> prein() const;
+ /** */
+ virtual std::list<std::string> postin() const;
+ /** */
+ virtual std::list<std::string> preun() const;
+ /** */
+ virtual std::list<std::string> postun() const;
+ /** */
+ virtual std::string sourceloc() const;
+ /** */
+ virtual FSize sourcesize() const;
+ /** */
+ virtual FSize archivesize() const;
+ /** */
+ virtual std::list<std::string> authors() const;
+ /** */
+ virtual std::list<std::string> filenames() const;
+ /** */
+ virtual std::list<std::string> recommends() const;
+ /** */
+ virtual std::list<std::string> suggests() const;
+ /** */
+ virtual std::string location() const;
+ /** */
+ virtual unsigned int medianr() const;
+ /** */
+ virtual std::list<std::string> keywords() const;
+ /** */
+ virtual std::string md5sum() const;
+ /** */
+ virtual std::string externalUrl() const;
+ /** */
+ virtual std::list<PkgEdition> patchRpmBaseVersions() const;
+ /** */
+ virtual FSize patchRpmSize() const;
+ /** */
+ virtual bool forceInstall() const;
+ /** */
+ virtual std::string patchRpmMD5() const;
+ /** */
+ virtual bool isRemote() const;
+ /** */
+ virtual PMError providePkgToInstall( Pathname& path_r ) const;
+ /** */
+ virtual PMError provideSrcPkgToInstall( Pathname& path_r ) const;
+ /** */
+ virtual constInstSrcPtr source() const;
+ /** */
+ virtual bool prefererCandidate() const;
+ /** */
+ virtual void du( PkgDu & dudata_r ) const;
+ /** */
+ virtual std::list<PMPackageDelta> deltas() const;
+#endif
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace detail
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_DETAIL_PACKAGEIMPLIF_H
///////////////////////////////////////////////////////////////////
namespace detail
{ /////////////////////////////////////////////////////////////////
- IMPL_PTR_TYPE(PatchImpl)
///////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////
/** Default ctor */
- PatchImpl::PatchImpl( const std::string & name_r,
- const Edition & edition_r,
- const Arch & arch_r )
- : ResolvableImpl( ResKind( "patch" ),
- name_r,
- edition_r,
- arch_r )
- {
- }
+ PatchImpl::PatchImpl()
+ {}
/** Dtor */
PatchImpl::~PatchImpl()
- {
- }
+ {}
std::string PatchImpl::id() const
{
DBG << "Patch needs reboot" << endl;
return true;
}
- atom_list not_installed = not_installed_atoms();
- for (atom_list::iterator it = not_installed.begin();
+ AtomList not_installed = not_installed_atoms();
+ for (AtomList::iterator it = not_installed.begin();
it != not_installed.end();
it++)
{
// Resolvable*
// Resolvable
// ResolvablePtr
- Package* p = (Package*)&**it;
+
+
+ // <ma> never do somthing like this!!!
+// Package* p = (Package*)&**it;
+ //
+ // (*it) is a ResolvablePtr
+
+
+
+
// FIXME use the condition
// if (p->licenseToConfirm() != "")
if (false)
return false;
}
- atom_list PatchImpl::all_atoms() {
+ PatchImpl::AtomList PatchImpl::all_atoms() {
return _atoms;
}
- atom_list PatchImpl::not_installed_atoms() {
- atom_list ret;
- for (atom_list::iterator it = _atoms.begin();
+ PatchImpl::AtomList PatchImpl::not_installed_atoms() {
+ AtomList ret;
+ for (AtomList::iterator it = _atoms.begin();
it != _atoms.end();
it++)
{
// TODO check necessarity of functions below
bool PatchImpl::any_atom_selected() {
- for (atom_list::iterator it = _atoms.begin();
+ for (AtomList::iterator it = _atoms.begin();
it != _atoms.end();
it++)
{
}
void PatchImpl::mark_atoms_to_freshen( bool freshen ) {
- for (atom_list::iterator it = _atoms.begin();
+ for (AtomList::iterator it = _atoms.begin();
it != _atoms.end();
it++)
{
#ifndef ZYPP_DETAIL_PATCHIMPL_H
#define ZYPP_DETAIL_PATCHIMPL_H
-#include <list>
-#include <string>
-
-#include "zypp/detail/ResolvableImpl.h"
-#include "zypp/Resolvable.h"
-#include "zypp/Patch.h" // contains atom_list macro
+#include "zypp/detail/PatchImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
///////////////////////////////////////////////////////////////////
namespace detail
{ /////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(PatchImpl)
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : PatchImpl
//
- /** Class representing a patch */
- class PatchImpl : public ResolvableImpl
+ /** Class representing a patch
+ * \todo Get rid of string based ResKind detection in e.g.
+ * PatchImpl::interactive. Esp. DO NOT CAST ResKind to std::string.
+ */
+ class PatchImpl : public PatchImplIf
{
public:
/** Default ctor */
- PatchImpl( const std::string & name_r,
- const Edition & edition_r,
- const Arch & arch_r );
+ PatchImpl();
/** Dtor */
~PatchImpl();
/** Is the patch installation interactive? (does it need user input?) */
bool interactive();
/** The list of all atoms building the patch */
- atom_list all_atoms();
+ AtomList all_atoms();
/** The list of those atoms which have not been installed */
- atom_list not_installed_atoms();
+ AtomList not_installed_atoms();
// TODO check necessarity of functions below
bool any_atom_selected();
/** Does the patch affect the package manager itself? */
bool _affects_pkg_manager;
/** The list of all atoms building the patch */
- atom_list _atoms;
+ AtomList _atoms;
};
///////////////////////////////////////////////////////////////////
--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/detail/PatchImplIf.h
+ *
+*/
+#ifndef ZYPP_DETAIL_PATCHIMPLIF_H
+#define ZYPP_DETAIL_PATCHIMPLIF_H
+
+#include "zypp/detail/ResObjectImplIf.h"
+#include "zypp/Resolvable.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+ class Patch;
+
+ ///////////////////////////////////////////////////////////////////
+ namespace detail
+ { /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : PatchImplIf
+ //
+ /** Abstact Patch implementation interface.
+ */
+ class PatchImplIf : public ResObjectImplIf
+ {
+ public:
+ typedef Patch ResType;
+
+ public:
+ typedef std::list<Resolvable::Ptr> AtomList;
+
+ public:
+ /** Patch ID */
+ virtual std::string id() const = 0;
+ /** Patch time stamp */
+ virtual unsigned int timestamp() const = 0;
+ /** Patch category (recommended, security,...) */
+ virtual std::string category() const = 0;
+ /** Does the system need to reboot to finish the update process? */
+ virtual bool reboot_needed() const = 0;
+ /** Does the patch affect the package manager itself? */
+ virtual bool affects_pkg_manager() const = 0;
+
+ /** Is the patch installation interactive? (does it need user input?) */
+ virtual bool interactive() = 0;
+ /** The list of all atoms building the patch */
+ virtual AtomList all_atoms() = 0;
+ /** The list of those atoms which have not been installed */
+ virtual AtomList not_installed_atoms() = 0;
+
+// TODO check necessarity of functions below
+ virtual void mark_atoms_to_freshen(bool freshen) = 0;
+ virtual bool any_atom_selected() = 0;
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace detail
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_DETAIL_PATCHIMPLIF_H
///////////////////////////////////////////////////////////////////
namespace detail
{ /////////////////////////////////////////////////////////////////
- IMPL_PTR_TYPE(ProductImpl)
///////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////
/** Default ctor */
- ProductImpl::ProductImpl( const std::string & name_r,
- const Edition & edition_r,
- const Arch & arch_r )
- : ResolvableImpl( ResKind( "script"),
- name_r,
- edition_r,
- arch_r )
- {
- }
+ ProductImpl::ProductImpl()
+ {}
/** Dtor */
ProductImpl::~ProductImpl()
- {
- }
-
- std::list<std::string> ProductImpl::description() const
- {
- return _description;
- }
+ {}
std::string ProductImpl::category() const {
return _category;
#ifndef ZYPP_DETAIL_PRODUCTIMPL_H
#define ZYPP_DETAIL_PRODUCTIMPL_H
-#include <list>
-#include <string>
-
-#include "zypp/detail/ResolvableImpl.h"
+#include "zypp/detail/ProductImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
+
///////////////////////////////////////////////////////////////////
namespace detail
{ /////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(ProductImpl)
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : ProductImpl
//
- /** Class representing an update script */
- class ProductImpl : public ResolvableImpl
+ /** */
+ class ProductImpl : public ProductImplIf
{
public:
- /** Default ctor */
- ProductImpl( const std::string & name_r,
- const Edition & edition_r,
- const Arch & arch_r );
- /** Dtor */
+ ProductImpl();
~ProductImpl();
-
public:
- /** Get the product description */
- std::list<std::string> description() const;
/** Get the category of the product */
- std::string category() const;
+ virtual std::string category() const;
protected:
- /** Product description */
- std::list<std::string> _description;
- /** The category of the product */
std::string _category;
};
///////////////////////////////////////////////////////////////////
--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/detail/ProductImplIf.h
+ *
+*/
+#ifndef ZYPP_DETAIL_PRODUCTIMPLIF_H
+#define ZYPP_DETAIL_PRODUCTIMPLIF_H
+
+#include "zypp/detail/ResObjectImplIf.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+ class Product;
+
+ ///////////////////////////////////////////////////////////////////
+ namespace detail
+ { /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : ProductImplIf
+ //
+ /** Abstact Product implementation interface.
+ */
+ class ProductImplIf : public ResObjectImplIf
+ {
+ public:
+ typedef Product ResType;
+
+ public:
+ /** Get the category of the product */
+ virtual std::string category() const
+ { return std::string(); }
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace detail
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_DETAIL_PRODUCTIMPLIF_H
--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/detail/ResObjectImplIf.h
+ *
+*/
+#ifndef ZYPP_DETAIL_RESOBJECTIMPLIF_H
+#define ZYPP_DETAIL_RESOBJECTIMPLIF_H
+
+#include<list>
+#include<string>
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+ class Resolvable;
+ typedef std::string line;
+ typedef std::list<std::string> text;
+
+ ///////////////////////////////////////////////////////////////////
+ namespace detail
+ { /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : ResObjectImplIf
+ //
+ /** Abstact ResObject implementation interface.
+ */
+ class ResObjectImplIf
+ {
+ public:
+ /** */
+ const Resolvable * self() const
+ { return _backRef; }
+ /** */
+ Resolvable * self()
+ { return _backRef; }
+ /** */
+ virtual line summary() const
+ { return line(); }
+ /** */
+ virtual text description() const
+ { return text(); }
+
+ public:
+ /** Ctor */
+ ResObjectImplIf()
+ : _backRef( 0 )
+ {}
+ /** Dtor */
+ virtual ~ResObjectImplIf() = 0;
+
+ private:
+ /** */
+ template<class _Res>
+ friend class ResImplConnect;
+ /** */
+ Resolvable * _backRef;
+ };
+ /////////////////////////////////////////////////////////////////
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace detail
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_DETAIL_RESOBJECTIMPLIF_H
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- namespace detail
- { /////////////////////////////////////////////////////////////////
- IMPL_PTR_TYPE(ResolvableImpl)
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : ResolvableImpl::ResolvableImpl
- // METHOD TYPE : Ctor
- //
- ResolvableImpl::ResolvableImpl( const ResKind & kind_r,
- const std::string & name_r,
- const Edition & edition_r,
- const Arch & arch_r )
- : _kind( kind_r )
- , _name( name_r )
- , _edition( edition_r )
- , _arch( arch_r )
- {}
- ///////////////////////////////////////////////////////////////////
- //
- // METHOD NAME : ResolvableImpl::~ResolvableImpl
- // METHOD TYPE : Dtor
- //
- ResolvableImpl::~ResolvableImpl()
- {}
- /******************************************************************
- **
- ** FUNCTION NAME : operator<<
- ** FUNCTION TYPE : std::ostream &
- */
- std::ostream & operator<<( std::ostream & str, const ResolvableImpl & obj )
- {
- str << '[' << obj.kind() << ']' << obj.name() << '-' << obj.edition() << '.' << obj.arch();
- return str;
- }
-
- /////////////////////////////////////////////////////////////////
- } // namespace detail
- ///////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
#ifndef ZYPP_DETAIL_RESOLVABLEIMPL_H
#define ZYPP_DETAIL_RESOLVABLEIMPL_H
-#include <string>
-
-#include "zypp/base/ReferenceCounted.h"
-#include "zypp/base/NonCopyable.h"
-
-#include "zypp/ResKind.h"
-#include "zypp/Edition.h"
-#include "zypp/Arch.h"
-#include "zypp/Dependencies.h"
+#include "zypp/Resolvable.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////
- namespace detail
- { /////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(ResolvableImpl)
-
- ///////////////////////////////////////////////////////////////////
- //
- // CLASS NAME : ResolvableImpl
- //
- /**
- * \todo Assert \c deps provide 'name=edition'.
- */
- class ResolvableImpl : public base::ReferenceCounted, private base::NonCopyable
- {
- public:
- /** Ctor */
- ResolvableImpl( const ResKind & kind_r,
- const std::string & name_r,
- const Edition & edition_r,
- const Arch & arch_r );
- /** Dtor */
- virtual ~ResolvableImpl();
- public:
- /** */
- const ResKind & kind() const
- { return _kind; }
- /** */
- const std::string & name() const
- { return _name; }
- /** */
- const Edition & edition() const
- { return _edition; }
- /** */
- const Arch & arch() const
- { return _arch; }
- /** */
- const Dependencies & deps() const
- { return _deps; }
-
- /** Set Dependencies.
- * \todo Check whether we can allow changes after final construction
- */
- void setDeps( const Dependencies & val_r )
- { _deps = val_r; }
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : Resolvable::Impl
+ //
+ /** Implementation of Resovable
+ * \todo Assert \c deps provide 'name=edition'.
+ */
+ struct Resolvable::Impl
+ {
+ /** Ctor */
+ Impl( const ResKind & kind_r,
+ const std::string & name_r,
+ const Edition & edition_r,
+ const Arch & arch_r )
+ : _kind( kind_r )
+ , _name( name_r )
+ , _edition( edition_r )
+ , _arch( arch_r )
+ {}
- private:
- /** */
- ResKind _kind;
- /** */
- std::string _name;
- /** */
- Edition _edition;
- /** */
- Arch _arch;
- /** */
- Dependencies _deps;
- };
- ///////////////////////////////////////////////////////////////////
+ public:
+ /** */
+ const ResKind & kind() const
+ { return _kind; }
+ /** */
+ const std::string & name() const
+ { return _name; }
+ /** */
+ const Edition & edition() const
+ { return _edition; }
+ /** */
+ const Arch & arch() const
+ { return _arch; }
+ /** */
+ const Dependencies & deps() const
+ { return _deps; }
- /** \relates ResolvableImpl Stream output */
- extern std::ostream & operator<<( std::ostream & str, const ResolvableImpl & obj );
+ /** Set Dependencies.
+ * \todo Check whether we can allow changes after final construction
+ */
+ void setDeps( const Dependencies & val_r )
+ { _deps = val_r; }
- /////////////////////////////////////////////////////////////////
- } // namespace detail
+ private:
+ /** */
+ ResKind _kind;
+ /** */
+ std::string _name;
+ /** */
+ Edition _edition;
+ /** */
+ Arch _arch;
+ /** */
+ Dependencies _deps;
+ };
///////////////////////////////////////////////////////////////////
+
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
namespace detail
{ /////////////////////////////////////////////////////////////////
- IMPL_PTR_TYPE(ScriptImpl)
///////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////
/** Default ctor */
- ScriptImpl::ScriptImpl( const std::string & name_r,
- const Edition & edition_r,
- const Arch & arch_r )
- : ResolvableImpl( ResKind( "script"),
- name_r,
- edition_r,
- arch_r )
- {
- }
+ ScriptImpl::ScriptImpl()
+ {}
/** Dtor */
ScriptImpl::~ScriptImpl()
- {
- }
+ {}
std::string ScriptImpl::do_script() const {
return _do_script;
#ifndef ZYPP_DETAIL_SCRIPTIMPL_H
#define ZYPP_DETAIL_SCRIPTIMPL_H
-#include "zypp/detail/ResolvableImpl.h"
+#include "zypp/detail/ScriptImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
///////////////////////////////////////////////////////////////////
namespace detail
{ /////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(ScriptImpl)
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : ScriptImpl
//
/** Class representing an update script */
- class ScriptImpl : public ResolvableImpl
+ class ScriptImpl : public ScriptImplIf
{
public:
/** Default ctor */
- ScriptImpl( const std::string & name_r,
- const Edition & edition_r,
- const Arch & arch_r );
+ ScriptImpl();
/** Dtor */
~ScriptImpl();
--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/detail/ScriptImplIf.h
+ *
+*/
+#ifndef ZYPP_DETAIL_SCRIPTIMPLIF_H
+#define ZYPP_DETAIL_SCRIPTIMPLIF_H
+
+#include "zypp/detail/ResObjectImplIf.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+ class Script;
+
+ ///////////////////////////////////////////////////////////////////
+ namespace detail
+ { /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : ScriptImplIf
+ //
+ /** Abstact Script implementation interface.
+ */
+ class ScriptImplIf : public ResObjectImplIf
+ {
+ public:
+ typedef Script ResType;
+
+ public:
+ /** Get the script to perform the change */
+ virtual std::string do_script() const = 0;
+ /** Get the script to undo the change */
+ virtual std::string undo_script() const = 0;
+ /** Check whether script to undo the change is available */
+ virtual bool undo_available() const = 0;
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace detail
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_DETAIL_SCRIPTIMPLIF_H
/** \file zypp/detail/SelectionImpl.cc
*
*/
-#include <iostream>
-
#include "zypp/detail/SelectionImpl.h"
using namespace std;
///////////////////////////////////////////////////////////////////
namespace detail
{ /////////////////////////////////////////////////////////////////
- IMPL_PTR_TYPE(SelectionImpl)
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : SelectionImpl::SelectionImpl
// METHOD TYPE : Ctor
//
- SelectionImpl::SelectionImpl( const std::string & name_r,
- const Edition & edition_r,
- const Arch & arch_r )
- : ResolvableImpl( ResKind("selection"), name_r, edition_r, arch_r )
+ SelectionImpl::SelectionImpl()
{}
///////////////////////////////////////////////////////////////////
SelectionImpl::~SelectionImpl()
{}
- std::string SelectionImpl::summary() const
- { return std::string(); }
-
- std::list<std::string> SelectionImpl::description() const
- { return std::list<std::string>(); }
-
/////////////////////////////////////////////////////////////////
} // namespace detail
///////////////////////////////////////////////////////////////////
#ifndef ZYPP_DETAIL_SELECTIONIMPL_H
#define ZYPP_DETAIL_SELECTIONIMPL_H
-#include <list>
-
-#include "zypp/detail/ResolvableImpl.h"
+#include "zypp/detail/SelectionImplIf.h"
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
+
///////////////////////////////////////////////////////////////////
namespace detail
{ /////////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(SelectionImpl)
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : SelectionImpl
//
- /** */
- class SelectionImpl : public ResolvableImpl
+ /**
+ */
+ class SelectionImpl : public SelectionImplIf
{
public:
- /** */
- SelectionImpl( const std::string & name_r,
- const Edition & edition_r,
- const Arch & arch_r );
- /** Dtor */
+ SelectionImpl();
virtual ~SelectionImpl();
-
- public:
- /** */
- virtual std::string summary() const;
- /** */
- virtual std::list<std::string> description() const;
-#if 0
- virtual std::string summary( const LangCode & lang = LangCode("") ) const;
- virtual std::list<std::string> description( const LangCode & lang = LangCode("") ) const;
- virtual std::list<std::string> insnotify( const LangCode & lang = LangCode("") ) const;
- virtual std::list<std::string> delnotify( const LangCode & lang = LangCode("") ) const;
- virtual FSize size() const;
- virtual bool providesSources() const;
- virtual std::string instSrcLabel() const;
- virtual Vendor instSrcVendor() const;
- virtual unsigned instSrcRank() const;
- virtual std::string category() const;
- virtual bool visible() const;
- virtual std::list<std::string> suggests() const;
- virtual std::list<PMSelectionPtr> suggests_ptrs() const;
- virtual std::list<std::string> recommends() const;
- virtual std::list<PMSelectionPtr> recommends_ptrs() const;
- virtual std::list<std::string> inspacks( const LangCode & lang = LangCode("") ) const;
- virtual std::list<std::string> delpacks( const LangCode & lang = LangCode("") ) const;
- virtual PM::LocaleSet supportedLocales() const;
- virtual std::set<PMSelectablePtr> pureInspacks_ptrs( const LangCode & lang ) const;
- virtual std::set<PMSelectablePtr> inspacks_ptrs( const LangCode & lang ) const;
- virtual std::set<PMSelectablePtr> delpacks_ptrs( const LangCode & lang ) const;
- virtual FSize archivesize() const;
- virtual std::string order() const;
- virtual bool isBase() const;
- virtual PMError provideSelToInstall( Pathname & path_r ) const;
-#endif
};
///////////////////////////////////////////////////////////////////
--- /dev/null
+/*---------------------------------------------------------------------\
+| ____ _ __ __ ___ |
+| |__ / \ / / . \ . \ |
+| / / \ V /| _/ _/ |
+| / /__ | | | | | | |
+| /_____||_| |_| |_| |
+| |
+\---------------------------------------------------------------------*/
+/** \file zypp/detail/SelectionImplIf.h
+ *
+*/
+#ifndef ZYPP_DETAIL_SELECTIONIMPLIF_H
+#define ZYPP_DETAIL_SELECTIONIMPLIF_H
+
+#include "zypp/detail/ResObjectImplIf.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+
+ class Selection;
+
+ ///////////////////////////////////////////////////////////////////
+ namespace detail
+ { /////////////////////////////////////////////////////////////////
+
+ ///////////////////////////////////////////////////////////////////
+ //
+ // CLASS NAME : SelectionImplIf
+ //
+ /** Abstact Selection implementation interface.
+ */
+ class SelectionImplIf : public ResObjectImplIf
+ {
+ public:
+ typedef Selection ResType;
+
+ public:
+#if 0
+ virtual std::string summary( const LangCode & lang = LangCode("") ) const;
+ virtual std::list<std::string> description( const LangCode & lang = LangCode("") ) const;
+ virtual std::list<std::string> insnotify( const LangCode & lang = LangCode("") ) const;
+ virtual std::list<std::string> delnotify( const LangCode & lang = LangCode("") ) const;
+ virtual FSize size() const;
+ virtual bool providesSources() const;
+ virtual std::string instSrcLabel() const;
+ virtual Vendor instSrcVendor() const;
+ virtual unsigned instSrcRank() const;
+ virtual std::string category() const;
+ virtual bool visible() const;
+ virtual std::list<std::string> suggests() const;
+ virtual std::list<PMSelectionPtr> suggests_ptrs() const;
+ virtual std::list<std::string> recommends() const;
+ virtual std::list<PMSelectionPtr> recommends_ptrs() const;
+ virtual std::list<std::string> inspacks( const LangCode & lang = LangCode("") ) const;
+ virtual std::list<std::string> delpacks( const LangCode & lang = LangCode("") ) const;
+ virtual PM::LocaleSet supportedLocales() const;
+ virtual std::set<PMSelectablePtr> pureInspacks_ptrs( const LangCode & lang ) const;
+ virtual std::set<PMSelectablePtr> inspacks_ptrs( const LangCode & lang ) const;
+ virtual std::set<PMSelectablePtr> delpacks_ptrs( const LangCode & lang ) const;
+ virtual FSize archivesize() const;
+ virtual std::string order() const;
+ virtual bool isBase() const;
+ virtual PMError provideSelToInstall( Pathname & path_r ) const;
+#endif
+ };
+ ///////////////////////////////////////////////////////////////////
+
+ /////////////////////////////////////////////////////////////////
+ } // namespace detail
+ ///////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_DETAIL_SELECTIONIMPLIF_H
{ /////////////////////////////////////////////////////////////////
namespace YUM
{
- IMPL_PTR_TYPE(YUMScriptImpl)
-
+
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : YUMScriptImpl
//
///////////////////////////////////////////////////////////////////
-
+
/** Default ctor */
YUMScriptImpl::YUMScriptImpl(
const zypp::parser::YUM::YUMPatchScript & parsed
)
+#warning MA: CANT BE CONSTUCTED THAT WAY ANYMORE
+#if 0
: ScriptImpl(
parsed.name,
Edition(parsed.ver, parsed.rel, strtol(parsed.epoch.c_str(), NULL, 10)),
Arch("noarch")
+
)
+#endif
{
_do_script = parsed.do_script;
_undo_script = parsed.undo_script;
*/
}
- } // namespace YUM
+ } // namespace YUM
/////////////////////////////////////////////////////////////////
} // namespace source
///////////////////////////////////////////////////////////////////
namespace YUM
{ //////////////////////////////////////////////////////////////
- DEFINE_PTR_TYPE(YUMScriptImpl)
-
///////////////////////////////////////////////////////////////////
//
// CLASS NAME : YUMScriptImpl