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

mcAddSubOp Class Reference

#include <AddSubOp.h>

Inheritance diagram for mcAddSubOp:

Inheritance graph
[legend]
Collaboration diagram for mcAddSubOp:

Collaboration graph
[legend]
List of all members.

Detailed Description

An empty class which creates a mcAddSubOpMath section and for GUI, DATA and IO uses mcOperator helper classes.

Definition at line 89 of file AddSubOp.h.

Public Member Functions

 mcAddSubOp (mcElementType t)
 With this constructor, you can build a mcAddSubOp working as + or a mcAddSubOp working as -.
bool data_isValidContainerFor (mcElementType t) const
 Returns TRUE if this element can safely contain the given element type.
bool data_isAddOp () const
bool data_isSubOp () const

Private Member Functions

 mcDEFINE_MAIN_CLASS (AddSubOp, mcOperator)


Constructor & Destructor Documentation

mcAddSubOp::mcAddSubOp mcElementType  t  ) 
 

With this constructor, you can build a mcAddSubOp working as + or a mcAddSubOp working as -.

Definition at line 60 of file AddSubOp.cpp.

References mcElement::data_AddProperty(), mcElement::data_GetType(), mcASSERT, mcCREATE_HELPER_CLASSES, mcEP_INITIALIZED, mcET_ADDOP, and mcET_SUBOP.


Member Function Documentation

bool mcAddSubOp::data_isAddOp  )  const [inline]
 

Definition at line 103 of file AddSubOp.h.

bool mcAddSubOp::data_isSubOp  )  const [inline]
 

Definition at line 104 of file AddSubOp.h.

bool mcAddSubOp::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 100 of file AddSubOp.h.

References mcET_ADDOP, and mcET_SUBOP.

mcAddSubOp::mcDEFINE_MAIN_CLASS AddSubOp  ,
mcOperator 
[private]
 


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

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

[ Top ]