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

mcDecoration Class Reference

#include <Decoration.h>

Inheritance diagram for mcDecoration:

Inheritance graph
[legend]
Collaboration diagram for mcDecoration:

Collaboration graph
[legend]
List of all members.

Detailed Description

A decoration element is an element without any math meaning, which is used only for GUI input.

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)


Member Function Documentation

bool mcDecoration::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 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.

mcDecoration::mcDEFINE_ABSTRACT_CLASS Decoration  ,
mcElement 
[private]
 


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

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

[ Top ]