/usr/include/dune/grid/albertagrid/entitypointer.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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | #ifndef DUNE_ALBERTA_ENTITYPOINTER_HH
#define DUNE_ALBERTA_ENTITYPOINTER_HH
#include <dune/grid/common/entitypointer.hh>
#include <dune/grid/albertagrid/elementinfo.hh>
#if HAVE_ALBERTA
namespace Dune
{
// External Forward Declarations
// -----------------------------
template< int dim, int dimworld >
class AlbertaGrid;
/** \class AlbertaGridEntityPointer
* \ingroup AlbertaGrid
* \brief EntityPointer implementation for AlbertaGrid
*/
template< int codim, class GridImp >
class AlbertaGridEntityPointer
{
typedef AlbertaGridEntityPointer< codim, GridImp > This;
friend class AlbertaGrid< GridImp::dimension, GridImp::dimensionworld >;
public:
static const int dimension = GridImp::dimension;
static const int codimension = codim;
static const int mydimension = dimension - codimension;
static const int dimensionworld = GridImp::dimensionworld;
typedef typename GridImp::template Codim< codimension >::Entity Entity;
protected:
typedef MakeableInterfaceObject< Entity > EntityObject;
typedef typename EntityObject::ImplementationType EntityImp;
public:
typedef AlbertaGridEntityPointer< codimension, GridImp > EntityPointerImp;
typedef typename EntityImp::ElementInfo ElementInfo;
//! make an EntityPointer that points to an element
AlbertaGridEntityPointer ( const GridImp &grid,
const ElementInfo &elementInfo,
int subEntity );
//! constructor for invalid EntityPointer
AlbertaGridEntityPointer ( const GridImp &grid );
//! make entity pointer from entity
AlbertaGridEntityPointer ( const EntityImp &entity );
#if 0
//! copy constructor
AlbertaGridEntityPointer ( const This &other );
#endif
#if 0
//! Destructor
~AlbertaGridEntityPointer();
#endif
#if 0
//! assignment operator
This &operator= ( const This &other );
#endif
//! equality
bool equals ( const This &other ) const;
//! dereferencing
Entity &dereference () const;
//! ask for level of entities
int level () const;
protected:
//! obtain reference to internal entity implementation
EntityImp &entityImp ();
//! obtain const reference to internal entity implementation
const EntityImp &entityImp () const;
//! obtain a reference to the grid
const GridImp &grid () const;
private:
mutable EntityObject entity_;
};
template< int codim, class GridImp >
inline AlbertaGridEntityPointer< codim, GridImp >
::AlbertaGridEntityPointer ( const GridImp &grid,
const ElementInfo &elementInfo,
int subEntity )
: entity_( EntityImp( grid, elementInfo, subEntity ) )
{}
template<int codim, class GridImp >
inline AlbertaGridEntityPointer< codim, GridImp >
::AlbertaGridEntityPointer ( const GridImp &grid )
: entity_( EntityImp( grid ) )
{}
template< int codim, class GridImp >
inline AlbertaGridEntityPointer< codim, GridImp >
::AlbertaGridEntityPointer ( const EntityImp &entity )
: entity_( entity )
{}
#if 0
template< int codim, class GridImp >
inline AlbertaGridEntityPointer< codim, GridImp >
::AlbertaGridEntityPointer ( const This &other )
: entity_( other.entity_ )
{}
#endif
#if 0
template<int codim, class GridImp >
inline AlbertaGridEntityPointer< codim, GridImp >::~AlbertaGridEntityPointer ()
{}
#endif
#if 0
template< int codim, class GridImp >
inline typename AlbertaGridEntityPointer< codim, GridImp >::This &
AlbertaGridEntityPointer< codim, GridImp >::operator= ( const This &other )
{
entityImp().setEntity( other.entityImp() );
return *this;
}
#endif
template<int codim, class GridImp >
inline bool
AlbertaGridEntityPointer< codim, GridImp >::equals ( const This &other ) const
{
return entityImp().equals( other.entityImp() );
}
template<int codim, class GridImp >
inline typename AlbertaGridEntityPointer< codim, GridImp >::Entity &
AlbertaGridEntityPointer< codim, GridImp >::dereference () const
{
return entity_;
}
template< int codim, class GridImp >
inline int AlbertaGridEntityPointer< codim, GridImp >::level () const
{
return entityImp().level();
}
template< int codim, class GridImp >
inline typename AlbertaGridEntityPointer< codim, GridImp >::EntityImp &
AlbertaGridEntityPointer< codim, GridImp >::entityImp ()
{
return GridImp::getRealImplementation( entity_ );
}
template< int codim, class GridImp >
inline const typename AlbertaGridEntityPointer< codim, GridImp >::EntityImp &
AlbertaGridEntityPointer< codim, GridImp >::entityImp () const
{
return GridImp::getRealImplementation( entity_ );
}
template< int codim, class GridImp >
inline const GridImp &AlbertaGridEntityPointer< codim, GridImp >::grid () const
{
return entityImp().grid();
}
}
#endif // #if HAVE_ALBERTA
#endif // #ifndef DUNE_ALBERTA_ENTITYPOINTER_HH
|