rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Prototypes Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvGroupNode Class Reference

Base class for objects held in a group. More...

#include <ilviews/protos/group.h>

Inheritance diagram for IlvGroupNode:
IlvAccessible IlvGraphicNode IlvSubGroupNode

List of all members.

Public Member Functions

 IlvGroupNode (const char *name=0)
 Creates a new group node with the provided name.
virtual IlvGroupNodecopy () const =0
 Returns a copy of the group node.
IlvGroupgetGroup () const
 Returns the group containing this group node, or 0 if the node has not yet been added to a group.
virtual const char * getName () const
 Returns the name of the group node.
const char * getPath ()
 Returns the fully qualified path name of the node with respect to its top level group.
virtual IlvGroupgetSubGroup () const
 Returns the subgroup contained in this node if the node contains an IlvSubGroup. Otherwise, it returns 0.
virtual void setName (const char *name)
 Sets the name of the node.
virtual void write (IlvGroupOutputFile &f) const
 Writes the group node to an IlvGroupOutputFile.

Static Public Member Functions

static IlvGroupNoderead (IlvGroupInputFile &f, IlvDisplay *display)
 Reads a group node from an IlvGroupInputFile.

Friends

class IlvGroup

Detailed Description

Base class for objects held in a group.

Library: ilvproto

IlvGroupNode is the base class for group nodes. It is an abstract base class and must be subclassed to include a particular kind of object in groups.

See also:
IlvGroupAccessor, IlvGroupFile.

Constructor & Destructor Documentation

IlvGroupNode::IlvGroupNode ( const char *  name = 0  ) 

Creates a new group node with the provided name.

Parameters:
name If non-null, a copy of the string is stored by the group node. Otherwise, the group node can use a subclass-dependent method to determine its name.

Member Function Documentation

virtual IlvGroupNode* IlvGroupNode::copy (  )  const [pure virtual]

Returns a copy of the group node.

Should be implemented by subclasses. Whether the data they hold is shared is left to the implementation.

Returns:
A copy of the group node.

Implemented in IlvSubGroupNode, and IlvGraphicNode.

virtual const char* IlvGroupNode::getName (  )  const [virtual]

Returns the name of the group node.

If a name was explicitly specified when the node was created, or if the setName method was called, this name is returned. Otherwise, a subclass-dependent method is used to find a default node name.

Returns:
Name of the group node.

Implements IlvAccessible.

Reimplemented in IlvSubGroupNode, and IlvGraphicNode.

const char* IlvGroupNode::getPath (  ) 

Returns the fully qualified path name of the node with respect to its top level group.

Returns:
A path containing dot characters if there are several levels of groups, and can be passed to the IlvGroup::findNode method of the top level group to get the node. The string is allocated in a temporary buffer. Thus, it may lose its content between successive invocations of the getPath method or other methods that use the same buffer. Hence, if the result is to be used in a persistent way, it should be copied.
See also:
IlvAllocString.
static IlvGroupNode* IlvGroupNode::read ( IlvGroupInputFile f,
IlvDisplay display 
) [static]

Reads a group node from an IlvGroupInputFile.

Parameters:
f Group input file allowing the information describing the group to be read.
display Display used to initialize graphic objects contained in the group node.
Returns:
A group node if read was successful, and 0 otherwise.

Reimplemented in IlvSubGroupNode, and IlvGraphicNode.

virtual void IlvGroupNode::setName ( const char *  name  )  [virtual]

Sets the name of the node.

A copy of name is stored in the node. This method can be overridden.

Reimplemented in IlvGraphicNode.

virtual void IlvGroupNode::write ( IlvGroupOutputFile f  )  const [virtual]

Writes the group node to an IlvGroupOutputFile.

Must be overridden by subclasses to save specific information.

Parameters:
f Group output file holding reference information on the group being read.

Reimplemented in IlvSubGroupNode, and IlvGraphicNode.


© 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.