#include <MathHelpers.h>
Inheritance diagram for mcSymbolProperties:
Definition at line 699 of file MathHelpers.h.
Public Member Functions | |
mcSymbolProperties (int symtype=mcSYM_NOTSET, const wxString &name=wxEmptyString, wxFontEncoding encoding=wxFONTENCODING_DEFAULT, const mcRealValue &value=0.0, const wxString &inlinedsym=wxEmptyString, const wxString &subscript=wxEmptyString, mcExtRange *domain=NULL, bool evaluating=FALSE) | |
Inits this class with default values or user-supplied values. | |
virtual | ~mcSymbolProperties () |
mcSymbolProperties * | data_Clone () const |
Clones this object returning an identic copy. | |
wxString | io_GetInlinedSym () const |
Returns m_strInlinedSymbol if it's not empty. | |
wxString | io_GetInlinedExpr () const |
void | data_Check () const |
Checks if this symbol holds valid info. | |
int | math_FindDuplicate (const mcSymbolArray *tosearch, int occ) const |
If a duplicate symbol (for comparison, #isSameAs is used) is found, then the function returns the index of the duplicate entry. | |
LINKING functions | |
void | data_Link (const mcSymbolHelpers *p) |
Links this object with the given symbol. | |
void | data_Unlink (const mcSymbolHelpers *p) |
int | data_GetLinkedSymCount () const |
mcSymbolHelpers * | data_GetLinkedSym (int n) const |
const mcSymbolHelpers * | data_GetSafeLinkedSym () const |
Returns a "safe symbol" associated with this object. | |
CHECK functions | |
Instead of reading m_nSymbolType, you can use these.... | |
bool | data_isRegistered () const |
bool | data_isParameter () const |
bool | data_isUnknown () const |
bool | data_isConstant () const |
bool | data_isUnlinked () const |
bool | data_isSameAs (const mcSymbolProperties &s) const |
bool | math_isBeingEvaluated () const |
Public Attributes | |
int | m_nSymbolType |
A mcSYM_XXX ID that identifies this symbol as a parameter, a constant or an unknown... | |
wxFontEncoding | m_fEncoding |
The encoding of the font which should be used to render this symbol. | |
wxString | m_strSymbol |
The name of the symbol represented by this object. | |
wxString | m_strSubscript |
The subscript associated with this symbol. | |
mcRealValue | m_fValue |
The value of this symbol if it is a constant. | |
mcExtRange * | m_pDomain |
The domain of this symbol (if a parameter or unknown). | |
bool | m_bEvaluating |
If TRUE, then this unknown/parameter (this variable is useless for constants) is being used with a specific value (set into m_fValue) and thus it must be considered temporary as a constant. | |
Protected Attributes | |
wxString | m_strInlinedSymbol |
m_strSymbol string is used. | |
wxArrayLong | m_arrLinkedSymbol |
The list of mcSymbols linked to this class. | |
Friends | |
class | mcSymbolArray |
|
Inits this class with default values or user-supplied values.
Definition at line 592 of file MathHelpers.cpp. References mcSymbolHelpers::data_LinkWith(), m_bEvaluating, m_fEncoding, m_fValue, m_nSymbolType, m_pDomain, m_strInlinedSymbol, m_strSubscript, and m_strSymbol. Referenced by data_Clone(). |
|
Definition at line 622 of file MathHelpers.cpp. References mcSymbolHelpers::data_Unlink(), m_arrLinkedSymbol, and mcASSERT. |
|
Checks if this symbol holds valid info. If something is wrong, then an assert fails. Definition at line 801 of file MathHelpers.h. References data_isConstant(), m_fValue, m_nSymbolType, m_strSymbol, mcASSERT, and mcSYM_NOTSET. Referenced by mcSymbol::CheckArray(), and mcSolver::math_Solve(). |
|
Clones this object returning an identic copy. Remember that mcSymbol arrays cannot contain duplicates. Definition at line 783 of file MathHelpers.h. References m_bEvaluating, m_fEncoding, m_fValue, m_nSymbolType, m_pDomain, m_strInlinedSymbol, m_strSubscript, m_strSymbol, and mcSymbolProperties(). Referenced by mcSymbolArray::data_AddSymbol(), mcSymbolArray::data_GetCopyOf(), and mcSymbolArray::data_MoveSymbols(). |
|
Definition at line 831 of file MathHelpers.h. References m_arrLinkedSymbol. Referenced by mcSymbolArray::data_AddSymbol(), and data_GetSafeLinkedSym(). |
|
Definition at line 830 of file MathHelpers.h. References m_arrLinkedSymbol. Referenced by mcSymbolArray::data_AddSymbol(). |
|
Returns a "safe symbol" associated with this object. This is a reserved mcSymbolHelpers class which is always a valid pointer and is always linked to this mcSymbolProperties. Definition at line 836 of file MathHelpers.h. References data_GetLinkedSym(), and mcASSERT. Referenced by mcElementHelpers::math_ContainsOneOf(). |
|
Definition at line 850 of file MathHelpers.h. References m_nSymbolType, and mcSYM_CONSTANT. Referenced by data_Check(), and mcSymbolHelpers::data_isConstant(). |
|
Definition at line 848 of file MathHelpers.h. References m_nSymbolType, and mcSYM_PARAMETER. Referenced by mcSymbolHelpers::data_isParameter(). |
|
Definition at line 847 of file MathHelpers.h. References m_nSymbolType, and mcSYM_UNREGISTERED. Referenced by mcSymbolHelpers::data_isRegistered(). |
|
Definition at line 647 of file MathHelpers.cpp. References io_GetInlinedSym(), m_fEncoding, m_strSubscript, and m_strSymbol. Referenced by math_FindDuplicate(). |
|
Definition at line 849 of file MathHelpers.h. References m_nSymbolType, and mcSYM_UNKNOWN. Referenced by mcSymbolHelpers::data_isUnknown(). |
|
Definition at line 851 of file MathHelpers.h. References m_arrLinkedSymbol. |
|
Links this object with the given symbol.
Definition at line 827 of file MathHelpers.h. References m_arrLinkedSymbol. Referenced by mcSymbolHelpers::data_LinkWith(). |
|
Definition at line 828 of file MathHelpers.h. References m_arrLinkedSymbol. Referenced by mcSymbolHelpers::data_Unlink(), and mcSymbolHelpers::data_Update(). |
|
Definition at line 795 of file MathHelpers.h. References io_GetInlinedSym(). |
|
Returns m_strInlinedSymbol if it's not empty. Returns m_strSymbol otherwise. Definition at line 793 of file MathHelpers.h. References m_strInlinedSymbol, and m_strSymbol. Referenced by mcSymbolHelpers::data_GetInlinedSymbol(), data_isSameAs(), io_GetInlinedExpr(), and mcSymbolArray::io_GetInlinedSymbol(). |
|
If a duplicate symbol (for comparison, #isSameAs is used) is found, then the function returns the index of the duplicate entry.
Definition at line 665 of file MathHelpers.cpp. References mcSymbolHelpers::data_GetSymbol(), data_isSameAs(), mcSYM_NOTFOUND, and mcSYMFIND_MATCH_NAME. Referenced by mcSymbolArray::data_AddSymbol(). |
|
Definition at line 854 of file MathHelpers.h. References m_bEvaluating. |
|
Definition at line 701 of file MathHelpers.h. |
|
The list of mcSymbols linked to this class. The first entry is reserved for the "safe symbol" associated to this mcSymbolProperties class. Definition at line 714 of file MathHelpers.h. Referenced by data_GetLinkedSym(), data_GetLinkedSymCount(), data_isUnlinked(), data_Link(), data_Unlink(), and ~mcSymbolProperties(). |
|
If TRUE, then this unknown/parameter (this variable is useless for constants) is being used with a specific value (set into m_fValue) and thus it must be considered temporary as a constant.
Definition at line 763 of file MathHelpers.h. Referenced by data_Clone(), mcElementHelpers::math_EvaluateAt(), math_isBeingEvaluated(), and mcSymbolProperties(). |
|
The encoding of the font which should be used to render this symbol. If the renderer cannot set this font encoding then it should use the string returned by #GetInlinedSym(). Definition at line 726 of file MathHelpers.h. Referenced by data_Clone(), mcSymbolArray::data_GetEncoding(), mcSymbolHelpers::data_isGreekSymbol(), data_isSameAs(), mcSymbolHelpers::data_SetAsGreek(), and mcSymbolProperties(). |
|
The value of this symbol if it is a constant. This variable can be used temporary also when this symbol is an unknown or a parameter... see m_bEvaluating. Definition at line 744 of file MathHelpers.h. Referenced by data_Check(), data_Clone(), mcSymbolHelpers::data_GetValue(), mcSymbolHelpers::data_SetValue(), mcElementHelpers::math_EvaluateAt(), mcSymbolArray::math_GetValue(), and mcSymbolProperties(). |
|
A mcSYM_XXX ID that identifies this symbol as a parameter, a constant or an unknown...
Definition at line 721 of file MathHelpers.h. Referenced by mcSymbolArray::data_AddSymbol(), data_Check(), data_Clone(), data_isConstant(), data_isParameter(), data_isRegistered(), data_isUnknown(), mcSymbolHelpers::data_Update(), and mcSymbolProperties(). |
|
The domain of this symbol (if a parameter or unknown). This object also contains info about the set of numbers considered (Z, N, R, C). This is a pointer (and not directly a mcExtRange) for performance reasons (and to save memory for constants). Definition at line 751 of file MathHelpers.h. Referenced by data_Clone(), mcSymbolHelpers::data_GetDomain(), and mcSymbolProperties(). |
|
m_strSymbol string is used. Use #GetInlinedSym() to get this variable. Definition at line 709 of file MathHelpers.h. Referenced by data_Clone(), io_GetInlinedSym(), and mcSymbolProperties(). |
|
The subscript associated with this symbol. This string can be safely empty. Definition at line 737 of file MathHelpers.h. Referenced by data_Clone(), mcSymbolHelpers::data_GetSubscript(), mcSymbolArray::data_GetSubscript(), data_isSameAs(), mcSymbolHelpers::data_SetSubscript(), mcSymbolHelpers::gui_SubInput(), and mcSymbolProperties(). |
|
The name of the symbol represented by this object. VERY IMPORTANT: this string should be an ANSI string without any special character and it *must* be UNIQUE among all mcSymbolArrays (this task should be performed by mcSymbolArray::math_AddSymbol). Definition at line 733 of file MathHelpers.h. Referenced by data_Check(), data_Clone(), mcSymbolHelpers::data_GetSymbol(), mcSymbolArray::data_GetSymbolName(), data_isSameAs(), io_GetInlinedSym(), and mcSymbolProperties(). |
[ Top ] |