Dune Core Modules (2.4.2)

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
12namespace Dune {
13
22 template<class GridImp, class EntitySeedImp>
24 {
25 public:
26
28 enum { codimension = EntitySeedImp::codimension };
29
31 typedef EntitySeedImp Implementation;
32
35 {}
36
38 EntitySeed(const EntitySeedImp& implementation)
39 : implementation_(implementation)
40 {}
41
43 bool isValid() const
44 {
45 return implementation_.isValid();
46 }
47
48#if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
49 public:
50#else
51 protected:
52 // give the GridDefaultImplementation class access to the impl
53 friend class GridDefaultImplementation<
54 GridImp::dimension, GridImp::dimensionworld,
55 typename GridImp::ctype,
56 typename GridImp::GridFamily> ;
57#endif
58
61 {
62 return implementation_;
63 }
65 const Implementation& impl() const
66 {
67 return implementation_;
68 }
69
70 private:
72 EntitySeedImp implementation_;
73 };
74
75} // end namespace Dune
76
77#endif
Store a reference to an entity with a minimal memory footprint.
Definition: entityseed.hh:24
Implementation & impl()
Access to the actual implementation.
Definition: entityseed.hh:60
EntitySeedImp Implementation
Export the implementation type.
Definition: entityseed.hh:31
EntitySeed(const EntitySeedImp &implementation)
Construct from implementation class.
Definition: entityseed.hh:38
EntitySeed()
Construct an empty (i.e. isValid() == false) seed.
Definition: entityseed.hh:34
const Implementation & impl() const
const Access to the actual implementation
Definition: entityseed.hh:65
bool isValid() const
check whether it is safe to create an Entity from this Seed
Definition: entityseed.hh:43
Definition: grid.hh:1030
Different resources needed by all grid implementations.
Dune namespace.
Definition: alignment.hh:10
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)