Aegis  4.25.D505
libaegis/aer/func/now.h
Go to the documentation of this file.
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_FUNC_NOW_H
00021 #define AEGIS_AER_FUNC_NOW_H
00022 
00023 #include <common/ac/time.h>
00024 
00025 #include <libaegis/aer/func.h>
00026 
00027 
00032 class rpt_func_now:
00033     public rpt_func
00034 {
00035 public:
00039     virtual ~rpt_func_now();
00040 
00041 private:
00046     rpt_func_now();
00047 
00048 public:
00053     static rpt_func::pointer create();
00054 
00055 protected:
00056     // See base class for documentation.
00057     const char *name() const;
00058 
00059     // See base class for documentation.
00060     bool optimizable() const;
00061 
00062     // See base class for documentation.
00063     bool verify(const rpt_expr::pointer &ep) const;
00064 
00065     // See base class for documentation.
00066     rpt_value::pointer run(const rpt_expr::pointer &ep, size_t argc,
00067         rpt_value::pointer *argv) const;
00068 
00069 private:
00073     rpt_func_now(const rpt_func_now &);
00074 
00078     rpt_func_now &operator=(const rpt_func_now &);
00079 };
00080 
00081 
00086 class rpt_func_working_days:
00087     public rpt_func
00088 {
00089 public:
00093     virtual ~rpt_func_working_days();
00094 
00095 private:
00100     rpt_func_working_days();
00101 
00102 public:
00107     static rpt_func::pointer create();
00108 
00109 protected:
00110     // See base class for documentation.
00111     const char *name() const;
00112 
00113     // See base class for documentation.
00114     bool optimizable() const;
00115 
00116     // See base class for documentation.
00117     bool verify(const rpt_expr::pointer &ep) const;
00118 
00119     // See base class for documentation.
00120     rpt_value::pointer run(const rpt_expr::pointer &ep, size_t argc,
00121         rpt_value::pointer *argv) const;
00122 
00123 private:
00127     rpt_func_working_days(const rpt_func_working_days &);
00128 
00132     rpt_func_working_days &operator=(const rpt_func_working_days &);
00133 };
00134 
00135 double working_days(time_t, time_t);
00136 
00137 #endif // AEGIS_AER_FUNC_NOW_H