#include <nurbsGL.h>
Inheritance diagram for PLib::ObjectRefListGL:
Public Member Functions | |
~ObjectRefListGL () | |
void | add (ObjectGL *obj) |
ObjectGL * | remove (ObjectGL *obj) |
void | refList (const ObjectListGL *list, int addOnce=1) |
PLib::ObjectRefListGL::~ObjectRefListGL | ( | ) |
The destructor.
void PLib::ObjectRefListGL::add | ( | ObjectGL * | obj | ) | [inline] |
adds an element to the list
Adds an element to the list.
obj | the element to add |
Reimplemented from PLib::ObjectListGL.
finds an element and remove it from the list
Finds an element and delete it from the list. The element will not be deleted. This is up to the calling function. Since this is a reference list, we check if the element is referencing obj. If it is, we remove it from the list. If not, we check if obj is one of the element from the list and if so we remove it.
obj | the element to remove |
Reimplemented from PLib::ObjectListGL.
void PLib::ObjectRefListGL::refList | ( | const ObjectListGL * | list, | |
int | addOnce = 1 | |||
) |
reference all the elements from a list
Reference all the elements from a list. If the addOnce variable is set, it will reference the elements of the list only once. So if the reference list was already referencing one of the elements, it will not be added again. If the addOnce variable is not set, the resulting list might reference an element more than once.
list | the list to reference |