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

mcMathOrSystemHelpers Class Reference

#include <MathOrSystem.h>

Inheritance diagram for mcMathOrSystemHelpers:

Inheritance graph
[legend]
Collaboration diagram for mcMathOrSystemHelpers:

Collaboration graph
[legend]
List of all members.

Detailed Description

A set of mcMathLines connected with an OR logical operator.

Definition at line 53 of file MathOrSystem.h.

Public Member Functions

 mcMathOrSystemHelpers ()
virtual ~mcMathOrSystemHelpers ()
mcMathAndSystemdata_GetSys (int n)
const mcMathAndSystemdata_GetSys (int n) const
mcMathAndSystemdata_GetLastSys ()
const mcMathAndSystemdata_GetLastSys () const
void data_AddSys (mcMathAndSystem *toadd)
void data_AddLineToNewAndSystem (mcMathLine *toadd)
void data_AddLineToLastAndSystem (mcMathLine *toadd)
int data_GetLineCount () const
 Returns the total count of the lines contained into all our mcMathAndSystems.
wxString data_GetDescString () const
 Returns a string with the description (ie, classification) of the current math data.
void data_SetFilter (const mcFilter *p, int n=-1)
 Sets the filter associated with all the elements of the array.
mcMathAndSystemgui_GetFocusSys ()
const mcMathAndSystemgui_GetFocusSys () const
mcMathLinegui_GetFocusLine ()
const mcMathLinegui_GetFocusLine () const
void gui_AddEmptyLineToNewAndSystem ()
void gui_AddEmptyLineToLastAndSystem ()
void gui_DrawSystemSymbols (wxDC &dc, int x, int y, long flags) const
 Draws the connector symbols of this system *without* drawing the elements contained.
void gui_RecalcSymbolSize ()
 Recalculates the size of one of the connectors (they must have all the same size for mcMathSystem algorithms) and puts the result into the mgui_szSymbol variable.
mcElement gui_GetSelection () const
 Returns a pointer to the portion of mathsystem currently selected; NULL if there are no parts selected.
virtual int gui_GetActiveElemID () const
 Returns the ID of the element which was marked as active in the last bitmap update.
bool gui_isIDChanged () const
 Returns TRUE if the last call to #data_UpdateBmp() set as active element (the element under mouse cursor) an element which is different from the element which was active before that call.
void math_AndMerge (const mcMathOrSystem &, const mcMathOrSystem &)
 Merges the two given mcMathOrSystems and puts the result in *this.
void math_OrMerge (const mcMathOrSystem &, const mcMathOrSystem &)
mcMathSystemType math_GetMathSystemType () const
 Returns the type of this math system as a mcMathOrSystemType enumeration value.
wxString io_GetInlinedExprOfLogicalOperator () const
bool io_ImportToken (const wxString &str, wxString *perr)

Static Public Attributes

static bool sgui_bHorizOrientation = TRUE
static bool sgui_bDrawOrLabels = FALSE
static int sgui_nSpaceAboveBelow = 5
static int sgui_nSpaceLeftRight = 5
static int sgui_nSpaceBetween = 10

Protected Member Functions

void data_Delete (int n)
 Removes the n-th line of the array.
mcAbstractItemdata_GetCopyOf (int n) const
 Returns a copy of the n-th line of the array.
virtual bool gui_DrawHorizontally () const
 Returns TRUE if the elements of the array should be oriented horizontally.
virtual bool gui_DrawVertically () const
virtual int gui_GetSpaceAboveBelow () const
virtual int gui_GetSpaceLeftRight () const
virtual int gui_GetSpaceBetween () const

Private Member Functions

 mcDEFINE_REFERENCE_DATA (mcMathOrSystem, mcET_MATHORSYSTEM)


Constructor & Destructor Documentation

mcMathOrSystemHelpers::mcMathOrSystemHelpers  )  [inline]
 

Definition at line 58 of file MathOrSystem.h.

References mcElementHelpers::data_Init().

virtual mcMathOrSystemHelpers::~mcMathOrSystemHelpers  )  [inline, virtual]
 

Definition at line 59 of file MathOrSystem.h.

References mcAbstractArray::data_Clear().


Member Function Documentation

void mcMathOrSystemHelpers::data_AddLineToLastAndSystem mcMathLine toadd  ) 
 

Definition at line 132 of file MathOrSystem.cpp.

References mcMathAndSystem::data_AddLine(), data_AddLineToNewAndSystem(), mcMathSystemHelpers::data_GetCount(), and data_GetLastSys().

Referenced by gui_AddEmptyLineToLastAndSystem().

void mcMathOrSystemHelpers::data_AddLineToNewAndSystem mcMathLine toadd  ) 
 

Definition at line 140 of file MathOrSystem.cpp.

References mcMathAndSystem::data_AddLine(), and data_AddSys().

Referenced by data_AddLineToLastAndSystem(), and gui_AddEmptyLineToNewAndSystem().

void mcMathOrSystemHelpers::data_AddSys mcMathAndSystem toadd  )  [inline]
 

Definition at line 92 of file MathOrSystem.h.

References mcAbstractArray::data_Add().

Referenced by data_AddLineToNewAndSystem().

void mcMathOrSystemHelpers::data_Delete int  n  )  [protected, virtual]
 

Removes the n-th line of the array.

Implements mcAbstractArray.

Definition at line 109 of file MathOrSystem.cpp.

References mcAbstractArray::data_GetItem().

mcAbstractItem * mcMathOrSystemHelpers::data_GetCopyOf int  n  )  const [protected, virtual]
 

Returns a copy of the n-th line of the array.

Reimplemented from mcAbstractArray.

Definition at line 112 of file MathOrSystem.cpp.

References data_GetSys(), and mcAbstractItem.

wxString mcMathOrSystemHelpers::data_GetDescString  )  const
 

Returns a string with the description (ie, classification) of the current math data.

Definition at line 115 of file MathOrSystem.cpp.

References data_GetLineCount(), mcMathSystemType::io_GetDescString(), mcMathType::io_GetDescString(), math_GetMathSystemType(), and mcMathSystemHelpers::math_GetMathType().

const mcMathAndSystem& mcMathOrSystemHelpers::data_GetLastSys  )  const [inline]
 

Definition at line 89 of file MathOrSystem.h.

References mcMathSystemHelpers::data_GetLast().

mcMathAndSystem& mcMathOrSystemHelpers::data_GetLastSys  )  [inline]
 

Definition at line 87 of file MathOrSystem.h.

References mcMathSystemHelpers::data_GetLast().

Referenced by data_AddLineToLastAndSystem().

int mcMathOrSystemHelpers::data_GetLineCount  )  const
 

Returns the total count of the lines contained into all our mcMathAndSystems.

Definition at line 122 of file MathOrSystem.cpp.

References mcMathSystem::data_GetCount(), mcMathSystemHelpers::data_GetCount(), and data_GetSys().

Referenced by data_GetDescString().

const mcMathAndSystem& mcMathOrSystemHelpers::data_GetSys int  n  )  const [inline]
 

Definition at line 85 of file MathOrSystem.h.

References mcMathSystemHelpers::data_GetConstChild().

mcMathAndSystem& mcMathOrSystemHelpers::data_GetSys int  n  )  [inline]
 

Definition at line 83 of file MathOrSystem.h.

References mcElementHelpers::data_GetChild().

Referenced by data_GetCopyOf(), data_GetLineCount(), data_SetFilter(), gui_GetActiveElemID(), gui_isIDChanged(), and math_GetMathSystemType().

void mcMathOrSystemHelpers::data_SetFilter const mcFilter p,
int  n = -1
 

Sets the filter associated with all the elements of the array.

See mcFilter and mcPolynomial for more info.

Parameters:
p The new mcFilter to set (can be NULL)
n The line to set the filter for or -1 to set it for all the lines of this array

Definition at line 149 of file MathOrSystem.cpp.

References mcMathSystemHelpers::data_GetCount(), data_GetSys(), and mcMathAndSystem::data_SetFilter().

void mcMathOrSystemHelpers::gui_AddEmptyLineToLastAndSystem  ) 
 

Definition at line 251 of file MathOrSystem.cpp.

References data_AddLineToLastAndSystem(), mcMathMng::data_GetLeftMem(), and mcPolynomial::gui_AddNewEmptyMonomial().

void mcMathOrSystemHelpers::gui_AddEmptyLineToNewAndSystem  ) 
 

Definition at line 259 of file MathOrSystem.cpp.

References data_AddLineToNewAndSystem(), mcMathMng::data_GetLeftMem(), and mcPolynomial::gui_AddNewEmptyMonomial().

virtual bool mcMathOrSystemHelpers::gui_DrawHorizontally  )  const [inline, protected, virtual]
 

Returns TRUE if the elements of the array should be oriented horizontally.

Implements mcMathSystemHelpers.

Definition at line 127 of file MathOrSystem.h.

void mcMathOrSystemHelpers::gui_DrawSystemSymbols wxDC &  dc,
int  x,
int  y,
long  flags
const [virtual]
 

Draws the connector symbols of this system *without* drawing the elements contained.

Implements mcMathSystemHelpers.

Definition at line 181 of file MathOrSystem.cpp.

References mcMathSystemHelpers::data_GetCount(), mcMathSystemHelpers::gui_GetXOfSymbol(), mcMathSystemHelpers::gui_GetYOfSymbol(), mcElementHelpers::gui_SelectStyle(), and sgui_bDrawOrLabels.

virtual bool mcMathOrSystemHelpers::gui_DrawVertically  )  const [inline, protected, virtual]
 

Implements mcMathSystemHelpers.

Definition at line 128 of file MathOrSystem.h.

int mcMathOrSystemHelpers::gui_GetActiveElemID  )  const [virtual]
 

Returns the ID of the element which was marked as active in the last bitmap update.

Note:
This function can be much faster than calling gui_GetActiveElem(...).data_GetID() because mcMathLine holds a variable containing directly the ID, while gui_GetActiveElem() requires a search into the math & gui tree.

Definition at line 194 of file MathOrSystem.cpp.

References data_GetSys(), mcMathAndSystem::gui_GetActiveElemID(), and mcDRW_NOACTIVEELEM.

const mcMathLine & mcMathOrSystemHelpers::gui_GetFocusLine  )  const
 

Definition at line 242 of file MathOrSystem.cpp.

References mcMathAndSystem::gui_GetFocusLine(), gui_GetFocusSys(), mcEmptyElement, and mcEmptyLine.

mcMathLine & mcMathOrSystemHelpers::gui_GetFocusLine  ) 
 

Definition at line 233 of file MathOrSystem.cpp.

References mcMathAndSystem::gui_GetFocusLine(), gui_GetFocusSys(), mcEmptyElement, and mcEmptyLine.

const mcMathAndSystem& mcMathOrSystemHelpers::gui_GetFocusSys  )  const [inline]
 

Definition at line 138 of file MathOrSystem.h.

References mcMathSystemHelpers::gui_GetFocus().

mcMathAndSystem& mcMathOrSystemHelpers::gui_GetFocusSys  )  [inline]
 

Definition at line 136 of file MathOrSystem.h.

References mcMathSystemHelpers::gui_GetFocus().

Referenced by gui_GetFocusLine().

mcElement mcMathOrSystemHelpers::gui_GetSelection  )  const [virtual]
 

Returns a pointer to the portion of mathsystem currently selected; NULL if there are no parts selected.

Reimplemented from mcElementHelpers.

Definition at line 202 of file MathOrSystem.cpp.

References mcMathSystemHelpers::data_Get(), mcMathSystemHelpers::data_GetCount(), mcElementHelpers::gui_isSelected(), and mcEmptySystem.

virtual int mcMathOrSystemHelpers::gui_GetSpaceAboveBelow  )  const [inline, protected, virtual]
 

Implements mcMathSystemHelpers.

Definition at line 130 of file MathOrSystem.h.

virtual int mcMathOrSystemHelpers::gui_GetSpaceBetween  )  const [inline, protected, virtual]
 

Implements mcMathSystemHelpers.

Definition at line 132 of file MathOrSystem.h.

virtual int mcMathOrSystemHelpers::gui_GetSpaceLeftRight  )  const [inline, protected, virtual]
 

Implements mcMathSystemHelpers.

Definition at line 131 of file MathOrSystem.h.

bool mcMathOrSystemHelpers::gui_isIDChanged  )  const
 

Returns TRUE if the last call to #data_UpdateBmp() set as active element (the element under mouse cursor) an element which is different from the element which was active before that call.

Definition at line 219 of file MathOrSystem.cpp.

References data_GetSys(), and mcMathAndSystem::gui_isIDChanged().

void mcMathOrSystemHelpers::gui_RecalcSymbolSize  )  [virtual]
 

Recalculates the size of one of the connectors (they must have all the same size for mcMathSystem algorithms) and puts the result into the mgui_szSymbol variable.

Implements mcMathSystemHelpers.

Definition at line 170 of file MathOrSystem.cpp.

References mcElementHelpers::gui_GetSizeOf(), mcElementHelpers::gui_SelectStyle(), and sgui_bDrawOrLabels.

wxString mcMathOrSystemHelpers::io_GetInlinedExprOfLogicalOperator  )  const [inline, virtual]
 

Implements mcMathSystemHelpers.

Definition at line 189 of file MathOrSystem.h.

bool mcMathOrSystemHelpers::io_ImportToken const wxString &  str,
wxString *  perr
[virtual]
 

Implements mcMathSystemHelpers.

Definition at line 275 of file MathOrSystem.cpp.

References mcAbstractArray::data_Add(), mcMathSystemHelpers::data_GetLast(), and mcMathSystemHelpers::io_ImportInlinedExpr().

void mcMathOrSystemHelpers::math_AndMerge const mcMathOrSystem ,
const mcMathOrSystem
 

Merges the two given mcMathOrSystems and puts the result in *this.

Definition at line 292 of file MathOrSystem.cpp.

References mcAbstractArray::data_Add(), mcAbstractArray::data_Clear(), mcMathAndSystem::math_Merge(), mcMATHLOG, and mcTXT.

mcMathSystemType mcMathOrSystemHelpers::math_GetMathSystemType  )  const [virtual]
 

Returns the type of this math system as a mcMathOrSystemType enumeration value.

Implements mcMathSystemHelpers.

Definition at line 325 of file MathOrSystem.cpp.

References mcMathSystemHelpers::data_GetCount(), data_GetSys(), mcMathSystemType::math_CombineWith(), mcMSTL1_EQUATIONS, and mcMSTL1_NOT_RECOGNIZED.

Referenced by data_GetDescString().

void mcMathOrSystemHelpers::math_OrMerge const mcMathOrSystem ,
const mcMathOrSystem
 

Definition at line 310 of file MathOrSystem.cpp.

References mcAbstractArray::data_Add(), mcAbstractArray::data_Clear(), mcMathSystemHelpers::data_DeepCopy(), mcMATHLOG, and mcTXT.

mcMathOrSystemHelpers::mcDEFINE_REFERENCE_DATA mcMathOrSystem  ,
mcET_MATHORSYSTEM 
[private]
 


Member Data Documentation

bool mcMathOrSystemHelpers::sgui_bDrawOrLabels = FALSE [static]
 

Definition at line 59 of file MathOrSystem.cpp.

Referenced by gui_DrawSystemSymbols(), and gui_RecalcSymbolSize().

bool mcMathOrSystemHelpers::sgui_bHorizOrientation = TRUE [static]
 

Definition at line 58 of file MathOrSystem.cpp.

int mcMathOrSystemHelpers::sgui_nSpaceAboveBelow = 5 [static]
 

Definition at line 55 of file MathOrSystem.cpp.

int mcMathOrSystemHelpers::sgui_nSpaceBetween = 10 [static]
 

Definition at line 57 of file MathOrSystem.cpp.

int mcMathOrSystemHelpers::sgui_nSpaceLeftRight = 5 [static]
 

Definition at line 56 of file MathOrSystem.cpp.


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

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

[ Top ]