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

  1.  
  2.  
  3.  
  4.  
  5. /*
  6.  *
  7.  *          Copyright (C) 1994, M. A. Sridhar
  8.  *  
  9.  *
  10.  *     This software is Copyright M. A. Sridhar, 1994. You are free
  11.  *     to copy, modify or distribute this software  as you see fit,
  12.  *     and to use  it  for  any  purpose, provided   this copyright
  13.  *     notice and the following   disclaimer are included  with all
  14.  *     copies.
  15.  *
  16.  *                        DISCLAIMER
  17.  *
  18.  *     The author makes no warranties, either expressed or implied,
  19.  *     with respect  to  this  software, its  quality, performance,
  20.  *     merchantability, or fitness for any particular purpose. This
  21.  *     software is distributed  AS IS.  The  user of this  software
  22.  *     assumes all risks  as to its quality  and performance. In no
  23.  *     event shall the author be liable for any direct, indirect or
  24.  *     consequential damages, even if the  author has been  advised
  25.  *     as to the possibility of such damages.
  26.  *
  27.  */
  28.  
  29.  
  30.  
  31.  
  32. #ifdef __GNUC__
  33. #pragma implementation
  34. #endif
  35.  
  36.  
  37.  
  38.  
  39. #if !defined(__BORLANDC__)
  40. #include "base/seqimp.cxx"
  41. // Don't include this under Borland C because the CL_Sequence<long> is
  42. // instantiated indirectly in the CL_Sequence<CL_Object*> class.
  43. #endif
  44.  
  45. #if defined(__GNUC__) && __GNUC_MINOR__ >= 6
  46. template class CL_Sequence<long>;
  47. #endif
  48.  
  49. #include "base/intseq.h"
  50.  
  51. CL_DEFINE_CLASS(CL_IntegerSequence, _CL_IntegerSequence_CLASSID);
  52.  
  53.  
  54. CL_IntegerSequence::CL_IntegerSequence (long initial_size)
  55. : CL_Sequence<long> (initial_size)
  56. {
  57. }
  58.  
  59.  
  60. CL_IntegerSequence::CL_IntegerSequence (long data[], long count)
  61. {
  62.     for (register short i = 0; i < count; i++)
  63.         Add (data[i]);
  64. }
  65.  
  66.  
  67. CL_IntegerSequence::CL_IntegerSequence (const CL_Sequence<long>& s)
  68. : CL_Sequence<long> (s)
  69. {
  70. }
  71.  
  72.