SoMFString Class |
Multiple-value field containing any number of strings.
Namespace: OIV.Inventor.Fields
The SoMFString type exposes the following members.
Name | Description | |
---|---|---|
SoMFString | Default constructor. |
Name | Description | |
---|---|---|
AppendConnection(SoEngineOutput) | Appends this field to the list of connections from another engineOutput. | |
AppendConnection(SoField) | Appends this field to the list of connections from another field. | |
ConnectFrom(SoEngineOutput) | Connects this field from an engine output. | |
ConnectFrom(SoField) | Connects this field to another field. | |
CopyFrom | Copy from another field of same type. | |
DeleteText | Convenience function to delete text from consecutive strings. | |
DeleteValues(Int32) | Calls DeleteValues(start, -1). (Inherited from SoMField.) | |
DeleteValues(Int32, Int32) | Deletes num values beginning at index start (index start through start + num -1 will be deleted, and any leftover values will be moved down to fill in the gap created). | |
DisableDeleteValues | Temporary disable value deleting. | |
Disconnect | Disconnect the field from whatever it was connected to. | |
Disconnect(SoEngineOutput) | Disconnect the field from the requested engineOutput. | |
Disconnect(SoField) | Disconnect the field from the requested field. | |
EnableConnection | Field connections may be enabled and disabled. | |
Equals | (Overrides SoFieldEquals(Object).) | |
Find(String) | Calls Find(targetValue, false). | |
Find(String, Boolean) | Finds the given targetValue in the array and returns the index of that value. | |
FinishEditing | Indicates that batch edits have finished. | |
Get | Returns the value of the field in the Open Inventor file format, even if the field has its default value. | |
Get1 | This is equivalent to the OIV.Inventor.Fields.SoField.Get(System.String@) method of OIV.Inventor.Fields.SoField, but operates on only one value. | |
GetConnectedEngine | Returns true if this field is being written into by an engine, and returns the engine output it is connected to in engineOutput. | |
GetConnectedField | Returns true if this field is being written into by another field, and returns the field it is connected to in writingField. | |
GetConnections | Returns a list of the connections to this field. | |
GetContainer | Returns the object that contains this field. | |
GetForwardConnections | Adds references to all of the fields that this field is writing into (either fields in nodes, global fields or engine inputs) to the given field list, and returns the number of forward connections. | |
GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) | |
GetNum | Obsolete. Returns the number of values currently in the field. | |
GetNumConnections | Returns the number of connections to this field. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetValues | Returns a pointer into the array of values in the field, starting at index start. | |
GetValueSize | Gets the size of the value. | |
InsertSpace | Inserts space for num values at index start . | |
IsConnected | Returns true if the field is connected to anything. | |
IsConnectedFromEngine | Returns true if the field is connected to an engine's output. | |
IsConnectedFromField | Returns true if the field is connected to another field. | |
IsConnectedFromVRMLInterp | Returns true if the field is connected to a VRML interpOutput. | |
IsConnectionEnabled | Returns false if connections to this field are disabled. | |
IsDefault | Gets the state of default flag of the field. | |
IsIgnored | Gets the ignore flag for this field. | |
Set | Sets the field to the given value, which is an ASCII string in the Open Inventor file format. | |
Set1 | This is equivalent to the OIV.Inventor.Fields.SoField.Set(System.String) method of OIV.Inventor.Fields.SoField, but operates on only one value. | |
Set1Value | Obsolete. Sets the index'th value in the array to newValue. | |
SetIgnored | Sets the ignore flag for this field. | |
SetNum | Obsolete. Forces this field to have exactly num values, inserting or deleting values as necessary. | |
SetValue | Sets the first value in the array to newValue, and deletes. | |
SetValues | Sets num values starting at index start to the values. | |
SetValuesBuffer | Sets the field to contain the values stored in userData. | |
StartEditing | Returns a pointer to the internally maintained array that can be modified. | |
ToString |
Converts this SoMFField structure to a human readable string.
(Inherited from SoMField.) | |
Touch | Simulates a change to the field, causing attached sensors to fire, connected fields and engines to be marked as needing evaluation, and so forth. |
Name | Description | |
---|---|---|
Equality | ||
Inequality |
Name | Description | |
---|---|---|
Count | Returns the number of values currently in the field. | |
IsUserDefinedBuffer | (Inherited from SoMField.) | |
Item | Returns the i'th value of the field. |
A multiple-value field that contains any number of strings.
SoMFStrings are written to file as one or more strings within double quotes. Any characters (including newlines) may appear within the quotes. To include a double quote character within the string, precede it with a backslash. For example:
[ cowEnizer , "Scene Boy" , "He said, \"I did not!\"" ]
Unicode Support
Unicode is an industry standard for encoding text of all forms and languages for use by computers. Open Inventor supports Unicode encoding, which allows internationalization of text in a standard cross-platform fashion.
String and as well as classes like OIV.Inventor.Fields.SoSFString support the wchar_t type which is used for Unicode strings, and all of the text nodes are able to render Unicode strings.
String includes methods for construction of Unicode strings, string operators (=, += ,== ,!=, <, >, <=, >=), as well as a query method (String.isUnicode()).
To be able to display a particular Unicode character, the selected font must have a character for that Unicode value. Many fonts do not contain a complete set of Unicode characters. However, the shareware Unicode font file "Code2000" seems to work well.
Note that Unicode characters are not directly supported in Open Inventor files. Unicode strings are written as if the bytes in the string were a string of 8-bit characters. The string will be prefixed by "MCS_U_".
Data copying:
SoMF fields are a kind of "smart container", automatically expanding as necessary to hold the data provided by the application. This is very convenient, but for large blocks of data it may be desireable to avoid making a copy of the application data. The SetValuesBuffer() methods allow Open Inventor to directly use an array of values supplied by the application. The application data is not copied. Please see OIV.Inventor.Fields.SoMFVec3f for more information and example code.