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

mcParenthesis Class Reference

#include <Parenthesis.h>

Inheritance diagram for mcParenthesis:

Inheritance graph
[legend]
Collaboration diagram for mcParenthesis:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implements the non-closed parentheses which makes GUI input very easier for the user: if using only mcBracket, then the left and the right parentheses would be built immediately after the the "(" user keypress.

mcParenthesis allows the user to type both the wxT("(") and the ")" placing them in the place he wants.

Definition at line 198 of file Parenthesis.h.

Public Member Functions

bool data_isValidContainerFor (mcElementType t) const
 Returns TRUE if this element can safely contain the given element type.
mcWRAPPER bool data_isLeftBracket () const
mcWRAPPER wxString data_GetSymbol () const
mcWRAPPER void data_SetAsLeftBracket ()
mcWRAPPER void data_SetAsRightBracket ()

Private Member Functions

 mcDEFINE_MAIN_CLASS (Parenthesis, mcDecoration)


Member Function Documentation

mcWRAPPER wxString mcParenthesis::data_GetSymbol  )  const [inline]
 

Definition at line 209 of file Parenthesis.h.

References mcWRAPPER.

mcWRAPPER bool mcParenthesis::data_isLeftBracket  )  const [inline]
 

Definition at line 207 of file Parenthesis.h.

References mcWRAPPER.

Referenced by mcPolynomialHelpers::data_ReplaceParentheses().

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

Definition at line 204 of file Parenthesis.h.

References mcET_PARENTHESIS.

mcWRAPPER void mcParenthesis::data_SetAsLeftBracket  )  [inline]
 

Definition at line 212 of file Parenthesis.h.

References mcWRAPPER.

Referenced by mcPolynomialHelpers::gui_ReplaceBracket().

mcWRAPPER void mcParenthesis::data_SetAsRightBracket  )  [inline]
 

Definition at line 214 of file Parenthesis.h.

References mcWRAPPER.

Referenced by mcPolynomialHelpers::gui_ReplaceBracket().

mcParenthesis::mcDEFINE_MAIN_CLASS Parenthesis  ,
mcDecoration 
[private]
 


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

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

[ Top ]