strOpNode.h
Ir a la documentación de este archivo.
1 //srrOpNode.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_OPERATORS_STROPNODE_
43 #define _RUN_OPERATORS_STROPNODE_
44 
45 #include "../tree/typeNode.h"
46 //-------------------------------------------------------------------------------------------
47 
48 //-------------------------------------------------------------------------------------------
61 class catNode :
62  public stringNode {
63  public:
71  catNode (runNode* node1, runNode* node2, bool newline = false);
80  void run ();
89  static string do_cat (runNode *op1, runNode *op2, bool newline = false);
90  private:
91  runNode *node1_, *node2_;
92  bool newline_;
93 };
94 //-------------------------------------------------------------------------------------------
95 
96 //-------------------------------------------------------------------------------------------
107 class explodeNode : public nexpNode {
108  public:
115  explodeNode (runNode* substr, runNode* str);
123  void run ();
129  static runNode* asMethod ();
130  private:
131  runNode *substr_, *str_;
132  runNode **ref_;
133 };
134 //----------------------------------------------------------------------
135 
136 //----------------------------------------------------------------------
176 class sprintfNode : public stringNode {
177  public:
185  sprintfNode (runNode* list);
192  void run ();
193  private:
194  runNode *list_;
195 };
196 //----------------------------------------------------------------------
197 
198 //----------------------------------------------------------------------
214 class findNode : public arithNode {
215  public:
225  findNode (runNode* cad, runNode *subcad, runNode* ini_pos);
235  void run ();
241  static runNode* asMethod ();
242  private:
243  runNode *cad_, *ini_pos_, *subcad_;
244 };
245 //----------------------------------------------------------------------
246 
247 //----------------------------------------------------------------------
271 class replaceNode : public stringNode {
272  public:
281  replaceNode (runNode* search, runNode *replace, runNode *cad, runNode* num_replace);
287  void run ();
293  static runNode* asMethod ();
294  private:
295  runNode* search_, *replace_, *cad_, *num_replace_;
296 };
297 //----------------------------------------------------------------------
298 
299 //----------------------------------------------------------------------
309 class subreplaceNode : public stringNode {
310  public:
318  subreplaceNode (runNode* ini, runNode *len, runNode *replace, runNode* str);
326  void run ();
332  static runNode* asMethod ();
333  private:
334  runNode* ini_, *len_, *replace_, * str_;
335 };
336 //----------------------------------------------------------------------
337 
338 //----------------------------------------------------------------------
348 class upperNode : public stringNode {
349  public:
355  upperNode (runNode* cad);
360  void run ();
366  static runNode* asMethod ();
367  private:
368  runNode *cad_;
369 };
370 //------------------------------------------------------------------------
371 
372 //------------------------------------------------------------------------
382 class lowerNode : public stringNode {
383  public:
389  lowerNode (runNode* cad);
394  void run ();
400  static runNode* asMethod ();
401  private:
402  runNode *cad_;
403 };
404 //-------------------------------------------------------------------------------------------
405 
406 //-------------------------------------------------------------------------------------------
407 #endif
408 //-------------------------------------------------------------------------------------------
409 //Fco. Javier Bohórquez Ogalla
static runNode * asMethod()
Definition: strOpNode.cpp:757
static runNode * asMethod()
Definition: strOpNode.cpp:518
Nodo función concatenación.
Definition: strOpNode.h:61
void run()
Definition: strOpNode.cpp:535
findNode(runNode *cad, runNode *subcad, runNode *ini_pos)
Definition: strOpNode.cpp:447
void run()
Definition: strOpNode.cpp:136
static runNode * asMethod()
Definition: strOpNode.cpp:726
static runNode * asMethod()
Definition: strOpNode.cpp:671
static runNode * asMethod()
Definition: strOpNode.cpp:122
Nodo función conversión a mayúsculas.
Definition: strOpNode.h:348
sprintfNode(runNode *list)
Definition: strOpNode.cpp:133
Nodos aritméticos.
Definition: expNode.h:351
Nodo operador explode.
Definition: strOpNode.h:107
void run()
Definition: strOpNode.cpp:688
static runNode * asMethod()
Definition: strOpNode.cpp:435
Nodo ejecutable.
Definition: runTree.h:123
Nodo función conversión minúsculas.
Definition: strOpNode.h:382
void run()
Definition: strOpNode.cpp:47
Nodo función replazo de subcadena.
Definition: strOpNode.h:309
catNode(runNode *node1, runNode *node2, bool newline=false)
Definition: strOpNode.cpp:42
void run()
Definition: strOpNode.cpp:450
void run()
Definition: strOpNode.cpp:733
replaceNode(runNode *search, runNode *replace, runNode *cad, runNode *num_replace)
Definition: strOpNode.cpp:530
subreplaceNode(runNode *ini, runNode *len, runNode *replace, runNode *str)
Definition: strOpNode.cpp:681
Nodo función de remplazo.
Definition: strOpNode.h:271
lowerNode(runNode *cad)
Definition: strOpNode.cpp:754
Nodo función búsqueda de subcadena.
Definition: strOpNode.h:214
explodeNode(runNode *substr, runNode *str)
Definition: strOpNode.cpp:79
static string do_cat(runNode *op1, runNode *op2, bool newline=false)
Definition: strOpNode.cpp:67
Nodos cadenas de texto.
Definition: expNode.h:418
Nodo función cadena con formato.
Definition: strOpNode.h:176
void run()
Definition: strOpNode.cpp:764
upperNode(runNode *cad)
Definition: strOpNode.cpp:723
void run()
Definition: strOpNode.cpp:84
Nodo expresión de tipo no definido.
Definition: expNode.h:164