source: box/trunk/lib/common/FdGetLine.h @ 2960

Revision 2960, 1.2 KB checked in by chris, 13 months ago (diff)

Add virtual destructors to GetLine? and FdGetLine? to silence warnings.

  • Property svn:eol-style set to native
Line 
1// --------------------------------------------------------------------------
2//
3// File
4//              Name:    FdGetLine.h
5//              Purpose: Line based file descriptor reading
6//              Created: 2003/07/24
7//
8// --------------------------------------------------------------------------
9
10#ifndef FDGETLINE__H
11#define FDGETLINE__H
12
13#include <string>
14
15#include "GetLine.h"
16
17// --------------------------------------------------------------------------
18//
19// Class
20//              Name:    FdGetLine
21//              Purpose: Line based file descriptor reading
22//              Created: 2003/07/24
23//
24// --------------------------------------------------------------------------
25class FdGetLine : public GetLine
26{
27public:
28        FdGetLine(int fd);
29        virtual ~FdGetLine();
30private:
31        FdGetLine(const FdGetLine &rToCopy);
32
33public:
34        virtual std::string GetLine(bool Preprocess = false);
35        // Call to detach, setting file pointer correctly to last bit read.
36        // Only works for lseek-able file descriptors.
37        void DetachFile();
38        // if we read 0 bytes from an fd, it must be end of stream,
39        // because we don't support timeouts
40        virtual bool IsStreamDataLeft() { return false; }
41
42protected:
43        int ReadMore(int Timeout = IOStream::TimeOutInfinite);
44
45private:
46        int mFileHandle;
47};
48
49#endif // FDGETLINE__H
50
Note: See TracBrowser for help on using the repository browser.