Purpose:
|
Implements a variable length list of delta states.
|
|
Derivation:
|
DELTA_STATE_LIST : -
|
|
Filename:
|
kern/kernel/kerndata/bulletin/bulletin.hxx
|
|
Description:
|
This class provides a constructor (which creates an empty list), a destructor, a function to add an delta state (only if not already there), a function to look up a delta state by pointer value, and a function to count the number of delta states listed. Also provides an overloaded "[ ]" operator for access by position. This was created using the
LIST macro.
|
|
|
The functions are all essentially dummy; just indirecting through the header pointer. This is done in order to insulate the application programs completely from the implementation of lists.
|
|
|
The current implementation uses hashing so that look up is fast provided lists are not very long; it is also efficient for very short lists and for repeated lookups of the same delta state.
|
|
|
When a group of similar arguments must be returned, and the number of arguments is not known in advance, the system returns the arguments as an
DELTA_STATE_LIST. The number of members of an
DELTA_STATE_LIST can be found using the member function
count, and individual members can be accessed with the subscript operator
[ ].
|
|
|
The
DELTA_STATE_LIST class is a variable length associative array of
DELTA_STATE pointers. When using the subscript operator, a cast is required to change the
DELTA_STATE pointer into the correct type. Many
ACIS internal algorithms use
DELTA_STATE_LIST including the part copy, save, and restore algorithms.
DELTA_STATE_LIST is also useful in
ACIS components and applications.
|
|
Limitations:
|
NT, UNIX platforms only.
|
|
References:
|
by KERN
|
DELTA_STATE, HISTORY_STREAM
|
|
Constructor:
|
public: DELTA_STATE_LIST::DELTA_STATE_LIST
();
|
|
|
C++ constructor, creating a
DELTA_STATE_LIST.
|
|
|
|
|
Destructor:
|
public: DELTA_STATE_LIST::~DELTA_STATE_LIST
();
|
|
|
C++ destructor, deleting a
DELTA_STATE_LIST.
|
|
|
|
Methods:
|
public: int DELTA_STATE_LIST::add
(
|
|
|
DELTA_STATE* e
|
// state to add
|
|
|
);
|
|
|
Add a delta state to the list and returns its index number.
|
|
|
|
|
|
|
public: void DELTA_STATE_LIST::clear
();
|
|
|
Empties a list for construction of a new one.
|
|
|
|
|
|
|
public: int DELTA_STATE_LIST::count
() const;
|
|
|
Returns the number of delta states in a given list.
|
|
|
|
|
|
|
public: void DELTA_STATE_LIST::init
() const;
|
|
|
Initializes the correct position in the list for
next.
|
|
|
|
|
|
|
public: int
|
|
|
DELTA_STATE_LIST::iteration_count () const;
|
|
|
Counts how many delta states there are in the list not including deleted entries. Uses the iterator.
|
|
|
|
|
|
|
public: int DELTA_STATE_LIST::lookup
(
|
|
|
DELTA_STATE const* ce
|
// delta state
|
|
|
) const;
|
|
|
Looks up a delta state in the debug list.
|
|
|
|
|
|
|
public: DELTA_STATE* DELTA_STATE_LIST::next
() const;
|
|
|
Returns the next undeleted entry.
|
|
|
|
|
|
|
public: DELTA_STATE* DELTA_STATE_LIST::operator[]
(
|
|
|
int i
|
// index number of item
|
|
|
) const;
|
|
|
Returns a given item from a list.
|
|
|
|
|
|
|
public: int DELTA_STATE_LIST::remove
(
|
|
|
DELTA_STATE const* ce
|
// state to remove
|
|
|
);
|
|
|
Deletes a delta state from the list; however, it does not free space.
|