home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / yacl-012.zip / base / strgset.h < prev    next >
C/C++ Source or Header  |  1995-04-08  |  2KB  |  72 lines

  1.  
  2.  
  3. #ifndef _strgset_h_ /* Wed Jul 27 16:54:28 1994 */
  4. #define _strgset_h_
  5.  
  6.  
  7.  
  8. /*
  9.  *
  10.  *          Copyright (C) 1994, M. A. Sridhar
  11.  *  
  12.  *
  13.  *     This software is Copyright M. A. Sridhar, 1994. You are free
  14.  *     to copy, modify or distribute this software  as you see fit,
  15.  *     and to use  it  for  any  purpose, provided   this copyright
  16.  *     notice and the following   disclaimer are included  with all
  17.  *     copies.
  18.  *
  19.  *                        DISCLAIMER
  20.  *
  21.  *     The author makes no warranties, either expressed or implied,
  22.  *     with respect  to  this  software, its  quality, performance,
  23.  *     merchantability, or fitness for any particular purpose. This
  24.  *     software is distributed  AS IS.  The  user of this  software
  25.  *     assumes all risks  as to its quality  and performance. In no
  26.  *     event shall the author be liable for any direct, indirect or
  27.  *     consequential damages, even if the  author has been  advised
  28.  *     as to the possibility of such damages.
  29.  *
  30.  */
  31.  
  32.  
  33.  
  34. #ifdef __GNUC__
  35. #pragma interface
  36. #endif
  37.  
  38. #include "base/set.h"
  39. #include "base/string.h"
  40.  
  41. class CL_EXPORT CL_StringSet: public CL_Set<CL_String> {
  42.  
  43. public:
  44.     CL_StringSet StringsWithPrefix (const CL_String& s) const;
  45.     // Return a set containing all those strings in this set that have
  46.     // {\tt s} as prefix.
  47.     
  48.     //
  49.     // ------------------------- Basic methods --------------------
  50.     //
  51.     CL_Object* Clone () const
  52.         {return new CL_Set<CL_String> (*this);};
  53.     // Override the method inherited from {\small\tt CL_Object}.
  54.     
  55.     const char* ClassName() const {return "CL_StringSet";};
  56.     // Override the method inherited from {\small\tt CL_Object}.
  57.     
  58.     CL_ClassId ClassId() const
  59.         { return _CL_StringSet_CLASSID;};
  60.     // Override the method inherited from {\small\tt CL_Object}.
  61.  
  62.  
  63.  
  64.     // -------------------- End public protocol ---------------------------
  65.  
  66. };
  67.  
  68.  
  69. typedef CL_SetIterator<CL_String>  CL_StringSetIterator;
  70.  
  71. #endif /* _strgset_h_ */
  72.