#include <AddSubOp.h>
Inheritance diagram for mcAddSubOp:
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) |
|
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. |
|
Definition at line 103 of file AddSubOp.h. |
|
Definition at line 104 of file AddSubOp.h. |
|
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. |
|
|
[ Top ] |