Avogadro
1.1.0
|
List mapping primitives and unique ids. More...
#include <idlist.h>
Public Member Functions | |
IDList () | |
IDList (const IDList &other) | |
IDList (const QList< Primitive * > &other) | |
IDList (const PrimitiveList &other) | |
IDList & | operator= (const IDList &other) |
IDList & | operator= (const QList< Primitive * > &other) |
IDList & | operator= (const PrimitiveList &other) |
~IDList () | |
QList< unsigned long > | subList (Primitive::Type type) const |
bool | contains (const Primitive *p) const |
void | append (Primitive *p) |
void | removeAll (Primitive *p) |
int | size () const |
bool | isEmpty () const |
int | count (Primitive::Type type) const |
int | count () const |
void | clear () |
List mapping primitives and unique ids.
The IDList class is designed to hold a set of Primitive objects and keep them organized by type allowing groups of them to be retrieved in constant time.
Constructor(s)
References Avogadro::Primitive::LastType.
Deconstructor
void Avogadro::IDList::append | ( | Primitive * | p | ) |
void Avogadro::IDList::clear | ( | ) |
Removes every primitive from the queue.
bool Avogadro::IDList::contains | ( | const Primitive * | p | ) | const |
p | the primitive to check if it is in any list |
References Avogadro::Primitive::id().
int Avogadro::IDList::count | ( | Primitive::Type | type | ) | const |
type | the type of primitives we're interested in |
References Avogadro::Primitive::LastType.
int Avogadro::IDList::count | ( | ) | const |
bool Avogadro::IDList::isEmpty | ( | ) | const |
References size().
void Avogadro::IDList::removeAll | ( | Primitive * | p | ) |
Remove a primitive from the queue. If the parameter does not exist in the queue, nothing is removed.
p | primitive to remove |
References Avogadro::Primitive::id().
int Avogadro::IDList::size | ( | ) | const |
QList< unsigned long > Avogadro::IDList::subList | ( | Primitive::Type | type | ) | const |
Returns a list of primitives for a given type.
type | the type of primitives to retrieve, one of Primitive::Type |
References Avogadro::Primitive::LastType.