dateOpNode.h
Ir a la documentación de este archivo.
1 //dateOpNode.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_DATEOPNODE_
43 #define _RUN_OPERATORS_DATEOPNODE_
44 
45 #include "../tree/typeNode.h"
46 //-------------------------------------------------------------------------------------------
47 
48 //-------------------------------------------------------------------------------------------
80 class dateNode : public stringNode {
81  public:
88  dateNode (runNode * str, runNode * timestamp = NULL);
93  void run ();
94  private:
95  runNode *str_, *timestamp_;
96  string run_day (tm *ltm);
97  string run_week3 (tm *ltm);
98  string run_day_zero (tm *ltm);
99  string run_week (tm *ltm);
100  string run_week_num (tm *ltm);
101  string run_day_year (tm *ltm);
102  string run_month_str (tm *ltm);
103  string run_month_num (tm *ltm);
104  string run_month3_str (tm *ltm);
105  string run_month_num_zero (tm *ltm);
106  string run_year (tm *ltm);
107  string run_year2 (tm *ltm);
108  string run_am (tm *ltm);
109  string run_AM (tm *ltm);
110  string run_hour_12_zero (tm *ltm);
111  string run_hour_24_zero (tm *ltm);
112  string run_hour_12 (tm *ltm);
113  string run_hour_24 (tm *ltm);
114  string run_minute (tm *ltm);
115  string run_second (tm *ltm);
116  string run_unixtime (time_t now);
117 };
118 //----------------------------------------------------------------------
119 
120 //----------------------------------------------------------------------
128 class timeNode : public arithNode {
129  public:
133  timeNode ();
138  void run ();
139  private:
140 };
141 //----------------------------------------------------------------------
142 
143 //----------------------------------------------------------------------class sleepNode : public runNode {
151  public:
156  sleepNode (runNode * s);
161  void run ();
162  private:
163  runNode* s_;
164 };
165 //-------------------------------------------------------------------------------------------
166 
167 //-------------------------------------------------------------------------------------------
168 #endif
169 //-------------------------------------------------------------------------------------------
170 //Fco. Javier Bohórquez Ogalla
Nodo función obtener marca de tiempo.
Definition: dateOpNode.h:128
Nodos aritméticos.
Definition: expNode.h:351
timeNode()
Definition: dateOpNode.cpp:245
Nodo ejecutable.
Definition: runTree.h:123
void run()
Definition: dateOpNode.cpp:247
void run()
Definition: dateOpNode.cpp:41
Nodo función de espera la ejecución.
Definition: dateOpNode.h:150
dateNode(runNode *str, runNode *timestamp=NULL)
Definition: dateOpNode.cpp:39
Nodos cadenas de texto.
Definition: expNode.h:418
Nodo función fecha.
Definition: dateOpNode.h:80