Debian Codegraph @

doc/man/man3/ivm/fields/SoMFString.ivm

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