nis-util
1.0.D108
|
00001 // 00002 // nis-util - NIS Administration Utilities 00003 // Copyright (C) 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 2 of the License, or (at 00008 // 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 GNU 00013 // General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License along 00016 // with this program. If not, see <http://www.gnu.org/licenses/>. 00017 // 00018 00019 #ifndef LIB_SPACE_AUTO_MASTER_FUNCTOR_CHECK_H 00020 #define LIB_SPACE_AUTO_MASTER_FUNCTOR_CHECK_H 00021 00022 #include <lib/space/auto_master/functor.h> 00023 #include <lib/space/hosts/slurp.h> 00024 00029 class space_auto_master_functor_check: 00030 public space_auto_master_functor 00031 { 00032 public: 00036 virtual ~space_auto_master_functor_check(); 00037 00041 space_auto_master_functor_check(const space_auto_master::pointer &context, 00042 const space_hosts_slurp::pointer &hosts); 00043 00044 protected: 00045 // See base class for documentation. 00046 void walk(const space_auto_master_row::pointer &rp); 00047 00048 private: 00053 space_auto_master::pointer context; 00054 00055 space_hosts_slurp::pointer hosts; 00056 00057 void check_for_dumb_place(const space_auto_master_row::pointer &rp); 00058 00059 typedef std::list<space_auto_master_row::pointer> overlap_t; 00060 00061 overlap_t overlap; 00062 00063 void check_for_overlap(const space_auto_master_row::pointer &rp); 00064 00065 void check_case(const space_auto_master_row::pointer &rp); 00066 00067 space_auto_master_row::pointer direct_rp; 00068 00069 space_auto_master_row::pointer hosts_rp; 00070 00075 space_auto_master_functor_check(); 00076 00084 space_auto_master_functor_check(const space_auto_master_functor_check &rhs); 00085 00093 space_auto_master_functor_check &operator=( 00094 const space_auto_master_functor_check &rhs); 00095 }; 00096 00097 // vim: set ts=8 sw=4 et : 00098 #endif // LIB_SPACE_AUTO_MASTER_FUNCTOR_CHECK_H