SEHistogram.h
1 /**************************************************************************************
2 Copyright 2015 Applied Research Associates, Inc.
3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4 this file except in compliance with the License. You may obtain a copy of the License
5 at:
6 http://www.apache.org/licenses/LICENSE-2.0
7 Unless required by applicable law or agreed to in writing, software distributed under
8 the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
9 CONDITIONS OF ANY KIND, either express or implied. See the License for the
10 specific language governing permissions and limitations under the License.
11 **************************************************************************************/
12 
13 #pragma once
14 #include <biogears/cdm/properties/SEProperty.h>
15 #include <biogears/cdm/utils/unitconversion/UCCommon.h>
16 
17 CDM_BIND_DECL(HistogramData)
18 
19 namespace biogears {
20 class BIOGEARS_API SEHistogram : public SEProperty {
21 public:
22  SEHistogram();
23  virtual ~SEHistogram();
24 
25  virtual void Clear(); //clear memory
26 
27  virtual bool Load(const CDM::HistogramData& in);
28  virtual CDM::HistogramData* Unload() const;
29 
30 protected:
31  virtual void Unload(CDM::HistogramData& data) const;
32 
33 public:
34  virtual bool IsValid() const;
35  virtual void Invalidate();
36 
37  virtual unsigned int NumberOfBins() const;
38  virtual unsigned int NumberOfBoundaries() const;
39 
40  double GetDependentValue(unsigned int index) const;
41  std::vector<double>& GetDependent();
42  const std::vector<double>& GetDependent() const;
43 
44  double GetIndependentValue(unsigned int index) const;
45  std::vector<double>& GetIndependent();
46  const std::vector<double>& GetIndependent() const;
47 
48 protected:
49  std::vector<double> m_Dependent;
50  std::vector<double> m_Independent;
51 };
52 }
Definition: SEProperty.h:19
virtual void Invalidate()=0
virtual void Unload(CDM::PropertyData &data) const
Definition: SEProperty.cpp:35
Definition: SEHistogram.h:20
virtual void Clear()
Definition: SEProperty.cpp:26
virtual bool IsValid() const =0
std::vector< double > m_Dependent
Definition: SEHistogram.h:49
Class corresponding to the HistogramData schema type.
Definition: Properties.hxx:9023
virtual bool Load(const CDM::PropertyData &in)
Definition: SEProperty.cpp:30
std::vector< double > m_Independent
Definition: SEHistogram.h:50
Definition: SEElectricalCircuit.h:18