1SoMFShort(3IV)()                                              SoMFShort(3IV)()
2
3
4

NAME

6       SoMFShort  —  multiple-value field containing any number of short inte‐
7       gers
8

INHERITS FROM

10       SoField > SoMField > SoMFShort
11

SYNOPSIS

13       #include <Inventor/fields/SoMFShort.h>
14
15          Methods from class SoMFShort:
16
17     static SoType       getClassTypeId()
18     virtual void        getTypeId() const
19     short               operator [](int i) const
20     const short *       getValues(int start) const
21     int                 find(short targetValue, SbBool addIfNotFound = FALSE)
22     void                setValues(int start, int num, const short *newValues)
23     void                set1Value(int index, short newValue)
24     short               operator =(short newValue)
25     void                setValue(short newValue)
26     int                 operator ==(const SoMFShort &f) const
27     int                 operator !=(const SoMFShort &f) const
28     short *             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 short (16-bit) inte‐
66       gers.
67
68       SoMFShorts are written to file as one or  more  short  integer  values,
69       represented  as  decimal,  hexadecimal  (beginning  with '0x') or octal
70       (beginning with '0') values. When more than one value is  present,  all
71       of  the values are enclosed in square brackets and separated by commas;
72       for example:
73
74          [ -7, 0xFF, -033 ]
75
76
77

METHODS

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