file name: suptemp.hpp
classification: simulation
contents: class CSupervisorList
derived from: class ACNodeList
use: a list class for storing pointers to objects of type CSupervisor
with the key <SINT32 nodeID, int area>
Note: the class was generated from listtemp.hpp.
Note: since the class is not directly inherited from ACObjectList, all references to ACObjectList were replaced with ACNodeList. This does not change the functionality of the class, so it is assumed to be correct.
Functions Delete() and DeleteAll() were modified: since the supervisors are processes, some things have to be done before they can be deleted. So the delete object statement in the functions was replaced with a call to a new function:
void DeleteProcess
(ACProcess* object): the functions calls Cancel() and terminate()
for the process. If C++SIM uses resource control, processes must not be
deleted; instead, they are unreferenced calling Resource::unref().
If resource control is used, NO_RESOURCE is defined. So the function checks
if NO_RESOURCE is defined, and if it is, it just calls Resource::unref()
with the object. Otherwise, it deletes the object. The function was not
tested, but since it does not produce any errors both in DOS and in Linux,
it is assumed to be correct.
global items used: