AnimatLab  2
Test
StdUtils::CStdLookupTable Class Reference

Standard lookup table. More...

#include <StdLookupTable.h>

+ Collaboration diagram for StdUtils::CStdLookupTable:

Public Member Functions

 CStdLookupTable ()
 Default constructor. More...
 
virtual ~CStdLookupTable ()
 Destructor. More...
 
void AddPoint (double dblX, double dblY)
 Adds a point to the initial points. More...
 
void Clear ()
 Clears this lookup table. More...
 
double Delta ()
 Gets the delta. More...
 
double EndX ()
 Gets the ends x coordinate. More...
 
double Evaluate (double dblX)
 Evaluates a x value to get the calculated y value. More...
 
double HighLimitValue ()
 Gets the high limit value. More...
 
void HighLimitValue (double dblVal)
 Sets the high limit value. More...
 
void Initialize ()
 Initializes this lookup table. More...
 
CStdDPoint InitialPoint (int iIndex)
 Gets the initial point at the specified index. More...
 
int InitialPointCount ()
 Gets the initial point count. More...
 
virtual void Load (CStdXml &oXml, std::string strParamName, bool bThrowError=false)
 Loads the lookup table. More...
 
double LowLimitValue ()
 Gets the low limit value. More...
 
void LowLimitValue (double dblVal)
 Sets the low limit value. More...
 
virtual void Save (CStdXml &oXml, std::string strParamName)
 Saves this lookup table.. More...
 
double StartX ()
 Gets the start x coordinate. More...
 
int TableSize ()
 Gets the table size. More...
 
bool UseHighLimitValue ()
 Gets the use high limit value. More...
 
void UseHighLimitValue (bool bVal)
 Sets the use high limit value. More...
 
bool UseLowLimitValue ()
 Gets the use low limit value. More...
 
void UseLowLimitValue (bool bVal)
 Sets the use low limit value. More...
 

Protected Attributes

double * m_aryB
 The array of intercepts.
 
CStdArray< CStdDPoint > m_aryInitialPoints
 The initial points for the lines.
 
double * m_aryM
 The array of slopes.
 
bool m_bUseHighLimitValue
 true to use high limit value
 
bool m_bUseLowLimitValue
 true to use low limit value
 
double m_dblDelta
 The delta.
 
double m_dblEndX
 The end x coordinate.
 
double m_dblHighLimitValue
 The double high limit value.
 
double m_dblLowLimitValue
 The double low limit value.
 
double m_dblStartX
 The start x coordinate.
 
int m_iTableSize
 Size of the table.
 

Detailed Description

Standard lookup table.

This class allows you to specify a sequence of lines to implement a curve. You can then specify an x point on that curve, and it will calculate the y point from the appropriate line.

Author
dcofer
Date
5/3/2011

Definition at line 20 of file StdLookupTable.h.

Constructor & Destructor Documentation

StdUtils::CStdLookupTable::CStdLookupTable ( )

Default constructor.

Author
dcofer
Date
5/3/2011

Definition at line 19 of file StdLookupTable.cpp.

References m_aryB, m_aryM, m_bUseHighLimitValue, m_bUseLowLimitValue, m_dblDelta, m_dblEndX, m_dblHighLimitValue, m_dblLowLimitValue, m_dblStartX, and m_iTableSize.

StdUtils::CStdLookupTable::~CStdLookupTable ( )
virtual

Destructor.

Author
dcofer
Date
5/3/2011

Definition at line 40 of file StdLookupTable.cpp.

References Clear(), and StdUtils::Std_TraceMsg().

+ Here is the call graph for this function:

Member Function Documentation

void StdUtils::CStdLookupTable::AddPoint ( double  dblX,
double  dblY 
)

Adds a point to the initial points.

Author
dcofer
Date
5/3/2011
Parameters
dblXThe double x coordinate.
dblYThe double y coordinate.

Definition at line 76 of file StdLookupTable.cpp.

References m_aryInitialPoints.

void StdUtils::CStdLookupTable::Clear ( )

Clears this lookup table.

Author
dcofer
Date
5/3/2011

Definition at line 56 of file StdLookupTable.cpp.

References m_aryB, m_aryInitialPoints, and m_aryM.

Referenced by ~CStdLookupTable().

+ Here is the caller graph for this function:

double StdUtils::CStdLookupTable::Delta ( )
inline

Gets the delta.

Author
dcofer
Date
5/3/2011
Returns
delta.

Definition at line 100 of file StdLookupTable.h.

double StdUtils::CStdLookupTable::EndX ( )
inline

Gets the ends x coordinate.

Author
dcofer
Date
5/3/2011
Returns
x corrdinate.

Definition at line 120 of file StdLookupTable.h.

double StdUtils::CStdLookupTable::Evaluate ( double  dblX)

Evaluates a x value to get the calculated y value.

Author
dcofer
Date
5/3/2011
Parameters
dblXThe double x coordinate.
Returns
.

Definition at line 191 of file StdLookupTable.cpp.

References m_aryB, m_aryM, m_bUseLowLimitValue, m_dblDelta, m_dblEndX, m_dblLowLimitValue, m_dblStartX, and m_iTableSize.

double StdUtils::CStdLookupTable::HighLimitValue ( )
inline

Gets the high limit value.

Author
dcofer
Date
5/3/2011
Returns
high limit.

Definition at line 190 of file StdLookupTable.h.

void StdUtils::CStdLookupTable::HighLimitValue ( double  dblVal)
inline

Sets the high limit value.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe double value.

Definition at line 200 of file StdLookupTable.h.

void StdUtils::CStdLookupTable::Initialize ( )

Initializes this lookup table.

Author
dcofer
Date
5/3/2011

Definition at line 107 of file StdLookupTable.cpp.

References StdUtils::CompareDataPoints(), m_aryB, m_aryInitialPoints, m_aryM, m_dblDelta, m_dblEndX, m_dblStartX, and m_iTableSize.

+ Here is the call graph for this function:

CStdDPoint StdUtils::CStdLookupTable::InitialPoint ( int  iIndex)
inline

Gets the initial point at the specified index.

Author
dcofer
Date
5/3/2011
Parameters
iIndexZero-based index of the initial point.
Returns
.

Definition at line 80 of file StdLookupTable.h.

int StdUtils::CStdLookupTable::InitialPointCount ( )
inline

Gets the initial point count.

Author
dcofer
Date
5/3/2011
Returns
count.

Definition at line 68 of file StdLookupTable.h.

void StdUtils::CStdLookupTable::Load ( CStdXml oXml,
std::string  strParamName,
bool  bThrowError = false 
)
virtual

Loads the lookup table.

Author
dcofer
Date
5/3/2011
Parameters
[in,out]oXmlThe xml to load.
strParamNameName of the xml parameter.
bThrowErrortrue to throw error if there is a problem.

Definition at line 230 of file StdLookupTable.cpp.

References StdUtils::CStdXml::FindChildElement(), StdUtils::CStdXml::GetChildBool(), StdUtils::CStdXml::GetChildDouble(), StdUtils::CStdXml::IntoElem(), m_aryInitialPoints, m_bUseHighLimitValue, m_bUseLowLimitValue, m_dblHighLimitValue, m_dblLowLimitValue, StdUtils::CStdXml::NumberOfChildren(), StdUtils::CStdXml::OutOfElem(), and StdUtils::Std_LoadPoint().

+ Here is the call graph for this function:

double StdUtils::CStdLookupTable::LowLimitValue ( )
inline

Gets the low limit value.

Author
dcofer
Date
5/3/2011
Returns
low limit.

Definition at line 170 of file StdLookupTable.h.

void StdUtils::CStdLookupTable::LowLimitValue ( double  dblVal)
inline

Sets the low limit value.

Author
dcofer
Date
5/3/2011
Parameters
dblValThe double value.

Definition at line 180 of file StdLookupTable.h.

void StdUtils::CStdLookupTable::Save ( CStdXml oXml,
std::string  strParamName 
)
virtual

Saves this lookup table..

Author
dcofer
Date
5/3/2011
Parameters
[in,out]oXmlThe xml to save.
strParamNameName of the xml parameter.

Definition at line 264 of file StdLookupTable.cpp.

double StdUtils::CStdLookupTable::StartX ( )
inline

Gets the start x coordinate.

Author
dcofer
Date
5/3/2011
Returns
x coordinate.

Definition at line 110 of file StdLookupTable.h.

int StdUtils::CStdLookupTable::TableSize ( )
inline

Gets the table size.

Author
dcofer
Date
5/3/2011
Returns
size.

Definition at line 90 of file StdLookupTable.h.

bool StdUtils::CStdLookupTable::UseHighLimitValue ( )
inline

Gets the use high limit value.

Author
dcofer
Date
5/3/2011
Returns
true if it succeeds, false if it fails.

Definition at line 150 of file StdLookupTable.h.

void StdUtils::CStdLookupTable::UseHighLimitValue ( bool  bVal)
inline

Sets the use high limit value.

Author
dcofer
Date
5/3/2011
Parameters
bValtrue to value.

Definition at line 160 of file StdLookupTable.h.

bool StdUtils::CStdLookupTable::UseLowLimitValue ( )
inline

Gets the use low limit value.

Author
dcofer
Date
5/3/2011
Returns
true if it succeeds, false if it fails.

Definition at line 130 of file StdLookupTable.h.

void StdUtils::CStdLookupTable::UseLowLimitValue ( bool  bVal)
inline

Sets the use low limit value.

Author
dcofer
Date
5/3/2011
Parameters
bValtrue to value.

Definition at line 140 of file StdLookupTable.h.


The documentation for this class was generated from the following files: