Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Hewman
IVS_kalkulacka
atom.cpp
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File atom.cpp of Package IVS_kalkulacka
/** * @file atom.cpp * * @brief subor obsahujuci konstruktor pre triedu atomu pre vyhodnocovanie matematickych vyrazov * @author xlelke01 xhefka01 xbence01 xfisla00 */ /* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "atom.h" /** * Konstruktor atomu pre vyhodnocovanie matematickych vyrazov * * @param isOp Urcuje ci je atom operand alebo operator * @param opType Typ operatora * @param value Hodnota operandu */ Atom::Atom(bool isOp, Operand opType, int value, QObject *parent) : QObject(parent) { this->isOp = isOp; this->opType = opType; this->value = value; switch (opType) { case NUM: priority = 0; break; case ADD: priority = PADD; break; case SUB: priority = PSUB; break; case MUL: priority = PMUL; break; case DIV: priority = PDIV; break; case MOD: priority = PMOD; break; case POW: priority = PPOW; break; case FACT: priority = PFACT; break; } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor