Add a bunch of APNs
Fork of C027_Support by
Diff: Pipe.h
- Revision:
- 2:b6012cd91657
- Parent:
- 0:cb2d45baaca3
- Child:
- 5:5362073f2689
--- a/Pipe.h Mon Oct 21 19:46:34 2013 +0000 +++ b/Pipe.h Fri Oct 25 08:47:22 2013 +0000 @@ -76,7 +76,7 @@ return (r != w); } //! get the number of values avialable in the buffer - int size(void) + virtual int size(void) { int t = w - r; if (t < 0) @@ -93,7 +93,7 @@ return t; } // get values from buffer (if the buffer has less values, only the values avilable are returned) - int get(T* p, int n) + virtual int get(T* p, int n) { int f = size(); if (f < n) @@ -116,9 +116,9 @@ return n; } // the following functions are useful if you like to inspect or parse the buffer - int start() { o = r; return size(); } // reset the parsing index and return the number of available elments - T next() { T t = b[o]; o = _inc(o); return t; } // get the next element and increment - void done() { r = o; } // commit the index + virtual int start(void) { o = r; return size(); } // reset the parsing index and return the number of available elments + virtual T next(void) { T t = b[o]; o = _inc(o); return t; } // get the next element and increment + virtual void done(void) { r = o; } // commit the index private: // buffer