• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

kalzium

Avogadro::Node

Avogadro::Node Class Reference

#include <skeletontree.h>

Inheritance diagram for Avogadro::Node:

Inheritance graph
[legend]

List of all members.


Detailed Description

A node of a tree used to represent a molecule in a skeletal-like structure.

Author:
Shahzad Ali, Ross Braithwaite, James Bunt
This class represents a node in a particular tree structure. It holds an Atom and pointers to any number of child nodes.

Definition at line 47 of file skeletontree.h.


Public Member Functions

void addNode (Node *node)
Atom * atom ()
bool containsAtom (Atom *atom)
bool isLeaf ()
 Node (Atom *atom)
QList< Node * > * nodes ()
void removeNode (Node *node)
virtual ~Node ()

Protected Attributes

Atom * m_atom
QList< Node * > m_nodes

Constructor & Destructor Documentation

Avogadro::Node::Node ( Atom *  atom  ) 

Constructor.

Constructs a new Node.

Parameters:
atom The Atom contained within this new Node.

Definition at line 39 of file skeletontree.cpp.

Avogadro::Node::~Node (  )  [virtual]

Deconstructor.

Definition at line 46 of file skeletontree.cpp.


Member Function Documentation

void Avogadro::Node::addNode ( Node *  node  ) 

Adds the given Node as a child of this Node.

Parameters:
node The Node being made a child of this Node.

Definition at line 94 of file skeletontree.cpp.

Atom * Avogadro::Node::atom (  ) 

Retrieves a pointer to the Atom stored in this Node.

Returns:
A pointer to the Atom stored in this Node.

Definition at line 50 of file skeletontree.cpp.

bool Avogadro::Node::containsAtom ( Atom *  atom  ) 

Determines whether or not this Node, or any of the Nodes in the (sub)tree that this Node is the root of, contains the given Atom.

Parameters:
atom The Atom being searched for in this Node's (sub)tree.
Returns:
True if the Atom was found in the (sub)tree, false otherwise.

Definition at line 71 of file skeletontree.cpp.

bool Avogadro::Node::isLeaf (  ) 

Determines whether or not this Node is a leaf in the SkeletonTree.

Returns:
True if this Node is a leaf in the tree, false otherwise.

Definition at line 64 of file skeletontree.cpp.

QList< Node * > * Avogadro::Node::nodes (  ) 

Gets all of this Node's children.

Returns:
A QList of pointers to all the children Nodes of this Node.

Definition at line 57 of file skeletontree.cpp.

void Avogadro::Node::removeNode ( Node *  node  ) 

Removes the given Node from this Node's children.

Parameters:
node The Node being removed from this Node's children.

Definition at line 101 of file skeletontree.cpp.


Member Data Documentation

Atom* Avogadro::Node::m_atom [protected]

Definition at line 52 of file skeletontree.h.

QList<Node*> Avogadro::Node::m_nodes [protected]

Definition at line 53 of file skeletontree.h.


The documentation for this class was generated from the following files:
  • skeletontree.h
  • skeletontree.cpp

kalzium

Skip menu "kalzium"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal