]> git.tdb.fi Git - libs/core.git/blobdiff - source/pipe.h
Move class members and comments around
[libs/core.git] / source / pipe.h
index b67cd79494431f8b05789b5298534e5fbbd65eab..71edf7eb3246f125ceb09ccd90495381807c8b85 100644 (file)
@@ -8,26 +8,31 @@ namespace IO {
 
 class Pipe: public Base
 {
-public:
-       Pipe();
-       void set_block(bool);
-       void close();
-       Handle get_event_handle();
-       ~Pipe();
 private:
        Handle handle[2];
 #ifdef WIN32
        OVERLAPPED *overlapped;
-       Handle     event;
-       unsigned   buf_size;
-       char       *buffer;
-       unsigned   buf_avail;
-       char       *buf_next;
+       Handle event;
+       unsigned buf_size;
+       char *buffer;
+       unsigned buf_avail;
+       char *buf_next;
 #endif
 
+public:
+       Pipe();
+       ~Pipe();
+
+       void close();
+
+       void set_block(bool);
+
 protected:
-       unsigned do_write(const char *, unsigned);
-       unsigned do_read(char *, unsigned);
+       virtual unsigned do_write(const char *, unsigned);
+       virtual unsigned do_read(char *, unsigned);
+
+public:
+       virtual Handle get_event_handle();
 };
 
 } // namespace IO