paludis::NamedValue< K_, V_ > Class Template Reference
[OO Design Helpers]

#include <named_value.hh>

List of all members.

Public Types

typedef K_ KeyType
typedef V_ ValueType

Public Member Functions

template<typename T_>
 NamedValue (const NamedValue< K_, T_ > &v)
 NamedValue (const V_ &v)
 NamedValue (const NamedValue &v)
V_ & operator() ()
const V_ & operator() () const


Detailed Description

template<typename K_, typename V_>
class paludis::NamedValue< K_, V_ >

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.


The documentation for this class was generated from the following file:
Generated on Mon Sep 21 10:36:11 2009 for paludis by  doxygen 1.5.4