Aegis  4.25.D505
/home/archives/aegis/branch.4/branch.25/delta28933.505/libaegis/input/crlf.h
Go to the documentation of this file.
00001 //
00002 // aegis - project change supervisor
00003 // Copyright (C) 1999, 2002, 2005, 2006, 2008, 2010, 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 LIBAEGIS_INPUT_CRLF_H
00020 #define LIBAEGIS_INPUT_CRLF_H
00021 
00022 #include <libaegis/input.h>
00023 
00028 class input_crlf:
00029     public input_ty
00030 {
00031 public:
00035     virtual ~input_crlf();
00036 
00037 private:
00047     input_crlf(input &deeper, bool esc_nl);
00048 
00049 public:
00060     static input create(input &deeper, bool esc_nl = false);
00061 
00062     // See base class for documentation.
00063     nstring name();
00064 
00065     // See base class for documentation.
00066     off_t length();
00067 
00068     // See base class for documentation.
00069     void keepalive();
00070 
00071     // See base class for documentation.
00072     ssize_t read_inner(void *data, size_t nbytes);
00073 
00074     // See base class for documentation.
00075     off_t ftell_inner();
00076 
00077     // See base class for documentation.
00078     bool is_remote() const;
00079 
00080 private:
00085     input deeper;
00086 
00087     off_t pos;
00088     long line_number;
00089     bool prev_was_newline;
00090     nstring name_cache;
00091 
00097     bool newlines_may_be_escaped;
00098 
00102     input_crlf();
00103 
00107     input_crlf(const input_crlf &arg);
00108 
00112     input_crlf &operator=(const input_crlf &arg);
00113 };
00114 
00115 #endif // LIBAEGIS_INPUT_CRLF_H
00116 // vim: set ts=8 sw=4 et :