|
Kalkulacka
1.0.0
Jednoduchýkalkulátor
|
Reprezentace lexému kalkulačky tedy čísla nebo operace. ...
#include <Lex.h>

Třídy | |
| union | Value |
| reprezentace hodnoty lexému ... | |
Veřejné typy | |
| enum | Types { OPERATOR, NUMBER } |
| Typy lexémů ... | |
| enum | Operator { ADD, SUB, DIV, MUL, EXP, ROOT, FACTORIAL, MOD, NEG, EVAL, CLEAR, BS } |
| Jednotlivé operace. ... | |
Veřejné metody | |
| Lex (Operator oper) | |
| Konstrukce lexému typu operátor. ... | |
| Lex (Math::Number number) | |
| Konstrukce lexému typu číslo. ... | |
| const Value & | getValue () const |
| vrací hodnotu lexému ... | |
| Types | getType () const |
| vrací typ lexému ... | |
| bool | isNumber () const |
| Testuje zda je lexém číslo. ... | |
| bool | isOperator () const |
| Testuje zda je lexém operátor. ... | |
| Math::Number | getAsNumber () const |
| Operator | getAsOperator () const |
| bool | operator== (const Lex &rhs) const |
| bool | operator!= (const Lex &rhs) const |
Veřejné atributy | |
| const char * | OperatorNames [12] |
| ADD,. ... | |
Chráněné atributy | |
| Value | value |
| Types | type |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Lex &lex) |
| std::stringstream & | operator<< (std::stringstream &os, const Lex &lex) |
Reprezentace lexému kalkulačky tedy čísla nebo operace.
| team22::Calc::Lex::Lex | ( | Operator | oper | ) |
Konstrukce lexému typu operátor.
| oper |
Definice je uvedena na řádku 30 v souboru Lex.cpp.
Odkazuje se na team22::Calc::Lex::Value::oper a value.
| team22::Calc::Lex::Lex | ( | Math::Number | number | ) |
Konstrukce lexému typu číslo.
| number |
Definice je uvedena na řádku 36 v souboru Lex.cpp.
Odkazuje se na team22::Calc::Lex::Value::number a value.
| team22::Math::Number team22::Calc::Lex::getAsNumber | ( | ) | const |
| LexException | tento lexém pokud není číslo |
Definice je uvedena na řádku 42 v souboru Lex.cpp.
Odkazuje se na isNumber(), team22::Calc::Lex::Value::number a value.
Používá se v team22::Calc::Equation::backSpace(), operator!=(), operator==() a team22::Calc::Interpret::sendIdentifiedLex().
| team22::Calc::Lex::Operator team22::Calc::Lex::getAsOperator | ( | ) | const |
| LexException | tento lexém pokud není Operator |
Definice je uvedena na řádku 50 v souboru Lex.cpp.
Odkazuje se na isOperator(), team22::Calc::Lex::Value::oper a value.
Používá se v operator!=(), operator==(), team22::Calc::Interpret::sendIdentifiedLex() a team22::Calc::Equation::sendIdentifiedLex().
| team22::Calc::Lex::Types team22::Calc::Lex::getType | ( | ) | const |
| const team22::Calc::Lex::Value & team22::Calc::Lex::getValue | ( | ) | const |
| bool team22::Calc::Lex::isNumber | ( | ) | const |
Testuje zda je lexém číslo.
Definice je uvedena na řádku 20 v souboru Lex.cpp.
Odkazuje se na type.
Používá se v team22::Calc::Equation::backSpace(), getAsNumber(), operator!=(), operator==() a team22::Calc::Interpret::sendIdentifiedLex().
| bool team22::Calc::Lex::isOperator | ( | ) | const |
Testuje zda je lexém operátor.
Definice je uvedena na řádku 25 v souboru Lex.cpp.
Odkazuje se na type.
Používá se v getAsOperator(), operator==() a team22::Calc::Equation::sendIdentifiedLex().
| bool team22::Calc::Lex::operator!= | ( | const Lex & | rhs | ) | const |
Definice je uvedena na řádku 69 v souboru Lex.cpp.
Odkazuje se na getAsNumber(), getAsOperator(), isNumber() a OperatorNames.
| bool team22::Calc::Lex::operator== | ( | const Lex & | rhs | ) | const |
Definice je uvedena na řádku 59 v souboru Lex.cpp.
Odkazuje se na getAsNumber(), getAsOperator(), isNumber(), isOperator() a type.
|
friend |
|
friend |
| const char* team22::Calc::Lex::OperatorNames[12] |
ADD,.
SUB, DIV, MUL, EXP, ROOT, FACTORIAL, MOD, NEG, EVAL, CLEAR, BS
Definice je uvedena na řádku 49 v souboru Lex.h.
Používá se v operator!=().
|
protected |
Definice je uvedena na řádku 75 v souboru Lex.h.
Používá se v getType(), isNumber(), isOperator() a operator==().
|
protected |
Definice je uvedena na řádku 74 v souboru Lex.h.
Používá se v getAsNumber(), getAsOperator(), getValue() a Lex().