dune-fem  2.4.1-rc
envelope.hh
Go to the documentation of this file.
1 #ifndef DUNE_FEM_ENVELOPE_HH
2 #define DUNE_FEM_ENVELOPE_HH
3 
4 namespace 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
Definition: envelope.hh:10
const ObjectType & operator*() const
Definition: envelope.hh:28
Envelope(const Envelope &other)
Definition: envelope.hh:24
Envelope(ParamType param)
Definition: envelope.hh:20
Definition: coordinate.hh:4
const ObjectType * operator->() const
Definition: envelope.hh:38
ObjectType object_
Definition: envelope.hh:16
Object ObjectType
Definition: envelope.hh:13