condStmtNode.h
Ir a la documentación de este archivo.
1 //condStmtNode.h
2 //-------------------------------------------------------------------------------------------
3 /*
4  * Fco. Javier Bohórquez Ogalla
5  * 75766599-E
6  * Puerto Real (Cádiz)
7  * powersgame@gmail.com
8  */
9 //-------------------------------------------------------------------------------------------
10 
11 //-------------------------------------------------------------------------------------------
12 /*
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
26  * MA 02110-1301, USA.
27  */
28 //-------------------------------------------------------------------------------------------
29 
30 //-------------------------------------------------------------------------------------------
39 //-------------------------------------------------------------------------------------------
40 
41 //-------------------------------------------------------------------------------------------
42 #ifndef _RUN_STMTS_CONDSTMTNODE_
43 #define _RUN_STMTS_CONDSTMTNODE_
44 
45 #include "../tree/runTree.h"
46 //-------------------------------------------------------------------------------------------
47 
48 //-------------------------------------------------------------------------------------------
57 class ifNode :
58  public runNode {
59  public:
66  ifNode (runNode* exp, runNode* ifb, runNode* elseb);
73  void run ();
74  private:
75  runNode *exp_, *ifb_, *elseb_;
76 };
77 //-------------------------------------------------------------------------------------------
78 
79 //-------------------------------------------------------------------------------------------
96 class caseNode :
97  public runNode {
98  public:
105  caseNode (runNode* exp, runNode* cb, runNode* cases);
114  void run (runNode* eval);
119  void run ();
120  private:
121  runNode *exp_, *cb_;
122  runNode* cases_;
123  bool runall_;
124 };
125 //-------------------------------------------------------------------------------------------
126 
127 //-------------------------------------------------------------------------------------------
140 class switchNode :
141  public runNode {
142  public:
148  switchNode (runNode* eval, runNode* cases);
153  void run ();
154  private:
155  runNode* eval_;
156  runNode* cases_;
157 };
158 //-------------------------------------------------------------------------------------------
159 
160 //-------------------------------------------------------------------------------------------
161 #endif
162 //-------------------------------------------------------------------------------------------
163 //Fco. Javier Bohórquez Ogalla
Nodo sentencia switch.
Definition: condStmtNode.h:140
void run()
Definition: condStmtNode.cpp:257
switchNode(runNode *eval, runNode *cases)
Definition: condStmtNode.cpp:276
Nodo ejecutable.
Definition: runTree.h:123
caseNode(runNode *exp, runNode *cb, runNode *cases)
Definition: condStmtNode.cpp:72
ifNode(runNode *exp, runNode *ifb, runNode *elseb)
Definition: condStmtNode.cpp:42
void run()
Definition: condStmtNode.cpp:280
Nodo setencia if.
Definition: condStmtNode.h:57
void run()
Definition: condStmtNode.cpp:45
Nodo casos switch.
Definition: condStmtNode.h:96