reservoir.cc 2.84 KB
Newer Older
thomas.forbriger's avatar
thomas.forbriger committed
1
2
3
4
5
/*! \file reservoir.cc
 * \brief series reservoir (implementation)
 * 
 * ----------------------------------------------------------------------------
 * 
thomas.forbriger's avatar
thomas.forbriger committed
6
 * $Id: reservoir.cc,v 1.2 2010-02-21 12:31:33 tforb Exp $
thomas.forbriger's avatar
thomas.forbriger committed
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
36
37
38
 * \author Thomas Forbriger
 * \date 20/02/2010
 * 
 * series reservoir (implementation)
 * 
 * Copyright (c) 2010 by Thomas Forbriger (BFO Schiltach) 
 *
 * ----
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version. 
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 * ----
 *
 * 
 * REVISIONS and CHANGES 
 *  - 20/02/2010   V1.0   Thomas Forbriger
 * 
 * ============================================================================
 */
#define DATWRITE_RESERVOIR_CC_VERSION \
  "TF_RESERVOIR_CC   V1.0   "
#define DATWRITE_RESERVOIR_CC_CVSID \
thomas.forbriger's avatar
thomas.forbriger committed
39
  "$Id: reservoir.cc,v 1.2 2010-02-21 12:31:33 tforb Exp $"
thomas.forbriger's avatar
thomas.forbriger committed
40
41
42
43
44
45
46
47

#include <datwritexx/reservoir.h>
#include <datwritexx/error.h>

namespace datwrite {

  namespace util {

thomas.forbriger's avatar
thomas.forbriger committed
48
49
50
51
52
    seriesreservoir::seriesreservoir()
    {
      Mvaluetype=Fnone;
    } // seriesreservoir::seriesreservoir()

thomas.forbriger's avatar
thomas.forbriger committed
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
    seriesreservoir::seriesreservoir(const Tdseries& series)
    {
      Mvaluetype=Fdouble;
      Mdseries=series.copyout();
    } // seriesreservoir::seriesreservoir(const Tdseries& series)

    seriesreservoir::seriesreservoir(const Tfseries& series)
    {
      Mvaluetype=Ffloat;
      Mfseries=series.copyout();
    } // seriesreservoir::seriesreservoir(const Tfseries& series)

    seriesreservoir::seriesreservoir(const Tiseries& series)
    {
      Mvaluetype=Finteger;
      Miseries=series.copyout();
    } // seriesreservoir::seriesreservoir(const Tiseries& series)

    Tdseries seriesreservoir::dseries() const 
    { 
      DATWRITE_assert((Mvaluetype == Fdouble), "wrong data type");
      return Mdseries; 
    } // Tdseries seriesreservoir::dseries() const

    Tfseries seriesreservoir::fseries() const 
    { 
      DATWRITE_assert((Mvaluetype == Ffloat), "wrong data type");
      return Mfseries; 
    } // Tfseries seriesreservoir::fseries() const

    Tiseries seriesreservoir::iseries() const 
    { 
      DATWRITE_assert((Mvaluetype == Finteger), "wrong data type");
      return Miseries; 
    } // Tiseries seriesreservoir::iseries() const

  } // namespace util

} // namespace datwrite

/* ----- END OF reservoir.cc ----- */