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

mcMathLine Class Reference

#include <MathLine.h>

Inheritance diagram for mcMathLine:

Inheritance graph
[legend]
Collaboration diagram for mcMathLine:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implements a simple fraction in the program, working as a simple container class of two mcPolynomial classes (to hold numerator and denominator).

The user can edit the fraction as any other element, switching from numerator to denominator using the up or right keys.

Definition at line 287 of file MathLine.h.

Public Member Functions

 mcMathLine (const mcElementHelpers *p)
 mcMathLine (const mcElement &v)
 mcMathLine (const mcMathLine &toref)
 mcMathLine ()
 mcMathLine (const mcPolynomial &left, const mcPolynomial &right)
 mcMathLine (const mcMathMng &p)
virtual ~mcMathLine ()
bool data_isValidContainerFor (mcElementType t) const
 Returns TRUE if this element can safely contain the given element type.
mcWRAPPER int gui_GetActiveElemID () const
mcWRAPPER int gui_isIDChanged () const
mcWRAPPER int gui_UpdateBmp (int x, int y, long flags, const wxPoint &p)
mcWRAPPER int gui_ForceBmpUpdate (int x, int y, long flags, const wxPoint &p)
mcWRAPPER int gui_DrawBmp (wxDC &dc, int x, int y) const

Private Member Functions

mcMathLineHelpershlp ()
const mcMathLineHelpershlp () const
mcMathLineHelpersphlp ()
 Returns a private copy of the associated mcElement.
const mcMathLineHelperschlp () const
 Returns the (shared) helpers class container.
mcMathLineoperator= (const mcMathLine &e)
bool operator== (const mcMathLine &e) const
bool operator!= (const mcMathLine &e) const
wxString data_GetDebugName () const


Constructor & Destructor Documentation

mcMathLine::mcMathLine const mcElementHelpers p  )  [inline]
 

Definition at line 301 of file MathLine.h.

References mcElement::data_CheckContainer().

mcMathLine::mcMathLine const mcElement v  )  [inline]
 

Definition at line 302 of file MathLine.h.

References mcElement::data_CheckContainer(), and hlp().

mcMathLine::mcMathLine const mcMathLine toref  )  [inline]
 

Definition at line 303 of file MathLine.h.

References mcElement::data_Ref().

mcMathLine::mcMathLine  )  [inline]
 

Definition at line 304 of file MathLine.h.

References mcObject::data_SetRefData().

mcMathLine::mcMathLine const mcPolynomial left,
const mcPolynomial right
[inline]
 

Definition at line 307 of file MathLine.h.

References mcMathMng::data_Init(), and mcObject::data_SetRefData().

mcMathLine::mcMathLine const mcMathMng p  )  [inline]
 

Definition at line 309 of file MathLine.h.

References mcObject::data_SetRefData().

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

Definition at line 315 of file MathLine.h.


Member Function Documentation

const mcMathLineHelpers* mcMathLine::chlp  )  const [inline, private]
 

Returns the (shared) helpers class container.

This function has different name from #GetHelpers() since its work-mode is different.

Note:
Never cast the returned pointer to something non-const since the given pointer could be a shared pointer.

Reimplemented from mcElement.

Definition at line 292 of file MathLine.h.

wxString mcMathLine::data_GetDebugName  )  const [inline, private]
 

Definition at line 292 of file MathLine.h.

bool mcMathLine::data_isValidContainerFor mcElementType  t  )  const [inline, virtual]
 

Returns TRUE if this element can safely contain the given element type.

Without this function a lot of errors could be undetectable:

        mcPolynomial pol; // creates a new polynomial
        mcElement e(pol); // references it
        [...]    // the programmers forgots what "e" references
        mcFraction f(e);  // mcFraction wraps a mcPolynomialHelpers class !
        f.data_GetNum();  // CRASH

This function must be overridden by mcElement-derived classes in order to provide a list of the mcElementType it can safely contain.

Reimplemented from mcMathMng.

Definition at line 319 of file MathLine.h.

References mcET_MATHMNG.

mcWRAPPER int mcMathLine::gui_DrawBmp wxDC &  dc,
int  x,
int  y
const [inline]
 

Definition at line 331 of file MathLine.h.

References mcMathLineHelpers::gui_DrawBmp(), hlp(), and mcWRAPPER.

mcWRAPPER int mcMathLine::gui_ForceBmpUpdate int  x,
int  y,
long  flags,
const wxPoint &  p
[inline]
 

Definition at line 329 of file MathLine.h.

References mcMathLineHelpers::gui_ForceBmpUpdate(), hlp(), and mcWRAPPER.

mcWRAPPER int mcMathLine::gui_GetActiveElemID  )  const [inline]
 

Definition at line 322 of file MathLine.h.

References mcMathLineHelpers::gui_GetActiveElemID(), hlp(), and mcWRAPPER.

Referenced by mcMathAndSystem::gui_GetActiveElemID(), and mcMathAndSystemHelpers::gui_GetActiveElemID().

mcWRAPPER int mcMathLine::gui_isIDChanged  )  const [inline]
 

Definition at line 324 of file MathLine.h.

References mcMathLineHelpers::gui_isIDChanged(), hlp(), and mcWRAPPER.

Referenced by mcMathAndSystem::gui_isIDChanged(), and mcMathAndSystemHelpers::gui_isIDChanged().

mcWRAPPER int mcMathLine::gui_UpdateBmp int  x,
int  y,
long  flags,
const wxPoint &  p
[inline]
 

Definition at line 327 of file MathLine.h.

References mcMathLineHelpers::gui_UpdateBmp(), hlp(), and mcWRAPPER.

const mcMathLineHelpers* mcMathLine::hlp  )  const [inline, private]
 

Returns a CONST pointer to the main section of this element.

Definition at line 292 of file MathLine.h.

mcMathLineHelpers* mcMathLine::hlp  )  [inline, private]
 

Returns a pointer to the main section of this element.

Definition at line 292 of file MathLine.h.

Referenced by gui_DrawBmp(), gui_ForceBmpUpdate(), gui_GetActiveElemID(), gui_isIDChanged(), gui_UpdateBmp(), and mcMathLine().

bool mcMathLine::operator!= const mcMathLine e  )  const [inline, private]
 

Definition at line 292 of file MathLine.h.

mcMathLine& mcMathLine::operator= const mcMathLine e  )  [inline, private]
 

Definition at line 292 of file MathLine.h.

bool mcMathLine::operator== const mcMathLine e  )  const [inline, private]
 

Definition at line 292 of file MathLine.h.

mcMathLineHelpers* mcMathLine::phlp  )  [inline, private]
 

Returns a private copy of the associated mcElement.

If this class is sharing it with another mcElement, then this function makes a personal copy for our private uses.

Reimplemented from mcElement.

Definition at line 292 of file MathLine.h.

References mcDEFINE_CLASS.


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

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

[ Top ]