rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gantt Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvGanttNode Class Reference

Gantt chart node class. More...

#include <ilviews/gantt/gantt.h>

Inheritance diagram for IlvGanttNode:
IlvGanttAbstractObject

List of all members.

Public Member Functions

 IlvGanttNode (const char *name, IlBoolean copy, IlUInt...)
 Constructor.
 IlvGanttNode (const char *name, IlBoolean copy=IlTrue, IlBoolean asBreak=IlFalse)
 Constructor.
virtual ~IlvGanttNode ()
 Destructor.
void addSubNode (IlvGanttSubNode *subnode)
 Adds a subnode.
IlUShort getCardinal () const
 Returns the total number of subnodes stored in the node.
IlvGanttNodeDrawMode getDrawMode () const
 Gets the presentation mode.
IlvGraphicgetSubGraphicModel () const
 Returns the subnode graphic model that the user may have set.
IlvGanttSubNodegetSubNode (IlUShort index) const
 Gets a subnode.
IlvGanttSubNode *const * getSubNodes (IlUShort &count) const
 Gets the subnodes stored in the node.
IlBoolean isBreak () const
 Indicates whether the node is a break node.
void removeSubNode (IlUShort index)
 Removes a subnode.
void setDrawMode (IlvGanttNodeDrawMode mode)
 Sets the presentation mode.
void setSubGraphicModel (IlvGraphic *graphic, IlBoolean destroyOld=IlTrue)
 Sets the subnode graphic model for this Gantt node to graphic.

Detailed Description

Gantt chart node class.

Library: ilvgantt

An IlvGanttNode object describes a Gantt activity. It handles a set of IlvGanttSubNode objects. An IlvGanttNode is used to handle subnode activities. It can also be used to handle breaks. A node that handles breaks is called a break node. Subnodes handled by a break node are called break subnodes.

To create a break node, call the IlvGanttNode constructor, setting the asBreak parameter to IlTrue.

Subnodes added to a break node should be break subnodes.

See also:
IlvGanttChart, IlvGanttAbstractObject, IlvGanttSubNode.

Constructor & Destructor Documentation

IlvGanttNode::IlvGanttNode ( const char *  name,
IlBoolean  copy = IlTrue,
IlBoolean  asBreak = IlFalse 
)

Constructor.

This constructor initializes an empty IlvGanttNode object, which is a skeleton. You can call member functions such as addSubNode to add IlvGanttSubNode objects to the IlvGanttNode object.

Parameters:
name The name of the Gantt node.
copy Specifies whether the object stores a copy of name or the string name itself.
asBreak Specifies whether the new node is a break node.
IlvGanttNode::IlvGanttNode ( const char *  name,
IlBoolean  copy,
IlUInt...   
)

Constructor.

This constructor initializes an IlvGanttNode object on the basis of the count parameter. IlvGanttSubNode objects are provided as parameters.

Parameters:
name The name of the Gantt node.
copy Specifies whether the object stores a copy of name or the string name itself.
count The number of subnodes in the node.
virtual IlvGanttNode::~IlvGanttNode (  )  [virtual]

Destructor.

The destructor deletes the subnode graphic model that the user may have set, and the string name stored in this Gantt node. It also calls the destructor of the subnodes stored in the Gantt node.


Member Function Documentation

void IlvGanttNode::addSubNode ( IlvGanttSubNode subnode  ) 

Adds a subnode.

Adds the subnode subnode at the end of the subnode list.

Parameters:
subnode The subnode to add.
IlUShort IlvGanttNode::getCardinal (  )  const

Returns the total number of subnodes stored in the node.

Returns:
The total number of subnodes.
IlvGanttNodeDrawMode IlvGanttNode::getDrawMode (  )  const

Gets the presentation mode.

Returns the presentation mode for this node, which can be one of the following values indicating the left and right positions of the graphic object representing the node:

  • IlvGanttNodeDrawMin - Draws the node between startMin and endMin.
  • IlvGanttNodeDrawMax - Draws the node between startMax and endMax.
  • IlvGanttNodeDrawComplete - Draws the node between startMin and endMax.
  • IlvGanttNodeDrawDefault - Draws the node using the mode set with the setDrawMode member function.
Returns:
The presentation mode for this node.
IlvGraphic* IlvGanttNode::getSubGraphicModel (  )  const

Returns the subnode graphic model that the user may have set.

Returns:
The subnode graphic model.
IlvGanttSubNode* IlvGanttNode::getSubNode ( IlUShort  index  )  const

Gets a subnode.

Returns the index th subnode. The first subnode has an index of 0.

Parameters:
index The position of the subnode.
Returns:
The index th subnode.
IlvGanttSubNode* const* IlvGanttNode::getSubNodes ( IlUShort count  )  const

Gets the subnodes stored in the node.

The returned array must not be deleted by the programmer, as it is internally maintained.

Parameters:
count Set to the number of subnodes in the array.
Returns:
An array of pointers to the subnodes stored in the node.
IlBoolean IlvGanttNode::isBreak (  )  const

Indicates whether the node is a break node.

Returns:
IlTrue if the node is a break node.
void IlvGanttNode::removeSubNode ( IlUShort  index  ) 

Removes a subnode.

Removes the index th subnode from the subnode list.

Parameters:
index The position of the subnode to remove.
void IlvGanttNode::setDrawMode ( IlvGanttNodeDrawMode  mode  ) 

Sets the presentation mode.

Sets the presentation mode for this node to the value given by the mode parameter. The mode parameter can be set to one of four values indicating the left and right positions of the graphic object representing the node:

  • IlvGanttNodeDrawMin - Draws the node between startMin and endMin.
  • IlvGanttNodeDrawMax - Draws the node between startMax and endMax.
  • IlvGanttNodeDrawComplete - Draws the node between startMin and endMax.
  • IlvGanttNodeDrawDefault - Draws the node using the mode set with the setDrawMode member function.
Parameters:
mode The presentation mode.
void IlvGanttNode::setSubGraphicModel ( IlvGraphic graphic,
IlBoolean  destroyOld = IlTrue 
)

Sets the subnode graphic model for this Gantt node to graphic.

This model is used to draw the subnodes of this node. You can specify IlFalse as the value of the destroyOld parameter to not call delete for the old graphic model.

Parameters:
graphic The IlvGraphic that will become the subnode graphic model.
destroyOld Indicates whether the old graphic model is destroyed.
 All Classes Files Functions Variables Typedefs Enumerations Friends

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.