ioStmtNode.h
Ir a la documentación de este archivo.
1 //ioStmtNode.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 //-------------------------------------------------------------------------------------------
38 //-------------------------------------------------------------------------------------------
39 
40 //-------------------------------------------------------------------------------------------
41 #ifndef _RUN_STMTS_IOSTMTNODE_
42 #define _RUN_STMTS_IOSTMTNODE_
43 
44 #include "../tree/typeNode.h"
45 //-------------------------------------------------------------------------------------------
46 
47 //-------------------------------------------------------------------------------------------
57 class printNode : public runNode {
58  public:
69  printNode (runNode* exp, bool newline = false);
75  void run ();
76  private:
77  runNode* exp_;
78  bool newline_;
79 };
80 //-------------------------------------------------------------------------------------------
81 
82 //-------------------------------------------------------------------------------------------
102 class inputNode :
103  public stringNode {
104  public:
111  inputNode (idNode* id, int type = 0, runNode* prompt = NULL);
116  void run ();
117  private:
118  idNode *id_;
119  runNode *prompt_;
120  int type_;
121 };
122 //-------------------------------------------------------------------------------------------
123 
124 //-------------------------------------------------------------------------------------------
125 #endif
126 //-------------------------------------------------------------------------------------------
127 //Fco. Javier Bohórquez Ogalla
Nodo identificador.
Definition: idNode.h:59
void run()
Definition: ioStmtNode.cpp:44
printNode(runNode *exp, bool newline=false)
Definition: ioStmtNode.cpp:41
Nodo ejecutable.
Definition: runTree.h:123
inputNode(idNode *id, int type=0, runNode *prompt=NULL)
Definition: ioStmtNode.cpp:81
Nodo sentencia print.
Definition: ioStmtNode.h:57
Nodos cadenas de texto.
Definition: expNode.h:418
Nodo de entrada de usuario.
Definition: ioStmtNode.h:102
void run()
Definition: ioStmtNode.cpp:84