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_OUTPUT_PREFIX_H 00020 #define LIB_OUTPUT_PREFIX_H 00021 00022 #include <lib/output.h> 00023 00028 class output_prefix: 00029 public output 00030 { 00031 public: 00035 virtual ~output_prefix(); 00036 00047 static pointer create(const output::pointer &deeper, 00048 const rcstring &prefix); 00049 00059 static pointer create(const output::pointer &deeper, int indent); 00060 00061 protected: 00062 // See base class for docuemntation. 00063 void put(char c); 00064 00065 // See base class for docuemntation. 00066 int get_line_width(void) const; 00067 00068 // See base class for docuemntation. 00069 int get_column(void) const; 00070 00071 private: 00081 output_prefix(const output::pointer &deeper, const rcstring &prefix); 00082 00091 output_prefix(const output::pointer &deeper, int indent); 00092 00097 output::pointer deeper; 00098 00103 rcstring prefix; 00104 00110 rcstring prefix0; 00111 00116 output_prefix(); 00117 00125 output_prefix(const output_prefix &rhs); 00126 00134 output_prefix &operator=(const output_prefix &rhs); 00135 }; 00136 00137 // vim: set ts=8 sw=4 et : 00138 #endif // LIB_OUTPUT_PREFIX_H