home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / libg++-2.7.1-bin.lha / lib / g++-include / gen / intSList.hP < prev    next >
Text File  |  1996-10-12  |  1KB  |  34 lines

  1. /*  : Light weight List: This will simply reuse code from a int List, which 
  2. was genclassed from the SLList libg++ class. The classes generated from this file
  3. will all be derived classes from class VoidSLList or intSLList. Note that class SLList does not 
  4. offer all the functionality of List classes, such as sharing of sub-Lists.
  5. However, no additional code is needed at all and no .cc file is generated. So it costs nothing
  6. to use these type-safe Lists. Only member functions needing type casting are re-defined  */
  7.  
  8.  
  9. #ifndef _<T>SList_h
  10. #define _<T>SList_h 1
  11.  
  12. #include "int.SLList.h"
  13. #include "<T>.defs.h"
  14.  
  15. class <T>SList : public intSLList
  16. {
  17. public:
  18.   <T>SList() {}
  19.   <T>SList(<T>SList& a) : (a) {}
  20.   ~<T>SList() {}
  21.  
  22.   <T>SList& operator = (<T>SList& a) {
  23.     return (<T>SList&) intSLList::operator= (a); }
  24.  
  25.   <T>& operator () (Pix p) { return (<T>&) (intSLList::operator() (p)); }
  26.   <T>& front() { return (<T>&) intSLList::front(); }
  27.   <T>& rear()  { return (<T>&) intSLList::rear(); }
  28.   <T> remove_front() { return (<T>) intSLList::remove_front(); }
  29.  
  30. };
  31.  
  32. #endif /* conditional include */
  33.  
  34.