Debian Codegraph @

doc/man/man3/ivm/fields/SoMFUShort.ivm

raw
1 NAME SoMFUShort SoMUShort "" {
2 multiple-value field containing any number of unsigned short integers
3 }
4
5 INCLUDE fields/SoMFUShort.h
6
7 DESC {
8 A multiple-value field that contains any number of unsigned short integers.
9 \p
10 \cSoMFUShorts\. are written to file as one or more unsigned short integer
11 values, represented as decimal, hexadecimal (beginning with '0x') or
12 octal (beginning with '0') values.
13 When more than one value is present, all of the
14 values are enclosed in square brackets and separated by commas; for
15 example:
16 \b
17 [ 7, 0xFF, 033 ]
18 \.
19 }
20 METHOD "" static SoType getClassTypeId() {}
21 METHOD "" virtual void getTypeId() const {
22 Returns the type for this class or a particular object of this class.
23 }
24 METHOD Get unsigned short operator [\|](int i) const {
25 Returns the \ai\.'th value of the field. Indexing past the end of the
26 field (passing in \ai\. greater than \mgetNum()\.) will return garbage.
27 }
28 METHOD GetN const unsigned short * getValues(int start) const {
29 Returns a pointer into the array of values in the field, starting at
30 index \astart\.. The values are read-only; see the
31 \mstartEditing()\./\mfinishEditing()\. methods for a way of modifying values
32 in place.
33 }
34 METHOD "" int find(unsigned short targetValue,
35 SbBool addIfNotFound = FALSE) {
36 Finds the given value in the array and returns the index of that value
37 in the array. If the value is not found, -1 is returned. If
38 \aaddIfNotFound\. is set, then \atargetValue\. is added to the end of the
39 array (but -1 is still returned).
40 }
41 METHOD SetN void setValues(int start, int num,
42 const unsigned short *newValues) {
43 Sets \anum\. values starting at index \astart\. to the values in \anewValues\..
44 The array will be automatically be made larger to accomodate the new
45 values, if necessary.
46 }
47 METHOD Set1 void set1Value(int index, unsigned short newValue) {
48 Sets the \aindex\.'th value in the array to \anewValue\.. The array will be
49 automatically expanded, if necessary.
50 }
51 METHOD " " unsigned short operator =(unsigned short newValue) {}
52 METHOD Set void setValue(unsigned short newValue) {
53 Sets the first value in the array to \anewValue\., and deletes the second
54 and subsequent values.
55 }
56 METHOD IsEq int operator ==(const SoMFUShort &f) const {}
57 METHOD IsNEq int operator !=(const SoMFUShort &f) const {
58 Returns TRUE if all of the values of this field equal (do not
59 equal) those of the given field. If the fields are different types FALSE will
60 always be returned (even if one field is an \cSoMFFloat\. with one
61 value of 1.0 and the other is an \cSoMFInt\. with a value of 1, for
62 example).
63 }
64 METHOD StartEdit unsigned short *startEditing() {}
65 METHOD FinishEdit void finishEditing() {
66 \mstartEditing()\. returns a pointer to the internally-maintained array that
67 can be modified. The values in the array may be changed, but values cannot
68 be added or removed. It is illegal to call any other editing methods between
69 \+\mstartEditing()\. and \mfinishEditing()\. (e.g. \mset1Value()\.,
70 \msetValue()\., etc).\.\-\mStartEdit()\. and \mFinishEdit()\. (e.g.
71 \mSet1()\., \mSet()\., etc).\.
72 \p
73 Fields, engines or sensors connected to this field and sensors are not
74 notified that this field has changed until
75 \+\mfinishEditing()\.\.\-\mFinishEdit()\.\. is called. Calling
76 \+\mfinishEditing()\.\.\-\mFinishEdit()\.\. always sets the
77 \+\misDefault()\.\.\-\mIsDflt\.\. flag to FALSE and informs
78 engines and sensors that the field changed, even if none of the values
79 actually were changed.
80 }