This file is indexed.

/usr/include/dune/grid/utility/persistentcontainerwrapper.hh is in libdune-grid-dev 2.2.1-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH
#define DUNE_PERSISTENTCONTAINERWRAPPER_HH

#include <dune/grid/utility/hostgridaccess.hh>
#include <dune/grid/utility/persistentcontainer.hh>

namespace Dune
{

  // PersistentContainerWrapper
  // --------------------------

  template< class G, class T, class Allocator >
  class PersistentContainerWrapper 
  {
    typedef PersistentContainerWrapper< G, T, Allocator > This;

    typedef Dune::HostGridAccess< G > HostGridAccess;

    typedef typename HostGridAccess::HostGrid HostGrid;
    typedef PersistentContainer< HostGrid, T, Allocator > PersistentContainerHostGrid;

  public:
    typedef G Grid;
    typedef T Data;

    typedef typename PersistentContainerHostGrid::Iterator Iterator;
    typedef typename PersistentContainerHostGrid::ConstIterator ConstIterator;

    PersistentContainerWrapper ( const Grid &grid, const int codim, const Allocator &allocator = Allocator() )
    : hostContainer_( HostGridAccess::hostGrid( grid ), codim, allocator )
    {}

    template< class Entity >
    Data &operator[] ( const Entity &entity )
    {
      return hostContainer_[ HostGridAccess::hostEntity( entity ) ];
    }

    template< class Entity >
    const Data &operator[] ( const Entity &entity ) const
    {
      return hostContainer_[ HostGridAccess::hostEntity( entity ) ];
    }

    template< class Entity >
    Data &operator() ( const Entity &entity, const int subEntity )
    {
      return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );
    }

    template< class Entity >
    const Data &operator() ( const Entity &entity, const int subEntity ) const
    {
      return hostContainer_( HostGridAccess::hostEntity( entity ), subEntity );
    }

    Iterator begin () { return hostContainer_.begin(); }
    ConstIterator begin () const { return hostContainer_.begin(); }

    Iterator end () { return hostContainer_.end(); }
    ConstIterator end () const { return hostContainer_.end(); }

    size_t size () const { return hostContainer_.size(); }

    void clear () { hostContainer_.clear(); }
    void reserve () { hostContainer_.reserve(); }
    void update () { hostContainer_.update(); }

  private:
    PersistentContainerHostGrid hostContainer_ ;
  };

} // namespace Dune

#endif // #ifndef DUNE_PERSISTENTCONTAINERWRAPPER_HH