Aegis  4.25.D505
/home/archives/aegis/branch.4/branch.25/delta28933.505/aefind/tree/bitwise.h
Go to the documentation of this file.
00001 //
00002 //      aegis - project change supervisor
00003 //      Copyright (C) 1997, 2002, 2005-2008, 2012 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 AEFIND_TREE_BITWISE_H
00021 #define AEFIND_TREE_BITWISE_H
00022 
00023 #include <aefind/tree/diadic.h>
00024 #include <aefind/tree/monadic.h>
00025 
00026 class tree_list; // forward
00027 
00032 class tree_bitwise_and:
00033     public tree_diadic
00034 {
00035 public:
00039     virtual ~tree_bitwise_and();
00040 
00041 private:
00051     tree_bitwise_and(const pointer &left, const pointer &right);
00052 
00053 public:
00063     static pointer create(const pointer &left, const pointer &right);
00064 
00072     static pointer create_l(const tree_list &args);
00073 
00074 protected:
00075     // See base class for documentation.
00076     const char *name() const;
00077 
00078     // See base class for documentation.
00079     rpt_value::pointer evaluate(string_ty *, string_ty *, string_ty *,
00080         struct stat *) const;
00081 
00082     // See base class for documentation.
00083     tree::pointer optimize() const;
00084 
00085 private:
00089     tree_bitwise_and();
00090 
00094     tree_bitwise_and(const tree_bitwise_and &);
00095 
00099     tree_bitwise_and &operator=(const tree_bitwise_and &);
00100 };
00101 
00102 
00107 class tree_bitwise_or:
00108     public tree_diadic
00109 {
00110 public:
00114     virtual ~tree_bitwise_or();
00115 
00116 private:
00126     tree_bitwise_or(const pointer &left, const pointer &right);
00127 
00128 public:
00138     static pointer create(const pointer &left, const pointer &right);
00139 
00147     static pointer create_l(const tree_list &args);
00148 
00149 protected:
00150     // See base class for documentation.
00151     const char *name() const;
00152 
00153     // See base class for documentation.
00154     rpt_value::pointer evaluate(string_ty *, string_ty *, string_ty *,
00155         struct stat *) const;
00156 
00157     // See base class for documentation.
00158     tree::pointer optimize() const;
00159 
00160 private:
00164     tree_bitwise_or();
00165 
00169     tree_bitwise_or(const tree_bitwise_or &);
00170 
00174     tree_bitwise_or &operator=(const tree_bitwise_or &);
00175 };
00176 
00177 
00182 class tree_bitwise_xor:
00183     public tree_diadic
00184 {
00185 public:
00189     virtual ~tree_bitwise_xor();
00190 
00191 private:
00201     tree_bitwise_xor(const pointer &left, const pointer &right);
00202 
00203 public:
00213     static pointer create(const pointer &left, const pointer &right);
00214 
00222     static pointer create_l(const tree_list &args);
00223 
00224 protected:
00225     // See base class for documentation.
00226     const char *name() const;
00227 
00228     // See base class for documentation.
00229     rpt_value::pointer evaluate(string_ty *, string_ty *, string_ty *,
00230         struct stat *) const;
00231 
00232     // See base class for documentation.
00233     tree::pointer optimize() const;
00234 
00235 private:
00239     tree_bitwise_xor();
00240 
00244     tree_bitwise_xor(const tree_bitwise_xor &);
00245 
00249     tree_bitwise_xor &operator=(const tree_bitwise_xor &);
00250 };
00251 
00252 
00257 class tree_bitwise_not:
00258     public tree_monadic
00259 {
00260 public:
00264     virtual ~tree_bitwise_not();
00265 
00266 private:
00271     tree_bitwise_not(const pointer &arg);
00272 
00273 public:
00281     static pointer create(const pointer &arg);
00282 
00290     static pointer create_l(const tree_list &args);
00291 
00292 protected:
00293     // See base class for documentation.
00294     const char *name() const;
00295 
00296     // See base class for documentation.
00297     rpt_value::pointer evaluate(string_ty *, string_ty *, string_ty *,
00298         struct stat *) const;
00299 
00300     // See base class for documentation.
00301     tree::pointer optimize() const;
00302 
00303 private:
00307     tree_bitwise_not();
00308 
00312     tree_bitwise_not(const tree_bitwise_not &);
00313 
00317     tree_bitwise_not &operator=(const tree_bitwise_not &);
00318 };
00319 
00320 
00325 class tree_shift_left:
00326     public tree_diadic
00327 {
00328 public:
00332     virtual ~tree_shift_left();
00333 
00334 private:
00344     tree_shift_left(const pointer &left, const pointer &right);
00345 
00346 public:
00356     static pointer create(const pointer &left, const pointer &right);
00357 
00365     static pointer create_l(const tree_list &args);
00366 
00367 protected:
00368     // See base class for documentation.
00369     const char *name() const;
00370 
00371     // See base class for documentation.
00372     rpt_value::pointer evaluate(string_ty *, string_ty *, string_ty *,
00373         struct stat *) const;
00374 
00375     // See base class for documentation.
00376     tree::pointer optimize() const;
00377 
00378 private:
00382     tree_shift_left();
00383 
00387     tree_shift_left(const tree_shift_left &);
00388 
00392     tree_shift_left &operator=(const tree_shift_left &);
00393 };
00394 
00395 
00400 class tree_shift_right:
00401     public tree_diadic
00402 {
00403 public:
00407     virtual ~tree_shift_right();
00408 
00409 private:
00419     tree_shift_right(const pointer &left, const pointer &right);
00420 
00421 public:
00431     static pointer create(const pointer &left, const pointer &right);
00432 
00440     static pointer create_l(const tree_list &args);
00441 
00442 protected:
00443     // See base class for documentation.
00444     const char *name() const;
00445 
00446     // See base class for documentation.
00447     rpt_value::pointer evaluate(string_ty *, string_ty *, string_ty *,
00448         struct stat *) const;
00449 
00450     // See base class for documentation.
00451     tree::pointer optimize() const;
00452 
00453 private:
00457     tree_shift_right();
00458 
00462     tree_shift_right(const tree_shift_right &);
00463 
00467     tree_shift_right &operator=(const tree_shift_right &);
00468 };
00469 
00470 #endif // AEFIND_TREE_BITWISE_H
00471 // vim: set ts=8 sw=4 et :