#include <Fraction.h>
Inheritance diagram for mcFraction:
The user can edit the fraction as any other element, switching from numerator to denominator using the up or right keys.
Definition at line 361 of file Fraction.h.
Public Member Functions | |
mcFraction (const mcNumber &n, const mcNumber &d) | |
bool | data_isValidContainerFor (mcElementType t) const |
Returns TRUE if this element can safely contain the given element type. | |
mcWRAPPER void | data_SetDen (const mcPolynomial &p) |
mcWRAPPER void | data_SetNum (const mcPolynomial &p) |
mcWRAPPER void | data_AddElements (bool bNum, mcElement *p, int num, int pos=-1, bool bOverwrite=FALSE, bool bForceCopy=FALSE) |
mcWRAPPER mcPolynomial & | data_GetNum () |
mcWRAPPER mcPolynomial & | data_GetDen () |
mcWRAPPER wxPoint | gui_GetNumPos () const |
mcWRAPPER wxPoint | gui_GetDenPos () const |
mcWRAPPER void | gui_SetCursorOnDen (mcCursorPos cp=mcCP_END) |
mcWRAPPER void | gui_SetCursorOnNum (mcCursorPos cp=mcCP_END) |
mcWRAPPER void | math_Flip () |
Private Member Functions | |
mcDEFINE_MAIN_CLASS (Fraction, mcElement) |
|
Definition at line 367 of file Fraction.h. References data_SetDen(), data_SetNum(), and mcObject::data_SetRefData(). |
|
Definition at line 378 of file Fraction.h. References mcElementArray::data_AddElements(), and mcWRAPPER. Referenced by mcMonomialHelpers::gui_AddNewElement(). |
|
|
|
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 mcElement. Definition at line 370 of file Fraction.h. References mcET_FRACTION. |
|
Definition at line 373 of file Fraction.h. References mcWRAPPER. Referenced by mcPolynomialHelpers::math_DivideBy(), mcElementArrayHelpers::math_EmbedInFraction(), mcFractionHelpers::math_GetGCD(), mcFractionHelpers::math_GetLCM(), mcBracketHelpers::math_MakeReciprocal(), and mcFraction(). |
|
Definition at line 375 of file Fraction.h. References mcWRAPPER. Referenced by mcElementArrayHelpers::math_EmbedInFraction(), mcFractionHelpers::math_GetGCD(), mcFractionHelpers::math_GetLCM(), mcNumberHelpers::math_MakeReciprocal(), and mcFraction(). |
|
Definition at line 389 of file Fraction.h. References mcWRAPPER. |
|
Definition at line 387 of file Fraction.h. References mcWRAPPER. |
|
Definition at line 392 of file Fraction.h. References mcWRAPPER. Referenced by mcMonomialHelpers::gui_AddNewElement(). |
|
Definition at line 394 of file Fraction.h. References mcWRAPPER. |
|
Definition at line 398 of file Fraction.h. References mcWRAPPER. Referenced by mcFractionHelpers::math_DivideBy(). |
|
|
[ Top ] |