|
Aegis
4.25.D505
|
00001 // 00002 // aegis - project change supervisor 00003 // Copyright (C) 1992-2006, 2008, 2011, 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 (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 00016 // along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 // 00018 00019 #ifndef OUTPUT_PAGER_H 00020 #define OUTPUT_PAGER_H 00021 00022 #include <common/nstring.h> 00023 #include <libaegis/output.h> 00024 00030 class output_pager: 00031 public output 00032 { 00033 public: 00037 virtual ~output_pager(); 00038 00039 private: 00044 output_pager(); 00045 00046 public: 00056 static void set(int flag, void(*usage)(void)); 00057 00063 static pointer open(void); 00064 00070 static void cleanup(void); 00071 00072 protected: 00073 // See base class for documentation. 00074 nstring filename(void) const; 00075 00076 // See base class for documentation. 00077 nstring type_name(void) const; 00078 00079 // See base class for documentation. 00080 long ftell_inner(void) const; 00081 00082 // See base class for documentation. 00083 void write_inner(const void *data, size_t length); 00084 00085 // See base class for documentation. 00086 void end_of_line_inner(void); 00087 00088 // See base class for documentation. 00089 void flush_inner(void); 00090 00091 private: 00092 void *vdeeper; 00093 int pid; 00094 nstring pager; 00095 bool bol; 00096 00097 void pipe_open(void); 00098 void pager_error(void); 00099 00103 output_pager(const output_pager &); 00104 00108 output_pager &operator=(const output_pager &); 00109 }; 00110 00119 void option_pager_set(int flag, void(*usage)(void)); 00120 00121 #endif // OUTPUT_PAGER_H 00122 // vim: set ts=8 sw=4 et :
1.7.6.1