#include <Bracket.h>
Inheritance diagram for mcBracket:
Bracket derives from mcExpContainer because it can have an exponent. Because of its nature (a mcExpContainer and a container for a mcPolynomial class), this class is very simple because recalls methods of the underlying class. The only problem to solve for this class is the bracket's height: brackets must be adaptable to the height of the contained expression.
Definition at line 258 of file Bracket.h.
Public Member Functions | |
mcBracket (const mcPolynomial &content) | |
bool | data_isValidContainerFor (mcElementType t) const |
Returns TRUE if this element can safely contain the given element type. | |
int | data_GetBracketDepth () const |
Private Member Functions | |
mcDEFINE_MAIN_CLASS (Bracket, mcExpContainer) |
|
Definition at line 264 of file Bracket.h. References mcExpContainer::data_SetContent(), and mcObject::data_SetRefData(). |
|
|
|
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 mcExpContainer. Definition at line 267 of file Bracket.h. References mcET_BRACKET. |
|
|
[ Top ] |