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

  1.  
  2.  
  3. #ifndef _strgseq_h_ /* Fri May 20 19:15:07 1994 */
  4. #define _strgseq_h_
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12. /*
  13.  *
  14.  *          Copyright (C) 1994, M. A. Sridhar
  15.  *  
  16.  *
  17.  *     This software is Copyright M. A. Sridhar, 1994. You are free
  18.  *     to copy, modify or distribute this software  as you see fit,
  19.  *     and to use  it  for  any  purpose, provided   this copyright
  20.  *     notice and the following   disclaimer are included  with all
  21.  *     copies.
  22.  *
  23.  *                        DISCLAIMER
  24.  *
  25.  *     The author makes no warranties, either expressed or implied,
  26.  *     with respect  to  this  software, its  quality, performance,
  27.  *     merchantability, or fitness for any particular purpose. This
  28.  *     software is distributed  AS IS.  The  user of this  software
  29.  *     assumes all risks  as to its quality  and performance. In no
  30.  *     event shall the author be liable for any direct, indirect or
  31.  *     consequential damages, even if the  author has been  advised
  32.  *     as to the possibility of such damages.
  33.  *
  34.  */
  35.  
  36.  
  37.  
  38.  
  39.  
  40. // The string sequence is a derived class, rather than a typedef, in order
  41. // to work around the quirks of the template instantiation mechanism. If
  42. // it were a typedef, we could not use it as return value for any of the
  43. // {\small\tt CL_String} methods, but we need to (in the {\small\tt Split}
  44. // method).
  45.  
  46.  
  47. #ifdef __GNUC__
  48. #pragma interface
  49. #endif
  50.  
  51. #include "base/sequence.h"
  52. #include "base/string.h"
  53.  
  54. class CL_EXPORT CL_StringSequence: public CL_Sequence<CL_String> {
  55.  
  56. public:
  57.     //
  58.     // ------------------------ Creation and destruction --------------
  59.     //
  60.     CL_StringSequence (long initial_size = 0);
  61.  
  62.     CL_StringSequence (const CL_String data[], long count);
  63.     // Create ourselves from a C-style array of Strings.
  64.     
  65.     CL_StringSequence (const char* data[], long count);
  66.     // Create ourselves from a C-style array of character  pointers.
  67.     
  68.     CL_StringSequence (const CL_Sequence<CL_String>& s);
  69.     // Copy constructor.
  70.  
  71.     const char* ClassName () const {return "CL_StringSequence";};
  72.     
  73.     CL_ClassId ClassId () const { return _CL_StringSequence_CLASSID; };
  74.     
  75. };
  76.  
  77.  
  78.  
  79. #endif /* _strgseq_h_ */
  80.