Advertisement
Tyler_Elric

Iterable.h

Feb 9th, 2012
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. #include <stdexcept>
  2.  
  3. #ifndef __IterableClass__h
  4. #define __IterableClass__h
  5.  
  6. class Iterable
  7. {
  8.     public:
  9.         Iterable();
  10.         class Slice
  11.         {
  12.             private:
  13.                 signed long int mStart,mEnd;
  14.             public:
  15.                 Slice(signed long int aStart,signed long int aEnd);
  16.                 Slice(const Slice& );
  17.                 unsigned int start(unsigned int) const;
  18.                 unsigned int end(unsigned int) const;
  19.         };
  20.         class UnneededAllocation
  21.         {
  22.             private:
  23.                 unsigned int mNumRemaining;
  24.             public:
  25.                 UnneededAllocation(unsigned int);
  26.                 unsigned int remaining();
  27.         };
  28.     protected:
  29.         unsigned int mAlloc,mUsed;
  30.         static unsigned int gBufferSize;
  31.         virtual void Allocate(unsigned int);
  32.         virtual unsigned int newSize(unsigned int);
  33. };
  34. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement