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

mcExpElement Class Reference

#include <ExpElement.h>

Inheritance diagram for mcExpElement:

Inheritance graph
[legend]
Collaboration diagram for mcExpElement:

Collaboration graph
[legend]
List of all members.

Detailed Description

Extends the mcElement class, providing functions to handle a polynomial as exponent.

Defines an extension to mcElement base class; mcExpElement provides functions to help derived classes to manage an exponent; thanks to this class a lot of code isn't repeated among all the elements with exponents...

Definition at line 893 of file ExpElement.h.

Public Member Functions

bool data_isValidContainerFor (mcElementType t) const
 Returns TRUE if this element can safely contain the given element type.
mcWRAPPER mcElementdata_GetExp ()
mcWRAPPER const mcElementdata_GetExp () const
mcWRAPPER mcElementdata_GetSub ()
mcWRAPPER const mcElementdata_GetSub () const
mcWRAPPER void data_SetExpSub (bool exp, const mcElement &p)
mcWRAPPER void data_DestroyExpSub (bool exp)
mcWRAPPER void data_CreateExpSub (bool exp)
mcWRAPPER bool math_hasExp () const
mcWRAPPER bool math_hasSub () const
mcWRAPPER mcPolynomialmath_GetExp ()
mcWRAPPER const mcPolynomialmath_GetConstExp () const
mcWRAPPER mcTextmath_GetSub ()
mcWRAPPER const mcTextmath_GetSub () const

Private Member Functions

 mcDEFINE_ABSTRACT_CLASS (ExpElement, mcElement)


Member Function Documentation

mcWRAPPER void mcExpElement::data_CreateExpSub bool  exp  )  [inline]
 

Definition at line 917 of file ExpElement.h.

References mcWRAPPER.

Referenced by mcExpElementHelpers::math_GetGCD().

mcWRAPPER void mcExpElement::data_DestroyExpSub bool  exp  )  [inline]
 

Definition at line 915 of file ExpElement.h.

References mcWRAPPER.

Referenced by mcNumberHelpers::math_SimplifyBaseExp(), and mcExpElementHelpers::math_SimplifyExp().

mcWRAPPER const mcElement& mcExpElement::data_GetExp  )  const [inline]
 

Definition at line 908 of file ExpElement.h.

References mcWRAPPER.

mcWRAPPER mcElement& mcExpElement::data_GetExp  )  [inline]
 

Definition at line 907 of file ExpElement.h.

References mcWRAPPER.

Referenced by mcExpElementHelpers::math_GetLCM(), mcNumberHelpers::math_SimplifyBaseExp(), and mcRadicalHelpers::math_SimplifyContents().

mcWRAPPER const mcElement& mcExpElement::data_GetSub  )  const [inline]
 

Definition at line 911 of file ExpElement.h.

References mcWRAPPER.

mcWRAPPER mcElement& mcExpElement::data_GetSub  )  [inline]
 

Definition at line 910 of file ExpElement.h.

References mcWRAPPER.

bool mcExpElement::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 mcElement.

Reimplemented in mcBracket, mcExpContainer, mcFunction, mcNumber, mcRadical, and mcSymbol.

Definition at line 899 of file ExpElement.h.

References mcET_BRACKET, mcET_FUNCTION, mcET_NUMBER, mcET_RADICAL, and mcET_SYMBOL.

mcWRAPPER void mcExpElement::data_SetExpSub bool  exp,
const mcElement p
[inline]
 

Definition at line 913 of file ExpElement.h.

References mcWRAPPER.

Referenced by mcPolynomialHelpers::data_ReplaceParentheses(), mcElementHelpers::math_ContainsNumber(), mcElementHelpers::math_ContainsSymbol(), and mcExpElementHelpers::math_GetLCM().

mcWRAPPER const mcPolynomial& mcExpElement::math_GetConstExp  )  const [inline]
 

Definition at line 933 of file ExpElement.h.

References mcWRAPPER.

Referenced by mcMonomialHelpers::math_GetMaxDegreeFor(), and mcExpElementHelpers::math_MultOrDiv().

mcWRAPPER mcPolynomial& mcExpElement::math_GetExp  )  [inline]
 

Definition at line 931 of file ExpElement.h.

References mcWRAPPER.

Referenced by mcExpElementHelpers::math_GetGCD().

mcWRAPPER const mcText& mcExpElement::math_GetSub  )  const [inline]
 

Definition at line 938 of file ExpElement.h.

References mcWRAPPER.

mcWRAPPER mcText& mcExpElement::math_GetSub  )  [inline]
 

Definition at line 936 of file ExpElement.h.

References mcWRAPPER.

mcWRAPPER bool mcExpElement::math_hasExp  )  const [inline]
 

Definition at line 926 of file ExpElement.h.

References mcWRAPPER.

Referenced by mcExpElementHelpers::math_GetGCD(), mcExpElementHelpers::math_GetLCM(), and mcExpElementHelpers::math_MultOrDiv().

mcWRAPPER bool mcExpElement::math_hasSub  )  const [inline]
 

Definition at line 928 of file ExpElement.h.

References mcWRAPPER.

mcExpElement::mcDEFINE_ABSTRACT_CLASS ExpElement  ,
mcElement 
[private]
 


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

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

[ Top ]