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_AUTOMAP_ROW_H 00020 #define LIB_SPACE_AUTOMAP_ROW_H 00021 00022 #include <boost/shared_ptr.hpp> 00023 #include <list> 00024 00025 #include <lib/mount_point.h> 00026 #include <lib/source_location.h> 00027 00028 class space; // forward 00029 class space_automap; // forward 00030 class output; // forward 00031 00038 class space_automap_row 00039 { 00040 public: 00041 typedef boost::shared_ptr<space_automap_row> pointer; 00042 typedef boost::shared_ptr<output> output_pointer; 00043 00047 virtual ~space_automap_row(); 00048 00056 virtual void print(const output_pointer &op) const = 0; 00057 00062 const mount_point &get_mount_point(void) const { return key; } 00063 00068 rcstring get_options(void) const { return options; } 00069 00074 static void option_verify(const rcstring &name, const rcstring &value, 00075 space *context); 00076 00081 static void options_verify(const rcstring &text, space *context); 00082 00087 virtual void space_automap_insert_sub(space_automap *sap) const; 00088 00096 virtual pointer repath(const mount_point &stem) const = 0; 00097 00098 protected: 00108 space_automap_row(const mount_point &key, const rcstring &options); 00109 00110 private: 00116 mount_point key; 00117 00122 rcstring options; 00123 00124 private: 00129 space_automap_row(); 00130 00138 space_automap_row(const space_automap_row &rhs); 00139 00147 space_automap_row &operator=(const space_automap_row &rhs); 00148 }; 00149 00150 // vim: set ts=8 sw=4 et : 00151 #endif // LIB_SPACE_AUTOMAP_ROW_H