Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Element.h File Reference


Detailed Description

Defines the mcElementData, mcElementGUI, mcElementMath, mcElementIO and mcElement classes.

See Element.cpp for more info.

Definition in file Element.h.

#include <wx/memory.h>
#include "mc/Setup.h"
#include "mc/Styles.h"
#include "mc/MathUtils.h"
#include "mc/MathHelpers.h"
#include "wx/xml2.h"
#include "mc/Object.h"

Include dependency graph for Element.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

mcELEMENT PROPERTIES SECTION

mcElementHelpers::m_nProperties variable stores flags as bit array; see #data_AddProperty() and #data_RemoveProperty() functions to get more info about setting and removing a mcElement property.

These properties must be properties regarding the current element only; for changes that applies also to the children of the current element you must change the mcElement definition.

#define mcEP_NOPROPERTIES   0
 The element has no special properties.
#define mcEP_NOTIFY_PARENTSIZE_CHANGE   1
 The parent calls the mcElement::gui_OnParentSizeChange when the parent size changes...
#define mcEP_NOTIFY_NEIGHBOR_CHANGE   2
 The parent calls the mcElement::data_OnNeighborChange() function when the one of the adjacent (on left/right, tipically) elements of this object, changes its size.
#define mcEP_FACTOREOUT_ALLOWED   4
 The element is a container and it has the ability to "take out" elements to simplify itself.
#define mcEP_INITIALIZED   8
 If set, the element has been correctly initialized.
#define mcEP_HASEXPONENT   16
 The exponent of the element is allocated.
#define mcEP_HASSUBSCRIPT   32
 The subscript of the element is allocated.
#define mcEP_NONSTANDARD_BASE   64
 This is the maximum value used by the standard mcElement property functions; If a mcElement-derived class needs to define a new property, it can use the multiples of this value (2*mcEP_NONSTANDARD_BASE, 3*mcEP_NONSTANDARD_BASE) to define it...

Defines

#define mcELEMENTMATH_MAX_EXPDEPTH   4
 The following value defines a limit to the maximum number of exponent recursions; it also defines the number of mcElementGUI styles.
#define mcELEMENTMATH_MAX_PROCESS_CYCLES   100
 The maximum number of cycles executed in simplification/expansion routines to try to perform complete simplification/expansion.
#define mcELEMENT_DBG_EXPDEPTH   1
 Adds expdepth info in mcElement::data_GetDebug().
#define mcELEMENT_DBG_SELECTION   2
 Adds selection status in mcElement::data_GetDebug().
#define mcELEMENT_DBG_ID   4
 Adds ID info in mcElement::data_GetDebug().
#define mcFIND_NOFLAGS   0
 The mcElementHelpers::math_Find() function will use the mcElementHelpers::math_Compare() function to perform non-strict comparisons.
#define mcFIND_STRICT   1
 The mcElementHelpers::math_Find() function will use the mcElementHelpers::math_Compare() function to perform a strict comparison.
#define mcFIND_PARENT   2
 The mcElementHelpers::math_Find() function will return not the element itself but its parent.
#define mcMCF_NOMODIFIERS   0
 The mcElementHelpers::gui_MoveCursor function will just move the cursor without any special behaviour.
#define mcMCF_EXTEND_SELECTION   1
 The mcElementHelpers::gui_MoveCursor function will move the cursor, extending the selection in the direction specified by the mcMoveCursorFlag given to the function.

Variables

class class class mcElement mcEmptyElement
mcPolynomial mcEmptyPolynomial


Define Documentation

#define mcELEMENT_DBG_EXPDEPTH   1
 

Adds expdepth info in mcElement::data_GetDebug().

Definition at line 65 of file Element.h.

#define mcELEMENT_DBG_ID   4
 

Adds ID info in mcElement::data_GetDebug().

Definition at line 67 of file Element.h.

#define mcELEMENT_DBG_SELECTION   2
 

Adds selection status in mcElement::data_GetDebug().

Definition at line 66 of file Element.h.

#define mcELEMENTMATH_MAX_EXPDEPTH   4
 

The following value defines a limit to the maximum number of exponent recursions; it also defines the number of mcElementGUI styles.

This #define cannot be placed in mcElementMath because it's required by mcElementGUI, whose declaration comes first.

Definition at line 58 of file Element.h.

Referenced by mcStyleArray::CreateArray(), mcStyleArray::DeepCopy(), mcStyleArray::GetCount(), mcOperatorHelpers::gui_DoRecalcSize(), mcStyleArray::ScaleSize(), and mcStyleArray::Set().

#define mcELEMENTMATH_MAX_PROCESS_CYCLES   100
 

The maximum number of cycles executed in simplification/expansion routines to try to perform complete simplification/expansion.

Definition at line 62 of file Element.h.

Referenced by mcElementHelpers::math_isMaxSimplified(), and mcElementHelpers::math_MaxSimplify().

#define mcEP_FACTOREOUT_ALLOWED   4
 

The element is a container and it has the ability to "take out" elements to simplify itself.

Definition at line 313 of file Element.h.

#define mcEP_HASEXPONENT   16
 

The exponent of the element is allocated.

This flag is necessary; an alternative would be the use of mcEP_HIDDEN on the exponent itself; however you cannot check the mcEP_HIDDEN flag on the exponent when it doesn't exist (this happens often: to optimize performances, exponents are created on-the-fly, when required...).

Definition at line 329 of file Element.h.

Referenced by mcFunctionHelpers::gui_BaseMoveCursor(), mcExpElementHelpers::gui_Draw(), mcExpElementHelpers::gui_GetSelection(), mcExpElementHelpers::gui_hasBaseSthOnLeftSide(), mcExpElementHelpers::gui_hasBaseSthOnRightSide(), mcRadicalHelpers::gui_isLeftPosEnabled(), mcFunctionHelpers::gui_MoveCursor(), mcExpElementHelpers::gui_MoveCursor(), mcExpElementHelpers::gui_MoveCursorUsingPoint(), mcExpElementHelpers::gui_OnSelect(), mcExpElementHelpers::gui_SetCursorPos(), mcFunctionHelpers::io_GetBaseInlinedExpr(), mcRadicalHelpers::io_GetInlinedExpr(), mcExpElementHelpers::io_GetInlinedExpr(), mcRadicalHelpers::io_GetMathML(), mcExpElementHelpers::io_GetMathML(), mcRadicalHelpers::io_ImportBaseInlinedExpr(), mcExpElementHelpers::math_hasExp(), and mcEP_HAS().

#define mcEP_HASSUBSCRIPT   32
 

The subscript of the element is allocated.

This flag is necessary; an alternative would be the use of mcEP_HIDDEN on the subscript itself; however you cannot check the mcEP_HIDDEN flag on the subscript when it doesn't exist (this happens often: to optimize performances, subscripts are created on-the-fly, when required...).

Definition at line 336 of file Element.h.

Referenced by mcFunctionHelpers::gui_BaseMoveCursor(), mcExpElementHelpers::gui_Draw(), mcExpElementHelpers::gui_GetBaseAndSubSize(), mcExpElementHelpers::gui_hasBaseSthOnRightSide(), mcFunctionHelpers::gui_MoveCursor(), mcExpElementHelpers::gui_MoveCursor(), mcExpElementHelpers::gui_SetCursorPos(), mcFunctionHelpers::io_GetBaseInlinedExpr(), mcExpElementHelpers::io_GetInlinedExpr(), mcExpElementHelpers::io_GetMathML(), mcExpElementHelpers::math_hasSub(), and mcEP_HAS().

#define mcEP_INITIALIZED   8
 

If set, the element has been correctly initialized.

If not, the element is not ready yet or it does not use this flag (which is generally used for GUI input only).

Definition at line 318 of file Element.h.

Referenced by mcElementArrayHelpers::data_AddNewEmptyBox(), mcPolynomialHelpers::data_AddNewEmptyMonomial(), mcSymbolHelpers::gui_BaseInput(), mcFunctionHelpers::gui_BaseInput(), mcExpContainerHelpers::gui_BaseInput(), mcParenthesisHelpers::gui_Input(), mcFractionHelpers::gui_Input(), mcEmptyBoxHelpers::gui_Input(), mcDecorationHelpers::gui_Input(), mcPolynomialHelpers::gui_ReplaceBracket(), mcFunctionHelpers::gui_Setup(), mcSymbolHelpers::io_ImportBaseInlinedExpr(), mcNumberHelpers::io_ImportBaseInlinedExpr(), mcSymbolHelpers::io_ImportPresentationMathML(), mcNumberHelpers::io_ImportPresentationMathML(), mcAddSubOp::mcAddSubOp(), and mcMultDivOp::mcMultDivOp().

#define mcEP_NONSTANDARD_BASE   64
 

This is the maximum value used by the standard mcElement property functions; If a mcElement-derived class needs to define a new property, it can use the multiples of this value (2*mcEP_NONSTANDARD_BASE, 3*mcEP_NONSTANDARD_BASE) to define it...

Definition at line 342 of file Element.h.

#define mcEP_NOPROPERTIES   0
 

The element has no special properties.

This is the default initial property of every mcElement. If you want to add a property to the element, add in the mcElement constructor a call to mcElement::data_AddProperty.

Definition at line 301 of file Element.h.

Referenced by mcElementHelpers::mcElementHelpers().

#define mcEP_NOTIFY_NEIGHBOR_CHANGE   2
 

The parent calls the mcElement::data_OnNeighborChange() function when the one of the adjacent (on left/right, tipically) elements of this object, changes its size.

Definition at line 309 of file Element.h.

Referenced by mcElementArrayHelpers::data_Set(), mcElementArrayHelpers::data_UpdateNeighbor(), and mcParenthesisHelpers::mcParenthesisHelpers().

#define mcEP_NOTIFY_PARENTSIZE_CHANGE   1
 

The parent calls the mcElement::gui_OnParentSizeChange when the parent size changes...

Definition at line 305 of file Element.h.

#define mcFIND_NOFLAGS   0
 

The mcElementHelpers::math_Find() function will use the mcElementHelpers::math_Compare() function to perform non-strict comparisons.

See #math_Compare() for more info.

Definition at line 73 of file Element.h.

Referenced by mcMonomialHelpers::math_isSimilarTo().

#define mcFIND_PARENT   2
 

The mcElementHelpers::math_Find() function will return not the element itself but its parent.

Definition at line 82 of file Element.h.

Referenced by mcElementHelpers::math_RecursiveFind(), mcElementHelpers::math_RecursiveFindInChildrenOnly(), and mcElementHelpers::math_Replace().

#define mcFIND_STRICT   1
 

The mcElementHelpers::math_Find() function will use the mcElementHelpers::math_Compare() function to perform a strict comparison.

See #math_Compare() for more info.

Definition at line 78 of file Element.h.

Referenced by mcElementArrayHelpers::math_Compare().

#define mcMCF_EXTEND_SELECTION   1
 

The mcElementHelpers::gui_MoveCursor function will move the cursor, extending the selection in the direction specified by the mcMoveCursorFlag given to the function.

Definition at line 92 of file Element.h.

Referenced by mcSymbolHelpers::gui_BaseMoveCursor().

#define mcMCF_NOMODIFIERS   0
 

The mcElementHelpers::gui_MoveCursor function will just move the cursor without any special behaviour.

Definition at line 87 of file Element.h.

Referenced by mcPolynomialHelpers::data_ReplaceParentheses(), and mcExpElementHelpers::gui_ExpSubInput().


Variable Documentation

class class class class mcElement mcEmptyElement
 

Definition at line 72 of file Element.cpp.

Referenced by mcPolynomialHelpers::data_AddNewWrappedElement(), mcMathMngHelpers::data_DeepCopy(), mcExpElementHelpers::data_DeepCopyExpSub(), mcExpElementHelpers::data_DestroyExpSub(), mcElementArrayHelpers::data_DetachAll(), mcElementArrayHelpers::data_DetachLastElem(), mcDecorationHelpers::data_GetConstChild(), mcElementHelpers::data_GetConstChild(), mcExpContainerHelpers::data_GetConstChild(), mcExpElementHelpers::data_GetConstChild(), mcFractionHelpers::data_GetConstChild(), mcFunctionHelpers::data_GetConstChild(), mcMathMngHelpers::data_GetConstChild(), mcTextHelpers::data_GetConstChild(), mcElementArrayHelpers::data_GetElemAtLeftOf(), mcElementArrayHelpers::data_GetElemAtRightOf(), mcElementHelpers::data_GetElemFromID(), mcElementArrayHelpers::data_GetWrapped(), mcPolynomialHelpers::data_GetWrapped(), mcElementArrayHelpers::data_isEmptyEntry(), mcElementArrayHelpers::data_isValidElem(), mcPolynomialHelpers::data_ReplaceParentheses(), mcElementArrayHelpers::data_SetAsEmptyEntry(), mcSymbolHelpers::data_SetSubscript(), mcPolynomialHelpers::gui_BackInput(), mcMonomialHelpers::gui_DoSplit(), mcPolynomialHelpers::gui_DoSplit(), mcExpElementHelpers::gui_EditExpSub(), mcElementArrayHelpers::gui_ExGetActiveElem(), mcElementHelpers::gui_GetActiveElem(), mcExpElementHelpers::gui_GetBaseSelection(), mcMathOrSystemHelpers::gui_GetFocusLine(), mcElementArrayHelpers::gui_GetSelection(), mcElementArrayHelpers::gui_GetSelElem(), mcElementArrayHelpers::gui_GetSelElemOfType(), mcPolynomialHelpers::gui_Input(), mcExpElementHelpers::gui_RecalcExpSubSize(), mcPolynomialHelpers::gui_ReplaceBracket(), mcElementHelpers::gui_SetAsExpOf(), mcElementHelpers::gui_SetAtSameLevelOf(), mcMonomialHelpers::gui_Split(), mcSymbolHelpers::gui_SubInput(), mcExpElementHelpers::gui_UpdateExpDepth(), mcFractionHelpers::io_CheckBracketNeed(), mcElementHelpers::math_Contains(), mcExpElementHelpers::math_GetConstExp(), mcExpElementHelpers::math_GetConstSub(), mcExpElementHelpers::math_GetExp(), mcDecorationHelpers::math_GetGCD(), mcPolynomialHelpers::math_GetGCDFor(), mcDecorationHelpers::math_GetLCM(), mcMonomialHelpers::math_GetMaxDegreeFor(), mcElementArrayHelpers::math_GetWrapped(), mcPolynomialHelpers::math_GetWrapped(), mcElementArrayHelpers::math_GetWrappedNumber(), mcElementArrayHelpers::math_GetWrappedSymbol(), mcElementArrayHelpers::math_HandleBasicOpRes(), mcExpElementHelpers::math_hasExp(), mcExpElementHelpers::math_hasSub(), mcMonomialHelpers::math_MultiplyBy(), mcPolynomialHelpers::math_MultiplyBy(), mcPolynomialHelpers::math_PackSign(), mcElementHelpers::math_RecursiveFind(), mcElementHelpers::math_RecursiveFindInChildrenOnly(), mcElementArrayHelpers::math_ReorderElements(), mcElementHelpers::math_Replace(), mcPolySolver::math_ResetCoeffArr(), mcRange::math_Set(), mcNumberHelpers::math_SimplifyBase(), mcElementArrayHelpers::math_SimplifySolveOp(), mcPolynomialHelpers::math_SimplifySolveOp(), and mcMonomialHelpers::math_TransformDivOp().

mcPolynomial mcEmptyPolynomial
 

Referenced by mcExpContainerHelpers::data_GetChildrenCount(), mcMathMngHelpers::data_SetMember(), mcElementHelpers::math_ContainsNumber(), mcElementHelpers::math_ContainsSymbol(), mcPolynomialHelpers::math_FactoreOut(), mcPolySolver::math_GetPolyCoeff(), and mcPolySolver::math_SolveLineSecondDegree().



Documentation generated with Doxygen on Sun Feb 6 17:11:03 2005
Visit MathStudio home page for more info

[ Top ]