lemon/concepts/maps.h
changeset 223 cfadfeef706f
parent 209 765619b7cbb2
child 220 a5d8c039f218
equal deleted inserted replaced
10:333b2c924c75 11:ec767f01fb01
    41     class ReadMap
    41     class ReadMap
    42     {
    42     {
    43     public:
    43     public:
    44       /// The key type of the map.
    44       /// The key type of the map.
    45       typedef K Key;
    45       typedef K Key;
    46       /// The value type of the map. (The type of objects associated with the keys).
    46       /// \brief The value type of the map.
       
    47       /// (The type of objects associated with the keys).
    47       typedef T Value;
    48       typedef T Value;
    48 
    49 
    49       /// Returns the value associated with the given key.
    50       /// Returns the value associated with the given key.
    50       Value operator[](const Key &) const {
    51       Value operator[](const Key &) const {
    51         return *static_cast<Value *>(0);
    52         return *static_cast<Value *>(0);
    80     class WriteMap
    81     class WriteMap
    81     {
    82     {
    82     public:
    83     public:
    83       /// The key type of the map.
    84       /// The key type of the map.
    84       typedef K Key;
    85       typedef K Key;
    85       /// The value type of the map. (The type of objects associated with the keys).
    86       /// \brief The value type of the map.
       
    87       /// (The type of objects associated with the keys).
    86       typedef T Value;
    88       typedef T Value;
    87 
    89 
    88       /// Sets the value associated with the given key.
    90       /// Sets the value associated with the given key.
    89       void set(const Key &, const Value &) {}
    91       void set(const Key &, const Value &) {}
    90 
    92 
   119                          public WriteMap<K,T>
   121                          public WriteMap<K,T>
   120     {
   122     {
   121     public:
   123     public:
   122       /// The key type of the map.
   124       /// The key type of the map.
   123       typedef K Key;
   125       typedef K Key;
   124       /// The value type of the map. (The type of objects associated with the keys).
   126       /// \brief The value type of the map.
       
   127       /// (The type of objects associated with the keys).
   125       typedef T Value;
   128       typedef T Value;
   126 
   129 
   127       /// Returns the value associated with the given key.
   130       /// Returns the value associated with the given key.
   128       Value operator[](const Key &) const {
   131       Value operator[](const Key &) const {
   129         return *static_cast<Value *>(0);
   132         return *static_cast<Value *>(0);
   152     public:
   155     public:
   153       /// Tag for reference maps.
   156       /// Tag for reference maps.
   154       typedef True ReferenceMapTag;
   157       typedef True ReferenceMapTag;
   155       /// The key type of the map.
   158       /// The key type of the map.
   156       typedef K Key;
   159       typedef K Key;
   157       /// The value type of the map. (The type of objects associated with the keys).
   160       /// \brief The value type of the map.
       
   161       /// (The type of objects associated with the keys).
   158       typedef T Value;
   162       typedef T Value;
   159       /// The reference type of the map.
   163       /// The reference type of the map.
   160       typedef R Reference;
   164       typedef R Reference;
   161       /// The const reference type of the map.
   165       /// The const reference type of the map.
   162       typedef CR ConstReference;
   166       typedef CR ConstReference;