Debian Codegraph @

doc/man/man3/ivm/fields/SoMFName.ivm

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