|
Aegis
4.25.D505
|
00001 // 00002 // aegis - project change supervisor 00003 // Copyright (C) 1994, 2002, 2005-2008 Peter Miller. 00004 // 00005 // This program is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation; either version 3 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with this program. If not, see 00017 // <http://www.gnu.org/licenses/>. 00018 // 00019 00020 #ifndef AEGIS_AER_STMT_FOR_H 00021 #define AEGIS_AER_STMT_FOR_H 00022 00023 #include <libaegis/aer/expr.h> 00024 #include <libaegis/aer/stmt.h> 00025 00030 class rpt_stmt_for: 00031 public rpt_stmt 00032 { 00033 public: 00037 virtual ~rpt_stmt_for(); 00038 00039 private: 00053 rpt_stmt_for(const rpt_expr::pointer &a, const rpt_expr::pointer &b, 00054 const rpt_expr::pointer &c, const rpt_stmt::pointer &body); 00055 00056 public: 00070 static rpt_stmt::pointer create(const rpt_expr::pointer &a, 00071 const rpt_expr::pointer &b, const rpt_expr::pointer &c, 00072 const rpt_stmt::pointer &body); 00073 00074 protected: 00075 // see base class for documentation. 00076 void run(rpt_stmt_result_ty *) const; 00077 00078 private: 00083 rpt_expr::pointer e[3]; 00084 00088 rpt_stmt_for(); 00089 00093 rpt_stmt_for(const rpt_stmt_for &); 00094 00098 rpt_stmt_for &operator=(const rpt_stmt_for &); 00099 }; 00100 00101 00106 class rpt_stmt_foreach: 00107 public rpt_stmt 00108 { 00109 public: 00113 virtual ~rpt_stmt_foreach(); 00114 00115 private: 00127 rpt_stmt_foreach(const rpt_expr::pointer &a, const rpt_expr::pointer &b, 00128 const rpt_stmt::pointer &body); 00129 00130 public: 00142 static rpt_stmt::pointer create(const rpt_expr::pointer &a, 00143 const rpt_expr::pointer &b, const rpt_stmt::pointer &body); 00144 00145 protected: 00146 // see base class for documentation. 00147 void run(rpt_stmt_result_ty *) const; 00148 00149 private: 00154 rpt_expr::pointer e[2]; 00155 00159 rpt_stmt_foreach(); 00160 00164 rpt_stmt_foreach(const rpt_stmt_foreach &); 00165 00169 rpt_stmt_foreach &operator=(const rpt_stmt_foreach &); 00170 }; 00171 00172 00177 class rpt_stmt_break: 00178 public rpt_stmt 00179 { 00180 public: 00184 virtual ~rpt_stmt_break(); 00185 00186 private: 00191 rpt_stmt_break(); 00192 00193 public: 00198 static rpt_stmt::pointer create(); 00199 00200 protected: 00201 // see base class for documentation. 00202 void run(rpt_stmt_result_ty *) const; 00203 00204 private: 00208 rpt_stmt_break(const rpt_stmt_break &); 00209 00213 rpt_stmt_break &operator=(const rpt_stmt_break &); 00214 }; 00215 00216 00221 class rpt_stmt_continue: 00222 public rpt_stmt 00223 { 00224 public: 00228 virtual ~rpt_stmt_continue(); 00229 00230 private: 00235 rpt_stmt_continue(); 00236 00237 public: 00242 static rpt_stmt::pointer create(); 00243 00244 protected: 00245 // see base class for documentation. 00246 void run(rpt_stmt_result_ty *) const; 00247 00248 private: 00252 rpt_stmt_continue(const rpt_stmt_continue &); 00253 00257 rpt_stmt_continue &operator=(const rpt_stmt_continue &); 00258 }; 00259 00260 #endif // AEGIS_AER_STMT_FOR_H
1.7.6.1