Scroll to navigation

SoSFEnum(3IV)() SoSFEnum(3IV)()

NAME

SoSFEnum — field containing an enumerated value

INHERITS FROM

SoField > SoSField > SoSFEnum

SYNOPSIS


Methods from class SoSFEnum:


void setValue(const SbName &name)

static SoType getClassTypeId()

virtual void getTypeId() const

int getValue() const

int operator =(int newValue)

void setValue(int newValue)

int operator ==(const SoSFEnum &f) const

int operator !=(const SoSFEnum &f) const


Methods from class SoField:


void setIgnored(SbBool ignore)

SbBool isIgnored() const

SbBool isDefault() const

virtual SbBool isOfType(SoType type) const

SbBool set(const char *valueString)

void get(SbString &valueString)

void touch()

SbBool connectFrom(SoField *fromField)

SbBool connectFrom(SoEngineOutput *fromEngine)

void disconnect()

SbBool isConnected() const

SbBool isConnectedFromField() const

SbBool getConnectedField(SoField *&writingField) const

SbBool isConnectedFromEngine() const

SbBool getConnectedEngine(SoEngineOutput *&engineOutput) const

void enableConnection(SbBool flag)

SbBool isConnectionEnabled() const

int getForwardConnections(SoFieldList &list) const

SoFieldContainer * getContainer() const

DESCRIPTION

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 man pages for specific nodes or engines for the names (e.g. SoDrawStyle).

METHODS


void setValue(const SbName &name)

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



static SoType getClassTypeId()

virtual void getTypeId() const

Returns the type for this class or a particular object of this class.



int getValue() const

Returns this field's value.



int operator =(int newValue)

void setValue(int newValue)

Sets this field to newValue.



int operator ==(const SoSFEnum &f) const

int operator !=(const SoSFEnum &f) const

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


SEE ALSO

SoField, SoSField, SoMFEnum