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

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