TimedObject.h 2.24 KB
Newer Older
Thomas Witkowski's avatar
Thomas Witkowski committed
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
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  crystal growth group                                                  ==
// ==                                                                        ==
// ==  Stiftung caesar                                                       ==
// ==  Ludwig-Erhard-Allee 2                                                 ==
// ==  53175 Bonn                                                            ==
// ==  germany                                                               ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
// ==  http://www.caesar.de/cg/AMDiS                                         ==
// ==                                                                        ==
// ============================================================================

/** \file TimedObject.h */

#ifndef AMDIS_TIMEDOBJECT_H
#define AMDIS_TIMEDOBJECT_H

namespace AMDiS {

  /** \brief
   * This class can be used as base class for time dependent objects where
   * different objects refer to the same time. Herefore a pointer to
   * a double value is stored, pointing to a time value, which can be
   * managed in one central object, maybe the problem class.
   */
  class TimedObject
  {
  public:
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
    /// Constructor.
    TimedObject() 
      : timePtr(NULL) 
    {}

    /// Sets the time pointer.
    inline void setTimePtr(double *timePtr_) 
    { 
      timePtr = timePtr_; 
    }

    /// Returns the time pointer.
    inline double *getTimePtr() 
    { 
      return timePtr; 
    }

Thomas Witkowski's avatar
Thomas Witkowski committed
53
  protected:
54
    /// Pointer to the externally managed time value.
Thomas Witkowski's avatar
Thomas Witkowski committed
55
56
57
58
59
60
    double *timePtr;
  };

}

#endif // AMDIS_TIMEDOBJECT_H