dune-grid  2.6-git
common/entityseed.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_GRID_ENTITY_SEED_HH
4 #define DUNE_GRID_ENTITY_SEED_HH
5 
7 
12 namespace Dune {
13 
22  template<class GridImp, class EntitySeedImp>
23  class EntitySeed
24  {
25  public:
26 
28  enum { codimension = EntitySeedImp::codimension };
29 
35  typedef EntitySeedImp Implementation;
36 
39  {}
40 
42  EntitySeed(const EntitySeedImp& implementation)
43  : implementation_(implementation)
44  {}
45 
47  bool isValid() const
48  {
49  return implementation_.isValid();
50  }
51 
57  Implementation& impl() { return implementation_; }
58 
64  const Implementation& impl() const { return implementation_; }
65 
66  private:
68  EntitySeedImp implementation_;
69  };
70 
71 } // end namespace Dune
72 
73 #endif
grid.hh
Different resources needed by all grid implementations.
Dune::EntitySeed::EntitySeed
EntitySeed()
Construct an empty (i.e. isValid() == false) seed.
Definition: common/entityseed.hh:38
Dune::EntitySeed::impl
Implementation & impl()
access to the underlying implementation
Definition: common/entityseed.hh:57
Dune::EntitySeed::isValid
bool isValid() const
check whether it is safe to create an Entity from this Seed
Definition: common/entityseed.hh:47
Dune::EntitySeed::codimension
@ codimension
Definition: common/entityseed.hh:28
Dune::EntitySeed::EntitySeed
EntitySeed(const EntitySeedImp &implementation)
Construct from implementation class.
Definition: common/entityseed.hh:42
Dune::EntitySeed
Store a reference to an entity with a minimal memory footprint.
Definition: common/entityseed.hh:23
Dune::EntitySeed::Implementation
EntitySeedImp Implementation
type of underlying implementation
Definition: common/entityseed.hh:35
Dune::EntitySeed::impl
const Implementation & impl() const
access to the underlying implementation
Definition: common/entityseed.hh:64
Dune
Include standard header files.
Definition: agrid.hh:58