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

mcOperator Class Reference

#include <Operator.h>

Inheritance diagram for mcOperator:

Inheritance graph
[legend]
Collaboration diagram for mcOperator:

Collaboration graph
[legend]
List of all members.

Detailed Description

A basic class for MathCore operators.

This class derives directly from mcElement.

Definition at line 270 of file Operator.h.

Public Member Functions

wxString data_GetOpSymbol () const
bool data_isValidContainerFor (mcElementType t) const
 Returns TRUE if this element can safely contain the given element type.
mcWRAPPER bool math_CanBeApplied (const mcElement &l, const mcElement &r) const
mcWRAPPER mcBasicOpRes math_Apply (mcElement &l, const mcElement &r, mcElement *pp) const
mcWRAPPER mcBasicOpRes math_ApplySimple (mcElement &l, const mcElement &r) const
mcWRAPPER mcRealValue math_Evaluate (mcRealValue val, mcRealValue val2) const

Static Public Member Functions

static wxString data_GetOpSymbol (mcElementType t)

Private Member Functions

 mcDEFINE_ABSTRACT_CLASS (Operator, mcDecoration)


Member Function Documentation

wxString mcOperator::data_GetOpSymbol  )  const [inline]
 

Definition at line 279 of file Operator.h.

References mcOperatorHelpers::data_GetOpSymbol().

static wxString mcOperator::data_GetOpSymbol mcElementType  t  )  [inline, static]
 

Definition at line 276 of file Operator.h.

References mcOperatorHelpers::data_GetOpSymbol().

bool mcOperator::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 mcDecoration.

Reimplemented in mcAddSubOp, and mcMultDivOp.

Definition at line 282 of file Operator.h.

References mcET_ADDOP, mcET_DIVOP, mcET_MULTOP, and mcET_SUBOP.

mcWRAPPER mcBasicOpRes mcOperator::math_Apply mcElement l,
const mcElement r,
mcElement pp
const [inline]
 

Definition at line 289 of file Operator.h.

References mcOperatorHelpers::math_Apply(), and mcWRAPPER.

Referenced by mcElementArrayHelpers::math_ApplyOp(), mcPolynomialHelpers::math_SimplifySolveOp(), and mcElementArrayHelpers::math_SimplifySolveOp().

mcWRAPPER mcBasicOpRes mcOperator::math_ApplySimple mcElement l,
const mcElement r
const [inline]
 

Definition at line 292 of file Operator.h.

References mcOperatorHelpers::math_ApplySimple(), and mcWRAPPER.

Referenced by mcElementArrayHelpers::math_ApplyOpSimple().

mcWRAPPER bool mcOperator::math_CanBeApplied const mcElement l,
const mcElement r
const [inline]
 

Definition at line 286 of file Operator.h.

References mcOperatorHelpers::math_CanBeApplied(), and mcWRAPPER.

mcWRAPPER mcRealValue mcOperator::math_Evaluate mcRealValue  val,
mcRealValue  val2
const [inline]
 

Definition at line 295 of file Operator.h.

References mcWRAPPER.

Referenced by mcElementArrayHelpers::math_Evaluate().

mcOperator::mcDEFINE_ABSTRACT_CLASS Operator  ,
mcDecoration 
[private]
 


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

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

[ Top ]