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

mcBracket Class Reference

#include <Bracket.h>

Inheritance diagram for mcBracket:

Inheritance graph
[legend]
Collaboration diagram for mcBracket:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implements the brackets in the program using a mcPolynomial to hold as content any polynomial.

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)


Constructor & Destructor Documentation

mcBracket::mcBracket const mcPolynomial content  )  [inline]
 

Definition at line 264 of file Bracket.h.

References mcExpContainer::data_SetContent(), and mcObject::data_SetRefData().


Member Function Documentation

int mcBracket::data_GetBracketDepth  )  const [inline]
 

Definition at line 270 of file Bracket.h.

bool mcBracket::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 mcExpContainer.

Definition at line 267 of file Bracket.h.

References mcET_BRACKET.

mcBracket::mcDEFINE_MAIN_CLASS Bracket  ,
mcExpContainer 
[private]
 


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

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

[ Top ]