aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-10-24 12:14:15 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-10-24 12:14:15 +0000
commit58c2ee0ad90ad688333adfa90f324cb176d64e38 (patch)
tree9a98ff7387f408aad5d3ab1e20c92317001dc849
parentb67cde94752c508802e6476c29f32dd5a23a02c9 (diff)
downloadpaludis-58c2ee0ad90ad688333adfa90f324cb176d64e38.tar.gz
paludis-58c2ee0ad90ad688333adfa90f324cb176d64e38.tar.xz
Provide a copy constructor for PackageDepAtom
-rw-r--r--paludis/dep_atom.cc14
-rw-r--r--paludis/dep_atom.hh5
2 files changed, 19 insertions, 0 deletions
diff --git a/paludis/dep_atom.cc b/paludis/dep_atom.cc
index 384804d..16b8d30 100644
--- a/paludis/dep_atom.cc
+++ b/paludis/dep_atom.cc
@@ -125,6 +125,20 @@ PackageDepAtom::PackageDepAtom(const QualifiedPackageName & our_package) :
{
}
+PackageDepAtom::PackageDepAtom(const PackageDepAtom & other) :
+ VisitableInterface<DepAtomVisitorTypes>(other),
+ StringDepAtom(stringify(other)),
+ Visitable<PackageDepAtom, DepAtomVisitorTypes>(other),
+ _package(other._package),
+ _version_operator(other._version_operator),
+ _version_spec(other._version_spec),
+ _slot(other._slot),
+ _repository(other._repository),
+ _use_requirements(other._use_requirements),
+ _tag(other._tag)
+{
+}
+
PackageDepAtom::PackageDepAtom(const std::string & ss) :
StringDepAtom(ss),
_package(CategoryNamePart("later"), PackageNamePart("later")),
diff --git a/paludis/dep_atom.hh b/paludis/dep_atom.hh
index 0f75734..25a6e48 100644
--- a/paludis/dep_atom.hh
+++ b/paludis/dep_atom.hh
@@ -324,6 +324,11 @@ namespace paludis
*/
PackageDepAtom(const std::string &);
+ /**
+ * Copy constructor.
+ */
+ PackageDepAtom(const PackageDepAtom &);
+
~PackageDepAtom();
///\}