error_info_base objects, that is, it implements a variable length list of error_info_base objects.
More...
#include <err_info_base_list.hxx>


Public Member Functions | |
| void | add (const error_info_base_list &ei) |
Adds an error_info_base_list by adding all the individual error_info_base objects that are contained in the incoming error_info_base_list. | |
| void | add (const error_info_base *ei) |
Adds an error_info_base object to the list if not already there. | |
| void | clear () |
Empties the list by removing all of the error_info_base objects that it contains. | |
| int | count () const |
Returns a count of how many error_info_base objects are pointed to by the list. | |
| const error_info_base * | first () const |
Returns a pointer to the first undeleted error_info_base and updates the iterator correctly for the next method. | |
| void | init () const |
Initializes the iterator, which is used by the next method, to the beginning of the list. | |
| const error_info_base * | next () const |
Returns a pointer to an error_info_base object in list order. | |
| void | remove (const error_info_base *ei) |
Removes an error_info_base object from the list. | |
error_info_base objects, that is, it implements a variable length list of error_info_base objects.
Role: The class provides a list mechanism for storing a variable length list of error_info_base objects. By default, the constructor of error_info_base_list makes an empty list with no error_info_base objects in it. The class provides the interface that is necessary to add or remove an error_info_base object and to traverse through the list to get the error_info_base objects stored in it.
The correct way of accessing the stored error_info_base objects is to call error_info_base_list::init that rewinds the list and then call error_info_base_list::next to iterate through the list till error_info_base_list::next returns NULL.
This class takes the ownership of all the error_info_base objects that are added to it. So any call to error_info_base_list::add would increment the use count of the error_info_base object that is added, given that the error_info_base object that is being added does not exist in the list already. Similarly, when an error_info_base object that is stored by the error_info_base_list is removed from the list, then error_info_base_list would decrement the use count of the error_info_base object that is being removed. Since the error_info_base_list owns all the error_info_base objects that it stores, it decrements the use count of all the contained error_info_base objects when the error_info_base_list::clear is called or the error_info_base_list is destructed. In general, customers need not worry about the reference counting of error_info_base stored by error_info_base_list, unless they want to explicitly call add on the error_info_base object.
| void error_info_base_list::add | ( | const error_info_base_list & | ei | ) |
Adds an error_info_base_list by adding all the individual error_info_base objects that are contained in the incoming error_info_base_list.
| ei | error_info_base_list to add |
| void error_info_base_list::add | ( | const error_info_base * | ei | ) |
Adds an error_info_base object to the list if not already there.
| ei | error_info_base to add |
| void readonly_error_info_base_list::clear | ( | ) | [inherited] |
Empties the list by removing all of the error_info_base objects that it contains.
| int readonly_error_info_base_list::count | ( | ) | const [inherited] |
Returns a count of how many error_info_base objects are pointed to by the list.
Reimplemented in error_info_list.
| const error_info_base* readonly_error_info_base_list::first | ( | ) | const [inherited] |
Returns a pointer to the first undeleted error_info_base and updates the iterator correctly for the next method.
Reimplemented in error_info_list.
| void readonly_error_info_base_list::init | ( | ) | const [inherited] |
Initializes the iterator, which is used by the next method, to the beginning of the list.
| const error_info_base* readonly_error_info_base_list::next | ( | ) | const [inherited] |
Returns a pointer to an error_info_base object in list order.
Role: It returns the error_info_base most closely following the one that returned by the last call to next, except that if the last returned value was NULL, then the value of next is undefined. In case next is called after init, then it returns the first entry in the list. If the list is empty, it returns NULL.
Usage: Call init once, then next repeatedly until it returns NULL.
Reimplemented in error_info_list.
| void readonly_error_info_base_list::remove | ( | const error_info_base * | ei | ) | [inherited] |