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

mcCursorPos Class Reference

#include <MathHelpers.h>

Inheritance diagram for mcCursorPos:

Inheritance graph
[legend]
Collaboration diagram for mcCursorPos:

Collaboration graph
[legend]
List of all members.

Detailed Description

example: d + 12345| a + b + c

for the expression above, the cursor position array will be [4][2][5]: [4] to locate the c^(d + 12345) term [2] to locate the 12345 element [5] to locate the exact cursor position into the mcNumber

_________________________________________ less | | | | | | | | most nested | 0 | 1 | 2 | 3 | 4 | ... | n | nested cursor |_____|_____|_____|_____|_____|_____|_____| cursor position position ^--- m_nUsed-th element Basic usage:

Definition at line 1035 of file MathHelpers.h.

Public Member Functions

 mcCursorPos ()
 mcCursorPos (int pos)
virtual ~mcCursorPos ()
void gui_Push (int cp)
 Pushes a new cursor position value into the stack, setting it as nested one level deeper than the last.
void gui_Push (const mcCursorPos &c)
void gui_Pop ()
int gui_Last () const
 Returns the less nested element.
int gui_GetLastAndPop ()
bool isEnd () const
bool isSpecial () const
bool isSpecial (int cp) const
bool isBegin () const
bool isBeginEnd () const
bool isUndefined () const
bool isInside () const

Protected Attributes

int m_nPos [mcCP_MAX_DEPTH]
int m_nUsed


Constructor & Destructor Documentation

mcCursorPos::mcCursorPos  )  [inline]
 

Definition at line 1045 of file MathHelpers.h.

References m_nUsed.

mcCursorPos::mcCursorPos int  pos  )  [inline]
 

Definition at line 1047 of file MathHelpers.h.

References m_nPos, and m_nUsed.

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

Definition at line 1050 of file MathHelpers.h.


Member Function Documentation

int mcCursorPos::gui_GetLastAndPop  )  [inline]
 

Definition at line 1067 of file MathHelpers.h.

References gui_Last(), and gui_Pop().

int mcCursorPos::gui_Last  )  const [inline]
 

Returns the less nested element.

Definition at line 1064 of file MathHelpers.h.

References m_nPos.

Referenced by gui_GetLastAndPop(), isBegin(), isBeginEnd(), isEnd(), isSpecial(), and isUndefined().

void mcCursorPos::gui_Pop  ) 
 

Definition at line 885 of file MathHelpers.cpp.

References isSpecial(), m_nPos, and m_nUsed.

Referenced by gui_GetLastAndPop(), and mcMathSystemHelpers::gui_SetCursorPos().

void mcCursorPos::gui_Push const mcCursorPos c  ) 
 

Definition at line 895 of file MathHelpers.cpp.

void mcCursorPos::gui_Push int  cp  )  [inline]
 

Pushes a new cursor position value into the stack, setting it as nested one level deeper than the last.

Definition at line 1057 of file MathHelpers.h.

References m_nPos, and m_nUsed.

Referenced by mcSymbolHelpers::gui_GetBaseCursorPos(), mcNumberHelpers::gui_GetBaseCursorPos(), mcFunctionHelpers::gui_GetBaseCursorPos(), mcExpContainerHelpers::gui_GetBaseCursorPos(), mcTextHelpers::gui_GetCursorPos(), mcMathSystemHelpers::gui_GetCursorPos(), mcMathMngHelpers::gui_GetCursorPos(), mcFractionHelpers::gui_GetCursorPos(), mcExpElementHelpers::gui_GetCursorPos(), mcElementArrayHelpers::gui_GetCursorPos(), and mcDecorationHelpers::gui_GetCursorPos().

bool mcCursorPos::isBegin  )  const [inline]
 

Definition at line 1082 of file MathHelpers.h.

References gui_Last(), and mcCP_BEGIN.

Referenced by mcExpElementHelpers::gui_GetCursorPos(), mcElementArrayHelpers::gui_GetCursorPos(), mcDecorationHelpers::gui_GetRelCursorPos(), mcElementArrayHelpers::gui_Input(), and isInside().

bool mcCursorPos::isBeginEnd  )  const [inline]
 

Definition at line 1085 of file MathHelpers.h.

References gui_Last(), and mcCP_BEGINEND.

Referenced by mcElementArrayHelpers::gui_GetCursorPos(), and isInside().

bool mcCursorPos::isEnd  )  const [inline]
 

Definition at line 1073 of file MathHelpers.h.

References gui_Last(), and mcCP_END.

Referenced by mcExpElementHelpers::gui_GetCursorPos(), mcElementArrayHelpers::gui_GetCursorPos(), mcElementArrayHelpers::gui_Input(), and isInside().

bool mcCursorPos::isInside  )  const [inline]
 

Definition at line 1091 of file MathHelpers.h.

References isBegin(), isBeginEnd(), isEnd(), and isUndefined().

Referenced by mcElementArrayHelpers::gui_Input().

bool mcCursorPos::isSpecial int  cp  )  const [inline]
 

Definition at line 1079 of file MathHelpers.h.

References mcCP_BEGINEND.

bool mcCursorPos::isSpecial  )  const [inline]
 

Definition at line 1076 of file MathHelpers.h.

References gui_Last().

Referenced by gui_Pop().

bool mcCursorPos::isUndefined  )  const [inline]
 

Definition at line 1088 of file MathHelpers.h.

References gui_Last(), and mcCP_UNDEFINED.

Referenced by isInside().


Member Data Documentation

int mcCursorPos::m_nPos[mcCP_MAX_DEPTH] [protected]
 

Definition at line 1039 of file MathHelpers.h.

Referenced by gui_Last(), gui_Pop(), gui_Push(), and mcCursorPos().

int mcCursorPos::m_nUsed [protected]
 

Definition at line 1040 of file MathHelpers.h.

Referenced by gui_Pop(), gui_Push(), and mcCursorPos().


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

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

[ Top ]