dune-istl  2.3.1
properties.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 #ifndef DUNE_ISTL_AMG_PROPERTIES_HH
4 #define DUNE_ISTL_AMG_PROPERTIES_HH
5 
6 #include <dune/common/propertymap.hh>
7 
8 namespace Dune
9 {
10 
11  namespace Amg
12  {
27  {};
28 
29 
36  template<typename C, typename K, std::size_t i,typename T=typename C::ValueType,
37  typename R = typename C::Reference>
39  : public RAPropertyMapHelper<R,
40  RandomAccessBundledPropertyMap<C,K,i,T,R> >
41  {
42  public:
44  typedef C Container;
45 
47  typedef R Reference;
48 
50  typedef K Key;
51 
55  typedef LvaluePropertyMapTag Category;
56 
57  enum {
59  index = i
60  };
61 
67  Reference operator[](const Key& key) const
68  {
69  return container_[key][index];
70  }
71 
77  : container_(&container)
78  {}
79 
82  : container_(0)
83  {}
84 
85  private:
87  Container* container_;
88  };
89  }
90 }
91 
92 #endif