1 #ifndef PROCESS_ENTRY_CLASS
2 #define PROCESS_ENTRY_CLASS
4 /*****************************************************************************\
6 * Name : process_entry *
7 * Author : Chris Koeritz *
9 *******************************************************************************
10 * Copyright (c) 2000-$now By Author. This program is free software; you can *
11 * redistribute it and/or modify it under the terms of the GNU General Public *
12 * License as published by the Free Software Foundation; either version 2 of *
13 * the License or (at your option) any later version. This is online at: *
14 * http://www.fsf.org/copyleft/gpl.html *
15 * Please send any updates to: fred@gruntose.com *
16 \*****************************************************************************/
18 #include <basis/array.h>
19 #include <basis/astring.h>
20 #include <basis/contracts.h>
21 #include <basis/definitions.h>
25 //! Encapsulates information about OS processes.
27 class process_entry : public virtual basis::text_formable
30 basis::un_int _process_id; //!< the OS identifier of this process.
31 basis::un_int _references; //!< the number of references to (users of) this process.
32 basis::un_int _threads; //!< the number of threads in use by this process.
33 basis::un_int _parent_process_id; //!< the process id of the owning process.
34 basis::un_short _module16; //!< non-zero if this process is a 16-bit application.
37 process_entry(const process_entry &to_copy);
40 DEFINE_CLASS_NAME("process_entry");
42 process_entry &operator =(const process_entry &to_copy);
44 const basis::astring &path() const;
45 void path(const basis::astring &new_path);
47 basis::astring text_form() const;
48 //!< returns a descriptive string for the information here.
50 void text_form(basis::base_string &fill) const; //!< base class requirement.
53 basis::astring *_process_path;
58 //! a handy class that implements an array of process entries.
60 class process_entry_array : public basis::array<process_entry> {};