SEFunction.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/CommonDataModel.h>
15 #include <biogears/exports.h>
16 
17 #include <biogears/cdm/properties/SEProperty.h>
18 #include <biogears/cdm/utils/unitconversion/UCCommon.h>
19 
20 CDM_BIND_DECL(FunctionData)
21 
22 namespace biogears {
23 class BIOGEARS_API SEFunction : public SEProperty {
24 public:
25  SEFunction();
26  virtual ~SEFunction();
27 
28  virtual void Clear(); //clear memory
29 
30  virtual bool Load(const CDM::FunctionData& in);
31  virtual CDM::FunctionData* Unload() const;
32 
33 protected:
34  virtual void Unload(CDM::FunctionData& data) const;
35 
36 public:
37  virtual bool IsValid() const;
38  virtual void Invalidate();
39 
40  virtual unsigned int Length();
41 
42  double GetDependentValue(unsigned int index);
43  std::vector<double>& GetDependent();
44 
45  double GetIndependentValue(unsigned int index);
46  std::vector<double>& GetIndependent();
47 
48 protected:
49  std::vector<double> m_Dependent;
50  std::vector<double> m_Independent;
51 };
52 }
Definition: SEFunction.h:23
std::vector< double > m_Dependent
Definition: SEFunction.h:49
Definition: SEProperty.h:19
virtual void Invalidate()=0
virtual void Unload(CDM::PropertyData &data) const
Definition: SEProperty.cpp:35
virtual void Clear()
Definition: SEProperty.cpp:26
virtual bool IsValid() const =0
virtual bool Load(const CDM::PropertyData &in)
Definition: SEProperty.cpp:30
Class corresponding to the FunctionData schema type.
Definition: Properties.hxx:8462
Definition: SEElectricalCircuit.h:18
std::vector< double > m_Independent
Definition: SEFunction.h:50