Coin Logo http://www.sim.no
http://www.coin3d.org

Public Member Functions | Static Public Member Functions | Public Attributes | Friends

SoSelectOne Class Reference

The SoSelectOne class is used to select one value from a set of values.The output field will be the index'th value of the input multivalue field. More...

#include <Inventor/engines/SoSelectOne.h>

Inheritance diagram for SoSelectOne:
SoEngine SoFieldContainer SoBase

List of all members.

Public Member Functions

 SoSelectOne (SoType inputtype)

Static Public Member Functions

static void initClass (void)

Public Attributes

SoSFInt32 index
SoMFieldinput
SoEngineOutputoutput

Friends

class dummy

Detailed Description

The SoSelectOne class is used to select one value from a set of values.

The output field will be the index'th value of the input multivalue field.

Note that this engine's output field deviates a little from the "standard" output mechanism of the majority of engine classes: the SoSelectOne::output is not a permanent SoEngineOutput instance, but a pointer to a SoEngineOutput instance. The reason for this is that it is necessary to allocate the output field dynamically to make it match what the SoSelectOne::input is connected to since the type of the SoSelectOne::output always should be the same as the type of the SoSelectOne::input.

The file format for this field is a bit special. Note the leading type specification, which is not necessary for most other field types:

  SelectOne {
    type <multivaluefieldtype>
    [...fields...]
  }
  

Constructor & Destructor Documentation

SoSelectOne::SoSelectOne ( SoType  inputtype)

Constructor. Sets the type of the input field. The input field must be of type SoMField.

References SoType::badType(), SoType::getName(), SbName::getString(), input, output, SoDebugError::post(), and SoSelectOne().

Referenced by SoSelectOne().


Member Function Documentation

void SoSelectOne::initClass ( void  ) [static]

Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.

Reimplemented from SoEngine.


Member Data Documentation

Index of the value from the input field which will be put on the output.

The multivalue input field which we will select a single value from for our output.

Referenced by SoSelectOne().

(SoSField) This is the singlevalue field output containing the index'th value of SoSelectOne::input.

The type of the field will of course match the type of the input field, i.e. if SoSelectOne::input is an SoMFFloat, SoSelectOne::output will be an SoSFFloat etc.

Referenced by SoSelectOne().


The documentation for this class was generated from the following files:

Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.

Generated on Mon Feb 28 2011 10:12:19 for Coin by Doxygen. 1.7.3