Avogadro  1.1.0
Classes | Public Member Functions
Avogadro::PrimitiveList Class Reference

Class which set of Primitives. More...

#include <primitivelist.h>

List of all members.

Classes

class  const_iterator

Public Member Functions

 PrimitiveList ()
 PrimitiveList (const PrimitiveList &other)
 PrimitiveList (const QList< Primitive * > &other)
PrimitiveListoperator= (const PrimitiveList &other)
PrimitiveListoperator= (const QList< Primitive * > &other)
 ~PrimitiveList ()
QList< Primitive * > subList (Primitive::Type type) const
QList< Primitive * > list () 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 ()
const_iterator begin () const
const_iterator end () const

Detailed Description

Class which set of Primitives.

Author:
Donald Ephraim Curtis

The PrimitiveList 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 & Destructor Documentation

Constructor(s)

References Avogadro::Primitive::LastType.

Deconstructor


Member Function Documentation

Removes every primitive from the queue.

Referenced by Avogadro::Engine::clearPrimitives(), and Avogadro::Engine::setMolecule().

bool Avogadro::PrimitiveList::contains ( const Primitive p) const
Parameters:
pthe primitive to check if it is in any list
Returns:
true or false depending on whether p is in this list

Referenced by Avogadro::Engine::addPrimitive().

Parameters:
typethe type of primitives we're interested in
Returns:
the number of primitives for the given type

References Avogadro::Primitive::LastType.

effectively the same as size()

See also:
size()

References size().

Returns:
!size()

References size().

Returns a list of all primitives of all types.

Returns:
a QList of pointers to Primitive objects

Remove a primitive from the queue. If the parameter does not exist in the queue, nothing is removed.

Parameters:
pprimitive to remove

Referenced by Avogadro::Engine::removePrimitive().

Returns:
The total number of primitives in this queue.

Referenced by count(), and isEmpty().

Returns a list of primitives for a given type.

Parameters:
typethe type of primitives to retrieve, one of Primitive::Type
Returns:
a QList of pointers to Primitive objects

References Avogadro::Primitive::LastType.

Referenced by Avogadro::Molecule::copyAtomsAndBonds(), and Avogadro::Engine::setPrimitives().


The documentation for this class was generated from the following files: