Regina Calculation Engine
Offers a hard-coded list of expensive objects that should only be created if they are required. More...
|typedef std::list< const T * >|
|An iterator over this list. |
|Creates a new list structure. |
|Destroys this list and all of the items it contains. |
|iterator||begin () const|
|Returns an iterator pointing to the first item in this list. |
|iterator||end () const|
|Returns an iterator pointing past the end of this list (i.e., just after the last item). |
|void||insert (T *item)|
|Adds the given item to the end of this list. |
|virtual void||initialise ()=0|
|Fills this list with items. |
Offers a hard-coded list of expensive objects that should only be created if they are required.
An example might include a large hard-coded list of triangulations (which are expensive to construct) that will only be required in special scenarios, and not in everyday use of the software.
A static list of this type is relatively cheap to create. The list will not actually be filled (and the expensive objects will not be created) until the first time the list is traversed. Specifically, the list will be filled on the first call to begin().
Lists of this type are designed to be constant. Aside from the initial list population in the initialise() routine and the final list destruction (in which all of the stored objects will also be destroyed), the list and its objects should never be changed. Because of this, the iterator type returns only constant pointers to list objects.
Note that T is the expensive object type, not a pointer type to such an object.
An iterator over this list.
This operates as a forward iterator in a manner consistent with the standard C++ library. It does not allow either the list or its individual objects to be changed.
Reimplemented in regina::NSatBlockStarterSet.
Creates a new list structure.
The list will not be filled with items; this does not happen until the first time that begin() is called.
Destroys this list and all of the items it contains.
Returns an iterator pointing to the first item in this list.
If the list has not yet been filled with items, this will take place now. Thus the first call to begin() will be expensive, but subsequent calls will be extremely cheap.
Returns an iterator pointing past the end of this list (i.e., just after the last item).
|virtual void regina::NListOnCall< T >::initialise||(||)||
|void regina::NListOnCall< T >::insert||(||T *||item||)||
Adds the given item to the end of this list.
This routine should only ever be called from within a subclass implementation of initialise().
The given item will be owned by this list, and will be destroyed when this list is destroyed.
|item||the new item to insert.|