#include <Decoration.h>
Inheritance diagram for mcDecoration:
Definition at line 214 of file Decoration.h.
Public Member Functions | |
bool | data_isValidContainerFor (mcElementType t) const |
Returns TRUE if this element can safely contain the given element type. | |
Private Member Functions | |
mcDEFINE_ABSTRACT_CLASS (Decoration, mcElement) |
|
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 mcAddSubOp, mcEmptyBox, mcMultDivOp, mcOperator, mcParenthesis, and mcText. Definition at line 220 of file Decoration.h. References mcET_ADDOP, mcET_DIVOP, mcET_EMPTYBOX, mcET_MULTOP, mcET_PARENTHESIS, mcET_SUBOP, and mcET_TEXT. |
|
|
[ Top ] |