1 // 2 // aegis - project change supervisor 3 // Copyright (C) 1995, 2005-2008 Peter Miller 4 // 5 // This program is free software; you can redistribute it and/or modify 6 // it under the terms of the GNU General Public License as published by 7 // the Free Software Foundation; either version 3 of the License, or 8 // (at your option) any later version. 9 // 10 // This program is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License 16 // along with this program. If not, see 17 // <http://www.gnu.org/licenses/>. 18 // 19 20 #ifndef AEGIS_AER_FUNC_SUBSTR_H 21 #define AEGIS_AER_FUNC_SUBSTR_H 22 23 #include <libaegis/aer/func.h> 24 25 26 /** 27 * The rpt_func_substr class is used to represent the substr 28 * function, callable from within the report generator. 29 */ 30 class rpt_func_substr: 31 public rpt_func 32 { 33 public: 34 /** 35 * The destructor. 36 */ 37 virtual ~rpt_func_substr(); 38 39 private: 40 /** 41 * The constructor. It is private on purpose, use the "create" 42 * class method instead. 43 */ 44 rpt_func_substr(); 45 46 public: 47 /** 48 * The create class method is used to create a new dynamically 49 * allocated instance of this class. 50 */ 51 static rpt_func::pointer create(); 52 53 protected: 54 // See base class for documentation. 55 const char *name() const; 56 57 // See base class for documentation. 58 bool optimizable() const; 59 60 // See base class for documentation. 61 bool verify(const rpt_expr::pointer &ep) const; 62 63 // See base class for documentation. 64 rpt_value::pointer run(const rpt_expr::pointer &ep, size_t argc, 65 rpt_value::pointer *argv) const; 66 67 private: 68 /** 69 * The copy constructor. Do not use. 70 */ 71 rpt_func_substr(const rpt_func_substr &); 72 73 /** 74 * The assignment operator. Do not use. 75 */ 76 rpt_func_substr &operator=(const rpt_func_substr &); 77 }; 78 79 #endif // AEGIS_AER_FUNC_SUBSTR_H 80