Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ProcessID Class Reference

#include <ProcessID.h>

List of all members.


Detailed Description

this is a class instead of a namespace so i can limit write access of the ID value to the OObjects

Although the ProcessID_t enum specifies the maximum number of processes in its NumProcesses value, this doesn't have to correspond to the actual number of active processes. If you want an element of dynamicism to launch and/or close processes at runtime, simply increase the NumProcesses to a higher value so that space can be allocated for those processes in shared memory regions for things like attachment pointers or other per-process data.

Not all processes *need* to have a named id, they just need a unique id.

Definition at line 17 of file ProcessID.h.

Public Types

enum  ProcessID_t { MainProcess, MotionProcess, SoundProcess, NumProcesses }
 Holds ID number for each process. More...

Static Public Member Functions

static ProcessID_t getID ()
 returns process's ID number, or if within a virtual function on a shared object, the process which created it (annoying)
static void setID (ProcessID_t id)
 sets the ID during init (be careful you know what you're doing if you call this)

Static Private Attributes

static ProcessID_t ID = ProcessID::NumProcesses
 holds ID number


Member Enumeration Documentation

enum ProcessID::ProcessID_t
 

Holds ID number for each process.

Enumerator:
MainProcess  MainObj process.
MotionProcess  MotoObj process.
SoundProcess  SoundPlay process.
NumProcesses  maximum number of 'friendly' processes -- see class docs

Definition at line 20 of file ProcessID.h.


Member Function Documentation

static ProcessID_t ProcessID::getID  )  [inline, static]
 

returns process's ID number, or if within a virtual function on a shared object, the process which created it (annoying)

Definition at line 30 of file ProcessID.h.

Referenced by SharedQueue< maxsize, maxentries >::clear(), SoundManager::CopyTo(), SharedObject< UPennWalkMC >::createRCRegion(), SoundManager::GetRemainTime(), SoundManager::InitAccess(), SoundManager::initRegion(), SoundManager::LoadBuffer(), SoundManager::LoadFile(), LockScope< num_doors >::LockScope(), SoundManager::PausePlay(), SoundManager::PlayBuffer(), SoundManager::PlayFile(), SoundManager::ReleaseFile(), SharedQueue< maxsize, maxentries >::reserve(), SoundManager::ResumePlay(), SoundManager::SetMode(), and SoundManager::StopPlay().

static void ProcessID::setID ProcessID_t  id  )  [inline, static]
 

sets the ID during init (be careful you know what you're doing if you call this)

Definition at line 31 of file ProcessID.h.


Member Data Documentation

ProcessID::ProcessID_t ProcessID::ID = ProcessID::NumProcesses [static, private]
 

holds ID number

Definition at line 34 of file ProcessID.h.

Referenced by getID(), and setID().


The documentation for this class was generated from the following files:

Tekkotsu v2.4.1
Generated Tue Aug 16 16:35:07 2005 by Doxygen 1.4.4