1SoMFBitMask(3IV)()                                          SoMFBitMask(3IV)()
2
3
4

NAME

6       SoMFBitMask  —  multiple-value  field containing any number of masks of
7       bit flags
8

INHERITS FROM

10       SoField > SoMField > SoMFEnum > SoMFBitMask
11

SYNOPSIS

13       #include <Inventor/fields/SoMFBitMask.h>
14
15          Methods from class SoMFBitMask:
16
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 SoMFBitMask &f) const
27     int                 operator !=(const SoMFBitMask &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 masks of bit flags,
66       stored as ints. Nodes or engines  that  use  this  field  class  define
67       mnemonic  names for the bit flags. These names should be used when set‐
68       ting or testing the values of the field, even  though  the  values  are
69       treated as integers in the methods.
70
71       The bit-wise "&" and "|" operators should be used when testing and set‐
72       ting flags in a mask.
73
74       SoMFBitMasks are written to file as one  or  more  mnemonic  enumerated
75       type names, in this format:
76
77          ( flag1 | flag2 | ... )
78
79     If  only  one flag is used in a mask, the parentheses are optional. These
80     names differ among uses of this field in various node or engine  classes.
81     See the reference pages for specific nodes or engines for the names.
82
83     The  field  values  may  also be represented as integers, but this is not
84     guaranteed to be portable.
85
86     When more than one value is present, all of the values  are  enclosed  in
87     square brackets and separated by commas.
88

METHODS

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