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

mcMultDivOp Class Reference

#include <MultDivOp.h>

Inheritance diagram for mcMultDivOp:

Inheritance graph
[legend]
Collaboration diagram for mcMultDivOp:

Collaboration graph
[legend]
List of all members.

Detailed Description

The operator which controls multiplication/division operations.

Definition at line 121 of file MultDivOp.h.

Public Member Functions

 mcMultDivOp (mcElementType t)
 With this constructor, you can build a mcMultDivOp working as * or a mcMultDivOp working as /.
bool isMultOp () const
bool isDivOp () const
bool data_isValidContainerFor (mcElementType t) const
 Returns TRUE if this element can safely contain the given element type.

Private Member Functions

 mcDEFINE_MAIN_CLASS (MultDivOp, mcOperator)


Constructor & Destructor Documentation

mcMultDivOp::mcMultDivOp mcElementType  t  ) 
 

With this constructor, you can build a mcMultDivOp working as * or a mcMultDivOp working as /.

Definition at line 65 of file MultDivOp.cpp.

References mcElement::data_AddProperty(), mcElement::data_GetType(), mcASSERT, mcCREATE_HELPER_CLASSES, mcEP_INITIALIZED, mcET_DIVOP, and mcET_MULTOP.


Member Function Documentation

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

Definition at line 135 of file MultDivOp.h.

References mcET_DIVOP, and mcET_MULTOP.

bool mcMultDivOp::isDivOp  )  const [inline]
 

Definition at line 133 of file MultDivOp.h.

bool mcMultDivOp::isMultOp  )  const [inline]
 

Definition at line 132 of file MultDivOp.h.

mcMultDivOp::mcDEFINE_MAIN_CLASS MultDivOp  ,
mcOperator 
[private]
 


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

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

[ Top ]