home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ocl150a.zip / OCL / Source / slOProcRecord.cpp < prev    next >
C/C++ Source or Header  |  1996-08-12  |  3KB  |  108 lines

  1. // OCL - OS/2 Class Library
  2. // (c) Cubus 1995
  3. // All Rights Reserved
  4. // slOProcRecord.cpp
  5.  
  6.  
  7.  
  8. /*
  9.  * Redistribution and use in source and binary forms, with or without
  10.  * modification, are permitted provided that the following conditions
  11.  * are met:
  12.  * 1. Redistributions of source code must retain the above copyright
  13.  *    notice, this list of conditions and the following disclaimer.
  14.  * 2. Neither the name Cubus nor the name Team OCL may be used to
  15.  *    endorse or promote products derived from this software
  16.  *    without specific prior written permission.
  17.  * 3. See OCL.INF for a detailed copyright notice.
  18.  *
  19.  *              THIS SOFTWARE IS PROVIDED ``AS IS'' AND
  20.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  21.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  22.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  23.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  24.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  25.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  26.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  27.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  28.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  29.  * SUCH DAMAGE.
  30.  */
  31.  
  32. // $Header: W:/Projects/OCL/Source/rcs/slOProcRecord.cpp 1.50 1996/08/11 23:49:38 B.STEIN Release $
  33.  
  34. #define __OCL_SOURCE__
  35.  
  36. #define OINCL_OSTRING
  37. #define OINCL_BASE
  38.  
  39. #include <ocl.hpp>
  40. #include <slOProcRecord.hpp>
  41.  
  42.  
  43. #if defined(__EMX__)
  44.   template class OListItem<OProcRecord>;
  45.   template class OSortedList<OProcRecord>;
  46. #endif
  47.  
  48.  
  49. OProcRecord::OProcRecord(const pOProcRecord newRecord)
  50.     : Threads(newRecord->Threads), Pid(newRecord->Pid),
  51.       PPid(newRecord->PPid), Sid(newRecord->Sid)
  52. {
  53.  Module << newRecord->Module;
  54. }
  55.  
  56. OProcRecord::OProcRecord(const OProcRecord& newRecord)
  57.     : Threads(newRecord.Threads), Pid(newRecord.Pid),
  58.       PPid(newRecord.PPid), Sid(newRecord.Sid)
  59. {
  60.  Module << newRecord.Module;
  61. }
  62.  
  63. OProcRecord::OProcRecord()
  64.   {}
  65.  
  66. OProcRecord::~OProcRecord()
  67.   {}
  68.  
  69. PSZ OProcRecord::isOfType() const
  70.  return("OProcRecord"); 
  71. }
  72.  
  73.  
  74. slOProcRecord::slOProcRecord()
  75.   {}
  76.  
  77. slOProcRecord::~slOProcRecord()
  78.   {}
  79.  
  80. PSZ slOProcRecord::isOfType() const
  81.  return("slOProcRecord"); 
  82. }
  83.  
  84. slOProcRecord& slOProcRecord::operator << (OProcRecord* newRecord)
  85. {
  86.  pOProcRecord tmp = new OProcRecord(newRecord);
  87.  addSorted(tmp);
  88.  return(*this);
  89. }
  90.  
  91. slOProcRecord& slOProcRecord::operator << (OProcRecord& newRecord)
  92. {
  93.  pOProcRecord tmp = new OProcRecord(newRecord);
  94.  addSorted(tmp);
  95.  return(*this);
  96. }
  97.  
  98.  
  99. BOOL slOProcRecord::isLess(const OProcRecord *first, const OProcRecord *second)
  100. {
  101.  return(first->Pid < second->Pid);
  102. }
  103.  
  104.  
  105. // end of source
  106.