47 {
Std_TraceMsg(0,
"Caught Error in desctructor of CStdLookupTable\r\n",
"", -1,
false,
true);}
78 CStdDPoint oPoint(dblX, dblY, 0);
95 if(oPoint1.x<oPoint2.x)
110 THROW_ERROR(Std_Err_lNotEnoughPointsInLookupTable, Std_Err_strNotEnoughPointsInLookupTable);
112 #if defined(STD_TRACING_ON)
119 #if defined(STD_TRACING_ON)
124 double dblMin = -1, dblDelta;
126 CStdDPoint oFirst, oSecond;
127 for(iIndex=1; iIndex<iCount; iIndex++)
132 if(oFirst.x == oSecond.x)
133 THROW_PARAM_ERROR(Std_Err_lOverlappingLookupTablePoints, Std_Err_strOverlappingLookupTablePoints,
"X", oFirst.x);
135 dblDelta = oSecond.x - oFirst.x;
136 if(dblMin == -1 || dblDelta < dblMin)
161 m_aryM[iIndex] = (oSecond.y - oFirst.y) / (oSecond.x - oFirst.x);
166 if( (dblX > oSecond.x) || (dblX < oSecond.x && fabs(oSecond.x-dblX) < 0.0001) )
168 if(iInitPointIndex<iInitPointTotal)
240 for(
int iIndex=0; iIndex<iCount; iIndex++)
virtual void Load(CStdXml &oXml, std::string strParamName, bool bThrowError=false)
Loads the lookup table.
void Clear()
Clears this lookup table.
virtual bool FindChildElement(std::string strElementName, bool fThrowError=true)
Finds a child element by name.
double m_dblDelta
The delta.
double m_dblHighLimitValue
The double high limit value.
CStdArray< CStdDPoint > m_aryInitialPoints
The initial points for the lines.
bool CompareDataPoints(CStdDPoint oPoint1, CStdDPoint oPoint2)
Compare data points.
double * m_aryM
The array of slopes.
virtual bool IntoElem()
Goes into the next element where the cursor is located.
int m_iTableSize
Size of the table.
virtual double GetChildDouble(std::string strElementName)
Gets a double value from the element with the specified name.
CStdLookupTable()
Default constructor.
double Evaluate(double dblX)
Evaluates a x value to get the calculated y value.
virtual ~CStdLookupTable()
Destructor.
A standard xml manipulation class.
double * m_aryB
The array of intercepts.
Namespace for the standard utility objects.
double m_dblLowLimitValue
The double low limit value.
void Std_TraceMsg(const int iLevel, std::string strMessage, std::string strSourceFile, int iSourceLine, bool bLogToFile, bool bPrintHeader)
Traces a message to the debugger window.
virtual bool GetChildBool(std::string strElementName)
Gets a bool value from the element with the specified name.
double m_dblEndX
The end x coordinate.
virtual void Save(CStdXml &oXml, std::string strParamName)
Saves this lookup table..
virtual int NumberOfChildren()
Gets the number of children of the current element.
virtual bool OutOfElem()
Goes out of the element where the cursor is located.
bool m_bUseLowLimitValue
true to use low limit value
bool Std_LoadPoint(CStdXml &oXml, std::string strName, CStdIPoint &oPoint, bool bThrowError)
Standard load point.
bool m_bUseHighLimitValue
true to use high limit value
void AddPoint(double dblX, double dblY)
Adds a point to the initial points.
void Initialize()
Initializes this lookup table.
double m_dblStartX
The start x coordinate.