#include <EmptyBox.h>
Inheritance diagram for mcEmptyBox:
Definition at line 161 of file EmptyBox.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_MAIN_CLASS (EmptyBox, mcDecoration) |
|
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. Definition at line 170 of file EmptyBox.h. References mcET_EMPTYBOX. |
|
|
[ Top ] |