aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/e_choices_key.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-01-18 23:55:50 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-01-18 23:55:50 +0000
commitb12a4f151e0c16e18c08de5929922e4cd4d35165 (patch)
treecd410e5e465c10881752a718734554547d039e8d /paludis/repositories/e/e_choices_key.cc
parentcfbe6ed8eb60a9096d32856a8442a477137edb96 (diff)
downloadpaludis-b12a4f151e0c16e18c08de5929922e4cd4d35165.tar.gz
paludis-b12a4f151e0c16e18c08de5929922e4cd4d35165.tar.xz
Make metadata key general methods pure virtual.
Diffstat (limited to 'paludis/repositories/e/e_choices_key.cc')
-rw-r--r--paludis/repositories/e/e_choices_key.cc34
1 files changed, 29 insertions, 5 deletions
diff --git a/paludis/repositories/e/e_choices_key.cc b/paludis/repositories/e/e_choices_key.cc
index 9fba4dd64..c2ca3e6c5 100644
--- a/paludis/repositories/e/e_choices_key.cc
+++ b/paludis/repositories/e/e_choices_key.cc
@@ -64,13 +64,21 @@ namespace paludis
const std::tr1::shared_ptr<const ERepository> maybe_e_repository;
const std::tr1::shared_ptr<const Map<ChoiceNameWithPrefix, std::string> > maybe_descriptions;
+ const std::string raw_name;
+ const std::string human_name;
+ const MetadataKeyType type;
+
Implementation(const Environment * const e, const std::tr1::shared_ptr<const ERepositoryID> & i,
const std::tr1::shared_ptr<const ERepository> & p,
- const std::tr1::shared_ptr<const Map<ChoiceNameWithPrefix, std::string> > & d) :
+ const std::tr1::shared_ptr<const Map<ChoiceNameWithPrefix, std::string> > & d,
+ const std::string & r, const std::string & h, const MetadataKeyType t) :
env(e),
id(i),
maybe_e_repository(p),
- maybe_descriptions(d)
+ maybe_descriptions(d),
+ raw_name(r),
+ human_name(h),
+ type(t)
{
}
};
@@ -82,9 +90,7 @@ EChoicesKey::EChoicesKey(
const std::string & r, const std::string & h, const MetadataKeyType t,
const std::tr1::shared_ptr<const ERepository> & p,
const std::tr1::shared_ptr<const Map<ChoiceNameWithPrefix, std::string> > & d) :
- MetadataValueKey<std::tr1::shared_ptr<const Choices> > (r, h, t),
- PrivateImplementationPattern<EChoicesKey>(new Implementation<EChoicesKey>(e, i, p, d)),
- _imp(PrivateImplementationPattern<EChoicesKey>::_imp)
+ PrivateImplementationPattern<EChoicesKey>(new Implementation<EChoicesKey>(e, i, p, d, r, h, t))
{
}
@@ -481,3 +487,21 @@ EChoicesKey::value() const
return _imp->value;
}
+const std::string
+EChoicesKey::raw_name() const
+{
+ return _imp->raw_name;
+}
+
+const std::string
+EChoicesKey::human_name() const
+{
+ return _imp->human_name;
+}
+
+MetadataKeyType
+EChoicesKey::type() const
+{
+ return _imp->type;
+}
+