SoSFEnum Class Reference
[Fields]

Field containing an enumerated value. More...

#include <Inventor/fields/SoSFEnum.h>

Inheritance diagram for SoSFEnum:
SoSField SoField SoTypedObject SoSFBitMask

List of all members.

Public Member Functions

virtual SoType getTypeId () const
const SoSFEnumoperator= (const SoSFEnum &f)
 SoSFEnum ()
virtual ~SoSFEnum ()
int getValue () const
void setValue (int newValue)
int operator= (int newValue)
int operator== (const SoSFEnum &f) const
int operator!= (const SoSFEnum &f) const
virtual size_t getValueSize () const
void setValue (const SbName &name)
void getEnums (int &num, int *&vals, SbName *&names)

Static Public Member Functions

static SoType getClassTypeId ()

Detailed Description

Field containing an enumerated value.

A single-value field that contains an enumerated type value, stored as an integer. Nodes that use this field class define mnemonic names for the values. These names should be used when setting or testing the values of the field, even though the values are treated as integers in the methods.

SoSFEnums are written to file as a mnemonic enumerated type name. The name differs among uses of this field in various node or engine classes. See the reference pages for specific nodes or engines for the names (e.g. SoDrawStyle).

SEE ALSO

SoField, SoSField, SoMFEnum


Constructor & Destructor Documentation

SoSFEnum::SoSFEnum (  ) 

Default constructor.

virtual SoSFEnum::~SoSFEnum (  )  [virtual]

Destructor.


Member Function Documentation

static SoType SoSFEnum::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoSField.

Reimplemented in SoSFBitMask.

void SoSFEnum::getEnums ( int &  num,
int *&  vals,
SbName *&  names 
)

Gets value/name correspondances.

virtual SoType SoSFEnum::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Implements SoTypedObject.

Reimplemented in SoSFBitMask.

int SoSFEnum::getValue (  )  const [inline]

Returns this field's value.

virtual size_t SoSFEnum::getValueSize (  )  const [inline, virtual]

Get size of the value.

Reimplemented from SoField.

int SoSFEnum::operator!= ( const SoSFEnum f  )  const [inline]

Returns FALSE if otherField is of the same type and has the same value as this field.

Reimplemented from SoField.

int SoSFEnum::operator= ( int  newValue  )  [inline]

Sets this field to newValue.

Reimplemented in SoSFBitMask.

const SoSFEnum& SoSFEnum::operator= ( const SoSFEnum f  ) 

Copy from another field of same type.

Reimplemented in SoSFBitMask.

int SoSFEnum::operator== ( const SoSFEnum f  )  const

Returns TRUE if otherField is of the same type and has the same value as this field.

Reimplemented from SoField.

void SoSFEnum::setValue ( const SbName name  ) 

Sets this field to contain the given mnemonic name, passed in as a name or string.

void SoSFEnum::setValue ( int  newValue  ) 

Sets this field to newValue.


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

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/