#include <MathHelpers.h>
Inheritance diagram for mcSymbolArray:
Definition at line 885 of file MathHelpers.h.
Public Member Functions | |
mcSymbolArray (int type=mcSYM_NOTSET, void(*fnc)(void)=NULL) | |
virtual | ~mcSymbolArray () |
mcSymbolProperties * | data_AddSymbol (bool bRemovePrevious, const wxString &name, wxFontEncoding enc=wxFONTENCODING_DEFAULT, const mcRealValue &value=0.0, const wxString &inlinedsym=wxEmptyString, const wxString &subscript=wxEmptyString, mcExtRange *domain=NULL) |
math_Adds a new mcSymbolProperties entry to the array, iniziatializing it with the given data and then returning it. | |
bool | data_AddSymbol (const mcSymbolProperties &newsym, bool bRemovePrevious=TRUE) |
math_Adds a copy of the given mcSymbolProperties object to the array. | |
mcSymbolProperties * | data_MoveSymbols (int i, mcSymbolArray *parr) |
Moves the i-th symbol to the given mcSymbolArray, removing it from this array and preserving data integrity. | |
int | data_FindSymbol (long flags, const wxString &name, wxFontEncoding enc=wxFONTENCODING_DEFAULT, const mcRealValue &value=0.0, const wxString &subscript=wxEmptyString, const wxString &inlined=wxEmptyString, int occurrence=0) const |
Returns the index of the entry containing a symbol with the same given features; -1 if no such symbols are registered in this array. | |
int | data_FindSymbol (long flags, const mcSymbolProperties &symtofind, int occ=0) const |
void | data_LinkWithArray (mcSymbolArray *p) |
Links *this with the given array. | |
INLINE getters/setters. @{ | |
mcSymbolProperties * | data_GetSymbol (int n) |
const mcSymbolProperties * | data_GetSymbol (int n) const |
wxString | data_GetSymbolName (int n) const |
wxString | data_GetSubscript (int n) const |
wxString | io_GetInlinedSymbol (int n) const |
mcRealValue | math_GetValue (int n) const |
wxFontEncoding | data_GetEncoding (int n) const |
int | data_GetArrayId () const |
Public Attributes | |
void(* | m_pAddSymbolCallback )(void) |
The callback function which is called when #math_AddSymbol manages to add a new symbol to the array. | |
Protected Member Functions | |
void | data_Delete (int n) |
Deletes the n-th entry of the array. | |
mcAbstractItem * | data_GetCopyOf (int n) const |
Copies the n-th object of the array and returns a pointer to it. | |
void | data_ResetLinkedArr () |
Resets to NULL the m_pArr array of pointers. | |
Protected Attributes | |
int | m_nSymbolArray |
The ID of this array; all the mcSymbolProperties contained in #m_arrSym should have their mcSymbolProperties::m_nSymbolType variables all set to the same value of m_nSymbolArray. | |
mcSymbolArray * | m_pArr [mcMAX_SYMBOL_ARRAY_NUM] |
The list of the arrays to check when trying to add a new symbol. |
|
Definition at line 918 of file MathHelpers.h. References data_ResetLinkedArr(), m_nSymbolArray, and m_pAddSymbolCallback. |
|
Definition at line 925 of file MathHelpers.h. References mcAbstractArray::data_Clear(). |
|
math_Adds a copy of the given mcSymbolProperties object to the array. If 'bRemovePrevious' == TRUE then all the symbols with the same name that are found in the array linked with this one (see #LinkWithArray) are removed. If 'bRemovePrevious' == FALSE and another symbol with the same name is already present, then the function does nothing and returns FALSE; this is because all mcSymbolProperties *must* have different names. After the symbol has been added, before returning TRUE, also the m_pAddSymbolCallback function, if not null, is called. Definition at line 757 of file MathHelpers.cpp. References mcAbstractArray::data_Add(), mcSymbolProperties::data_Clone(), mcSymbolProperties::data_GetLinkedSym(), mcSymbolProperties::data_GetLinkedSymCount(), data_GetSymbol(), mcSymbolHelpers::data_LinkWith(), mcAbstractArray::data_RemoveAt(), mcSymbolHelpers::data_Unlink(), m_nSymbolArray, mcSymbolProperties::m_nSymbolType, m_pAddSymbolCallback, m_pArr, mcSymbolProperties::math_FindDuplicate(), mcASSERT, mcMAX_SYMBOL_ARRAY_NUM, and mcSYM_NOTFOUND. |
|
math_Adds a new mcSymbolProperties entry to the array, iniziatializing it with the given data and then returning it. See the other overloading for more info. Definition at line 739 of file MathHelpers.cpp. References mcAbstractArray::data_GetCount(), data_GetSymbol(), and m_nSymbolArray. Referenced by mcSymbol::LoadDefaultSymbols(), and mcSymbol::LoadSymbols(). |
|
Deletes the n-th entry of the array.
Implements mcAbstractArray. Definition at line 899 of file MathHelpers.h. References data_GetSymbol(). |
|
Definition at line 712 of file MathHelpers.cpp. References mcAbstractArray::data_GetCount(), data_GetEncoding(), data_GetSubscript(), data_GetSymbolName(), io_GetInlinedSymbol(), math_GetValue(), mcSYM_NOTFOUND, mcSYMFIND_MATCH_ENCODING, mcSYMFIND_MATCH_INLINED, mcSYMFIND_MATCH_NAME, mcSYMFIND_MATCH_SUBSCRIPT, and mcSYMFIND_MATCH_VALUE. |
|
Returns the index of the entry containing a symbol with the same given features; -1 if no such symbols are registered in this array.
Definition at line 700 of file MathHelpers.cpp. References mcSYM_NOTSET. |
|
Definition at line 1002 of file MathHelpers.h. References m_nSymbolArray. Referenced by mcSymbolHelpers::data_Update(). |
|
Copies the n-th object of the array and returns a pointer to it. Those arrays which do not need to use #DeepCopy can safely ignore function; a default implementation which returns NULL is provided. Reimplemented from mcAbstractArray. Definition at line 901 of file MathHelpers.h. References mcSymbolProperties::data_Clone(), data_GetSymbol(), and mcAbstractItem. |
|
Definition at line 1001 of file MathHelpers.h. References data_GetSymbol(), and mcSymbolProperties::m_fEncoding. Referenced by data_FindSymbol(). |
|
Definition at line 998 of file MathHelpers.h. References data_GetSymbol(), and mcSymbolProperties::m_strSubscript. Referenced by data_FindSymbol(), and mcSymbol::data_GetSubscript(). |
|
Definition at line 995 of file MathHelpers.h. References mcAbstractArray::data_GetItem(). |
|
|
Definition at line 997 of file MathHelpers.h. References data_GetSymbol(), and mcSymbolProperties::m_strSymbol. Referenced by data_FindSymbol(). |
|
Links *this with the given array. In this way, when you call the #math_AddSymbol function, it will scan the given array to avoid duplicates of symbols with the same name. The function will then remove the symbol in the given array or it will just return FALSE. Anyway, with this system, we can easily prevent array corruption. Definition at line 981 of file MathHelpers.h. References m_pArr. Referenced by mcSymbol::InitSymbols(). |
|
Moves the i-th symbol to the given mcSymbolArray, removing it from this array and preserving data integrity. Returns a pointer to the new symbol. Definition at line 862 of file MathHelpers.cpp. References mcSymbolProperties::data_Clone(), data_GetSymbol(), and mcSAFE_DELETE. |
|
Resets to NULL the m_pArr array of pointers.
Definition at line 905 of file MathHelpers.h. References m_pArr, and mcMAX_SYMBOL_ARRAY_NUM. Referenced by mcSymbolArray(). |
|
Definition at line 999 of file MathHelpers.h. References data_GetSymbol(), and mcSymbolProperties::io_GetInlinedSym(). Referenced by data_FindSymbol(). |
|
Definition at line 1000 of file MathHelpers.h. References data_GetSymbol(), and mcSymbolProperties::m_fValue. Referenced by data_FindSymbol(). |
|
The ID of this array; all the mcSymbolProperties contained in #m_arrSym should have their mcSymbolProperties::m_nSymbolType variables all set to the same value of m_nSymbolArray.
Definition at line 892 of file MathHelpers.h. Referenced by data_AddSymbol(), data_GetArrayId(), and mcSymbolArray(). |
|
The callback function which is called when #math_AddSymbol manages to add a new symbol to the array.
Referenced by data_AddSymbol(), and mcSymbolArray(). |
|
The list of the arrays to check when trying to add a new symbol.
Definition at line 895 of file MathHelpers.h. Referenced by data_AddSymbol(), data_LinkWithArray(), and data_ResetLinkedArr(). |
[ Top ] |