aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-06 00:34:32 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-06 01:15:38 +0000
commita0e6861d05b92c6eff116467adc4dd5baad95bad (patch)
tree6ca264faee8b2ff318f99ef833787bc89bb69356
parent055ac2908efb6e90d8c367df8b3cd8221b405049 (diff)
downloadpaludis-a0e6861d05b92c6eff116467adc4dd5baad95bad.tar.gz
paludis-a0e6861d05b92c6eff116467adc4dd5baad95bad.tar.xz
doc
-rw-r--r--paludis/util/named_value.hh18
1 files changed, 18 insertions, 0 deletions
diff --git a/paludis/util/named_value.hh b/paludis/util/named_value.hh
index 9622740..11ac56e 100644
--- a/paludis/util/named_value.hh
+++ b/paludis/util/named_value.hh
@@ -24,6 +24,24 @@
namespace paludis
{
+ /**
+ * A NamedValue is used to hold a member of type V_ for a class.
+ *
+ * NamedValue is used to simplify 'plain old data' style classes, and to
+ * provide compiler-time-checked named parameters for functions. Use
+ * thestruct.themember() and thestruct.themember() = to access the real
+ * underlying values.
+ *
+ * Usually a struct containing NamedValue objects will be constructed using
+ * the make_named_values() function. For each NamedValue object,
+ * make_named_values() takes a parameter in the form
+ * value_for<n::whatever_K_is>(the_value).
+ *
+ * In all cases, NamedValue members are listed in name-sorted order, and
+ * the same name is used for K_ and the member name.
+ *
+ * \ingroup g_oo
+ */
template <typename K_, typename V_>
class NamedValue
{