DUNE-FEM (unstable)

envelope.hh
1#ifndef DUNE_FEM_ENVELOPE_HH
2#define DUNE_FEM_ENVELOPE_HH
3
4namespace Dune
5{
6 namespace Fem
7 {
8
9 template< class Object >
10 class Envelope
11 {
12 public:
13 typedef Object ObjectType;
14
15 protected:
16 ObjectType object_;
17
18 public:
19 template< class ParamType >
20 inline explicit Envelope ( ParamType param )
21 : object_( param )
22 {}
23
24 inline Envelope ( const Envelope &other )
25 : object_( other.object_ )
26 {}
27
28 inline const ObjectType& operator* () const
29 {
30 return object_;
31 }
32
33 inline ObjectType& operator* ()
34 {
35 return object_;
36 }
37
38 inline const ObjectType* operator-> () const
39 {
40 return &object_;
41 }
42
43 inline ObjectType* operator-> ()
44 {
45 return &object_;
46 }
47 };
48
49 } // namespace Fem
50
51} // namespace Dune
52
53#endif // #ifndef DUNE_FEM_ENVELOPE_HH
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 27, 22:29, 2024)