diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/Buffer.h | 4 | ||||
-rw-r--r-- | include/Input.h | 6 | ||||
-rw-r--r-- | include/Output.h | 6 |
3 files changed, 11 insertions, 5 deletions
diff --git a/include/Buffer.h b/include/Buffer.h index 47c5c5a..0256853 100644 --- a/include/Buffer.h +++ b/include/Buffer.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Buffer.h,v 1.23 2007-09-17 08:33:25 pixel Exp $ */ +/* $Id: Buffer.h,v 1.24 2008-01-21 17:55:43 pixel Exp $ */ #ifndef __BUFFER_H__ #define __BUFFER_H__ @@ -53,12 +53,14 @@ class Buffer : public Handle { off_t wtell() const; void reset(); const Byte * GetBuffer() const; + static int GetNbBuffer(); private: Byte * buffer, zero; size_t realsiz, bufsiz, ptr, wptr; bool seekable; bool got_eof; + static int nb_buffer; }; #endif diff --git a/include/Input.h b/include/Input.h index 2219273..eb4b2a9 100644 --- a/include/Input.h +++ b/include/Input.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Input.h,v 1.22 2007-05-30 11:57:08 pixel Exp $ */ +/* $Id: Input.h,v 1.23 2008-01-21 17:55:43 pixel Exp $ */ #ifndef __INPUT_H__ #define __INPUT_H__ @@ -36,7 +36,7 @@ class Input : public Handle { public: Input(const String & = "") throw (GeneralException); Input(const Input &); - virtual ~Input() {} + virtual ~Input() { nb_input--; } virtual bool CanWrite() const; virtual bool CanRead() const; virtual bool CanSeek() const; @@ -45,6 +45,7 @@ class Input : public Handle { virtual ssize_t GetSize() const; virtual time_t GetModif() const; virtual void SetZ(int = 9) throw (GeneralException); + static int GetNbInput(); struct openresults_t { String name; @@ -62,6 +63,7 @@ class Input : public Handle { private: int wrapopen(const String &, openresults_t *); + static int nb_input; }; class Stdin_t : public Input { diff --git a/include/Output.h b/include/Output.h index b520277..64209b8 100644 --- a/include/Output.h +++ b/include/Output.h @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: Output.h,v 1.15 2007-05-30 11:57:08 pixel Exp $ */ +/* $Id: Output.h,v 1.16 2008-01-21 17:55:43 pixel Exp $ */ #ifndef __OUTPUT_H__ #define __OUTPUT_H__ @@ -31,12 +31,13 @@ class Output : public Handle { public: Output(String = "", int create = 1, int trunc = 1) throw (GeneralException); Output(const Output &); - virtual ~Output() {} + virtual ~Output() { nb_output--; } virtual bool CanWrite() const; virtual bool CanRead() const; virtual bool CanSeek() const; virtual off_t seek(off_t, int = SEEK_SET) throw (GeneralException); virtual String GetName() const; + static int GetNbOutput(); protected: String n; @@ -45,6 +46,7 @@ class Output : public Handle { private: int wrapopen(const String &, int, int); + static int nb_output; }; class Stdout_t : public Output { |