table of contents
other sections
SoMField(3IV)() | SoMField(3IV)() |
NAME¶
SoMField — base class for all multiple-valued fieldsINHERITS FROM¶
SoField > SoMFieldSYNOPSIS¶
#include <Inventor/fields/SoField.h>Methods from class SoMField:
int getNum() const
void setNum(int num)
virtual void deleteValues(int start, int num = -1)
virtual void insertSpace(int start, int num)
SbBool set1(int index, const char *valueString)
void get1(int index, SbString &valueString)
static SoType getClassTypeId()
Methods from class SoField:
void setIgnored(SbBool ignore)
SbBool isIgnored() const
SbBool isDefault() const
virtual SoType getTypeId() const
virtual SbBool isOfType(SoType type) const
SbBool set(const char *valueString)
void get(SbString &valueString)
int operator ==(const SoField &f) const
int operator !=(const SoField &f) const
void touch()
SbBool connectFrom(SoField *fromField)
SbBool connectFrom(SoEngineOutput *fromEngine)
void disconnect()
SbBool isConnected() const
SbBool isConnectedFromField() const
SbBool getConnectedField(SoField *&writingField) const
SbBool isConnectedFromEngine() const
SbBool getConnectedEngine(SoEngineOutput *&engineOutput) const
void enableConnection(SbBool flag)
SbBool isConnectionEnabled() const
int getForwardConnections(SoFieldList &list) const
SoFieldContainer * getContainer() const
DESCRIPTION¶
Each class derived from SoMField begins with an SoMF prefix and contains a dynamic array of values of a particular type. Each has a setValues() method that is passed a pointer to a const array of values of the correct type; these values are copied into the array in the field, making extra room in the array if necessary. The start and num parameters to this method indicate the starting array index to copy into and the number of values to copy.
[ 1, 2, 3, 4 ] or: [ 1, 2, 3, 4, ]
METHODS¶
int getNum() const
Returns the number of values currently in the field.
void setNum(int num)
Forces this field to have exactly num values, inserting or deleting values as necessary.
virtual void deleteValues(int start, int num = -1)
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). A num of -1 means delete all values from start to the last value in the field; getNum() will return start as the number of values in the field after this operation ( deleteValues(0, -1) empties the field).
virtual void insertSpace(int start, int num)
Inserts space for num values at index start. Index start through start+num-1 will be moved up to make room. For example, to make room for 7 new values at the beginning of the field call insertSpace(0, 10).
SbBool set1(int index, const char *valueString)
void get1(int index, SbString &valueString)
These are equivalent to the set() and get() methods of SoField, but they operate on only one value. See the SoField methods for details.
static SoType getClassTypeId()
Return the type identifier for this field class.