Debian Codegraph @

doc/man/man3/ivm/fields/SoMFShort.ivm

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