1SoMFEnum(3IV)()                                                SoMFEnum(3IV)()
2
3
4

NAME

6       SoMFEnum  —  multiple-value  field  containing any number of enumerated
7       type values
8

INHERITS FROM

10       SoField > SoMField > SoMFEnum
11

SYNOPSIS

13          Methods from class SoMFEnum:
14
15     void                setValue(const SbName &name)
16     void                set1Value(int index, const SbName &name)
17     static SoType       getClassTypeId()
18     virtual void        getTypeId() const
19     int                 operator [](int i) const
20     const int *         getValues(int start) const
21     int                 find(int targetValue, SbBool addIfNotFound = FALSE)
22     void                setValues(int start, int num, const int *newValues)
23     void                set1Value(int index, int newValue)
24     int                 operator =(int newValue)
25     void                setValue(int newValue)
26     int                 operator ==(const SoMFEnum &f) const
27     int                 operator !=(const SoMFEnum &f) const
28     int *               startEditing()
29     void                finishEditing()
30
31          Methods from class SoMField:
32
33     int                 getNum() const
34     void                setNum(int num)
35     virtual void        deleteValues(int start, int num = -1)
36     virtual void        insertSpace(int start, int num)
37     SbBool              set1(int index, const char *valueString)
38     void                get1(int index, SbString &valueString)
39
40          Methods from class SoField:
41
42     void                setIgnored(SbBool ignore)
43     SbBool              isIgnored() const
44     SbBool              isDefault() const
45     virtual SbBool      isOfType(SoType type) const
46     SbBool              set(const char *valueString)
47     void                get(SbString &valueString)
48     void                touch()
49     SbBool              connectFrom(SoField *fromField)
50     SbBool              connectFrom(SoEngineOutput *fromEngine)
51     void                disconnect()
52     SbBool              isConnected() const
53     SbBool              isConnectedFromField() const
54     SbBool              getConnectedField(SoField *&writingField) const
55     SbBool              isConnectedFromEngine() const
56     SbBool              getConnectedEngine(SoEngineOutput     *&engineOutput)
57                              const
58     void                enableConnection(SbBool flag)
59     SbBool              isConnectionEnabled() const
60     int                 getForwardConnections(SoFieldList &list) const
61     SoFieldContainer *  getContainer() const
62
63

DESCRIPTION

65       A multiple-value field that contains any number of enumerated type val‐
66       ues, stored as ints. Nodes that use this field  class  define  mnemonic
67       names  for  values.  These names should be used when setting or testing
68       the values of the field, even though the values are treated as integers
69       in the methods.
70
71       SoMFEnums  are  written  to  file  as a set of mnemonic enumerated type
72       names. These names differ among uses of  this  field  in  various  node
73       classes. See the reference pages for specific nodes for the names.
74
75       When  more than one value is present, all of the values are enclosed in
76       square brackets and separated by commas.
77

METHODS

79     void                setValue(const SbName &name)
80          Sets this field to contain one and only  one  value,  which  is  the
81          mnemonic name as a string.
82
83     void                set1Value(int index, const SbName &name)
84          Sets  the  index'th  value  to  be  the integer corresponding to the
85          mnemonic name in the given string.
86
87     static SoType       getClassTypeId()
88     virtual void        getTypeId() const
89          Returns the type for this class  or  a  particular  object  of  this
90          class.
91
92     int                 operator [](int i) const
93          Returns  the  i'th  value of the field. Indexing past the end of the
94          field (passing in i greater than getNum()) will return garbage.
95
96     const int *         getValues(int start) const
97          Returns a pointer into the array of values in the field, starting at
98          index  start.  The values are read-only; see the startEditing()/fin‐
99          ishEditing() methods for a way of modifying values in place.
100
101     int                 find(int targetValue, SbBool addIfNotFound = FALSE)
102          Finds the given value in the array and returns  the  index  of  that
103          value  in  the  array. If the value is not found, -1 is returned. If
104          addIfNotFound is set, then targetValue is added to the  end  of  the
105          array (but -1 is still returned).
106
107     void                setValues(int start, int num, const int *newValues)
108          Sets  num values starting at index start to the values in newValues.
109          The array will be automatically be made larger to accomodate the new
110          values, if necessary.
111
112     void                set1Value(int index, int newValue)
113          Sets  the index'th value in the array to newValue. The array will be
114          automatically expanded, if necessary.
115
116     int                 operator =(int newValue)
117     void                setValue(int newValue)
118          Sets the first value in the array to newValue, and deletes the  sec‐
119          ond and subsequent values.
120
121     int                 operator ==(const SoMFEnum &f) const
122     int                 operator !=(const SoMFEnum &f) const
123          Returns TRUE if all of the values of this field equal (do not equal)
124          those of the given field. If the fields are  different  types  FALSE
125          will  always be returned (even if one field is an SoMFFloat with one
126          value of 1.0 and the other is an SoMFInt with  a  value  of  1,  for
127          example).
128
129     int *               startEditing()
130     void                finishEditing()
131          startEditing()  returns a pointer to the internally-maintained array
132          that can be modified. The values in the array may  be  changed,  but
133          values  cannot  be added or removed. It is illegal to call any other
134          editing methods between  startEditing()  and  finishEditing()  (e.g.
135          set1Value(), setValue(), etc).
136
137          Fields,  engines  or sensors connected to this field and sensors are
138          not notified that this field has changed  until  finishEditing()  is
139          called.  Calling finishEditing() always sets the isDefault() flag to
140          FALSE and informs engines and sensors that the field  changed,  even
141          if none of the values actually were changed.
142
143
144
145
146                                                               SoMFEnum(3IV)()
Impressum