proland::LazyNode Class Reference
[graph]

A Node is described by it's XY coordinates. More...

#include <LazyNode.h>

Inheritance diagram for proland::LazyNode:
proland::Node

List of all members.

Public Member Functions

 LazyNode (Graph *owner, NodeId id, double x, double y)
 Creates a new Node.
virtual ~LazyNode ()
 Deletes this LazyNode.
virtual NodeId getId () const
 Returns this Node's Id.
virtual void addCurve (CurveId c)
 Adds a Curve to the Curves list.
virtual void removeCurve (CurveId c)
 Removes a Curve from the Curves list.

Protected Member Functions

virtual void doRelease ()
 Calls the LazyGraph::releaseNode() method.

Private Member Functions

void loadCurve (CurveId c)
 Adds a Curve to the Curves list, but doesn't change the owner's cache.

Private Attributes

NodeId id
 This node's Id.

Detailed Description

A Node is described by it's XY coordinates.

It is used to represent start and end points of curves, intersections... Several Curves can share the same Node. This is the 'Lazy' version of Nodes. Allows real-time loading for LazyGraphs. Can be deleted and reloaded at any time depending on the needs.

Author:
Antoine Begault

Constructor & Destructor Documentation

proland::LazyNode::LazyNode ( Graph owner,
NodeId  id,
double  x,
double  y 
)

Creates a new Node.

Parameters:
owner the graph containing this node.
id this Node's id (determined by LazyGraph).
x this node's X coord.
y this node's Y coord.
virtual proland::LazyNode::~LazyNode (  )  [virtual]

Deletes this LazyNode.


Member Function Documentation

virtual void proland::LazyNode::addCurve ( CurveId  c  )  [virtual]

Adds a Curve to the Curves list.

Parameters:
c the id of the Curve to add.

Reimplemented from proland::Node.

virtual void proland::LazyNode::doRelease (  )  [protected, virtual]

Calls the LazyGraph::releaseNode() method.

See Object::doRelease().

virtual NodeId proland::LazyNode::getId (  )  const [virtual]

Returns this Node's Id.

For LazyNode, a NodeId is a unique number, assigned by the owner Graph, (in opposition to Nodes, for which Ids are a direct reference to the Node).

Reimplemented from proland::Node.

void proland::LazyNode::loadCurve ( CurveId  c  )  [private]

Adds a Curve to the Curves list, but doesn't change the owner's cache.

Parameters:
c the id of the Curve to add.
virtual void proland::LazyNode::removeCurve ( CurveId  c  )  [virtual]

Removes a Curve from the Curves list.

Parameters:
c the id of the Curve to remove.

Reimplemented from proland::Node.


Member Data Documentation

This node's Id.


Generated on Sat May 12 09:42:48 2012 for proland by  doxygen 1.6.1