The ISwitch graph node interface. More...

#include "murl_graph_i_switch.h"

Inheritance diagram for Murl::Graph::ISwitch:

Public Member Functions

virtual INodeGetNodeInterface ()=0
 Get the mutable Graph::INode interface. More...
 
virtual const INodeGetNodeInterface () const =0
 Get the constant Graph::INode interface. More...
 
virtual Bool SetSelectedChild (const String &id)=0
 Set the currently active child node. More...
 
virtual INodeGetSelectedChild () const =0
 Get the currently active child node. More...
 
virtual Bool IsChildSelected (const Char *id) const =0
 Check if a child with a given node ID is currently active. More...
 
virtual Bool IsChildSelected (const String &id) const =0
 Check if a child with a given node ID is currently active. More...
 
- Public Member Functions inherited from Murl::Graph::IIndexed
virtual Bool SetIndex (SInt32 index)=0
 Set the current index. More...
 
virtual SInt32 GetIndex () const =0
 Get the current index. More...
 
virtual SInt32 GetFirstIndex () const =0
 Get the lowest valid index. More...
 
virtual UInt32 GetNumberOfIndices () const =0
 Get the total number of valid indices. More...
 

Detailed Description

The ISwitch graph node interface.

Graph::ISwitch nodes provide an easy and efficient way to select at most one child among a given number of children to be active and visible at the same time.

The currently active child can be either selected via the Graph::IIndexed base interface by specifying that child's index, or by calling SetSelectedChild() with a given child node ID. When doing so, any previously active other child gets deactivated.

Member Function Documentation

◆ GetNodeInterface() [1/2]

virtual INode* Murl::Graph::ISwitch::GetNodeInterface ( )
pure virtual

Get the mutable Graph::INode interface.

This method returns a mutable pointer to the node's Graph::INode interface, to be able to query or modify common node properties such as active state, visibility or ID.

Returns
The mutable Graph::INode interface, or null if not available

◆ GetNodeInterface() [2/2]

virtual const INode* Murl::Graph::ISwitch::GetNodeInterface ( ) const
pure virtual

Get the constant Graph::INode interface.

This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.

Returns
The constant Graph::INode interface, or null if not available

◆ SetSelectedChild()

virtual Bool Murl::Graph::ISwitch::SetSelectedChild ( const String id)
pure virtual

Set the currently active child node.

Parameters
idThe node ID of the child to activate.
Returns
true if successful.

◆ GetSelectedChild()

virtual INode* Murl::Graph::ISwitch::GetSelectedChild ( ) const
pure virtual

Get the currently active child node.

Returns
The currently active node, or a null pointer if none is active.

◆ IsChildSelected() [1/2]

virtual Bool Murl::Graph::ISwitch::IsChildSelected ( const Char id) const
pure virtual

Check if a child with a given node ID is currently active.

Parameters
idThe child node ID to check.
Returns
true if the child with the given ID is active.

◆ IsChildSelected() [2/2]

virtual Bool Murl::Graph::ISwitch::IsChildSelected ( const String id) const
pure virtual

Check if a child with a given node ID is currently active.

Parameters
idThe child node ID to check.
Returns
true if the child with the given ID is active.

The documentation for this interface was generated from the following file:
  • murl_graph_i_switch.h


Copyright © 2011-2018 Spraylight GmbH.