nis-util  1.0.D108
lib/space/auto_master/row/direct.h
Go to the documentation of this file.
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_ROW_DIRECT_H
00020 #define LIB_SPACE_AUTO_MASTER_ROW_DIRECT_H
00021 
00022 #include <lib/space/auto_master/row.h>
00023 #include <lib/space/automap.h>
00024 
00029 class space_auto_master_row_direct:
00030     public space_auto_master_row
00031 {
00032 public:
00033     typedef boost::shared_ptr<space_auto_master_row_direct> pointer;
00034 
00038     virtual ~space_auto_master_row_direct();
00039 
00052     static pointer create(const mount_point &key, const rcstring &filename,
00053         const rcstring &options);
00054 
00055     // See base class for documentation.
00056     keys_t get_keys(void) const;
00057 
00058 protected:
00059     // See base class for documentation.
00060     void print(const output_pointer &op) const;
00061 
00062     // See base class for documentation.
00063     void load_map(const rcstring &filename,
00064         const space_hosts_slurp::pointer &hosts);
00065 
00066     // See base class for documentation.
00067     rcstring get_filename(void) const;
00068 
00069     // See base class for documentation.
00070     bool has_associated_file(void) const;
00071 
00072 private:
00085     space_auto_master_row_direct(const mount_point &key,
00086         const rcstring &filename, const rcstring &options);
00087 
00098     rcstring maptype;
00099 
00104     rcstring mapname;
00105 
00110     space_automap::pointer map;
00111 
00116     space_auto_master_row_direct();
00117 
00125     space_auto_master_row_direct(const space_auto_master_row_direct &rhs);
00126 
00134     space_auto_master_row_direct &operator=(
00135         const space_auto_master_row_direct &rhs);
00136 };
00137 
00138 // vim: set ts=8 sw=4 et :
00139 #endif // LIB_SPACE_AUTO_MASTER_ROW_DIRECT_H