SOMFSHORT(3iv)

πŸ’– SoMFShort(3IV)() β€” the manual page, bestie πŸ’–

okay so this is SoMFShort(3IV)(), and it's literally the manual for a multiple-value field that holds any number of short integers. no cap, it's giving integer energy πŸ’…


✨ NAME ✨

SoMFShort β€” a multiple-value field containing any number of short integers. that's it, that's the name, and it ate πŸ’–


🌈 INHERITS FROM 🌈

SoField > SoMField > SoMFShort

so it's got that whole ancestry chain going on, lowkey iconic family tree 🌳


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <Inventor/fields/SoMFShort.h>

Methods from class SoMFShort

     static SoType       getClassTypeId()
     virtual void        getTypeId() const
     short               operator [](int i) const
     const short *       getValues(int start) const
     int                 find(short targetValue, SbBool addIfNotFound = FALSE)
     void                setValues(int start, int num, const short *newValues)
     void                set1Value(int index, short newValue)
     short               operator =(short newValue)
     void                setValue(short newValue)
     int                 operator ==(const SoMFShort &f) const
     int                 operator !=(const SoMFShort &f) const
     short *             startEditing()
     void                finishEditing()

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)

Methods from class SoField

     void                setIgnored(SbBool ignore)
     SbBool              isIgnored() const
     SbBool              isDefault() const
     virtual SbBool      isOfType(SoType type) const
     SbBool              set(const char *valueString)
     void                get(SbString &valueString)
     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 πŸŽ€

A multiple-value field that contains any number of short (16-bit) integers. yes, 16-bit, so don't try to put your whole main character energy in there, bestie.

SoMFShorts are written to file as one or more short integer values, represented as decimal, hexadecimal (beginning with '0x') or octal (beginning with '0') values. When more than one value is present, all of the values are enclosed in square brackets and separated by commas; for example:

[ -7, 0xFF, -033 ]

so you can mix and match bases, and the square brackets keep it all together. slay πŸ’…


πŸ”₯ METHODS πŸ”₯

  • static SoType getClassTypeId() and virtual void getTypeId() const β€” returns the type for this class or a particular object of this class. basically it tells you what kind of field you're dealing with, no cap.
  • short operator [](int i) const β€” returns the i'th value of the field. but bestie, indexing past the end of the field (passing in i greater than getNum()) will return garbage. like, actual garbage, not a cute error. so don't do that πŸ’€
  • const short * getValues(int start) const β€” returns a pointer into the array of values in the field, starting at index start. the values are read-only; see the startEditing()/finishEditing() methods for a way of modifying values in place. so if you wanna touch the values, you gotta use the editing methods, periodt.
  • int find(short targetValue, SbBool addIfNotFound = FALSE) β€” finds the given value in the array and returns the index of that value in the array. if the value is not found, -1 is returned. if addIfNotFound is set, then targetValue is added to the end of the array (but -1 is still returned). so it's like a little search-and-maybe-add situation, but you still get -1 even if it adds it. iconic.
  • void setValues(int start, int num, const short *newValues) β€” sets num values starting at index start to the values in newValues. the array will automatically be made larger to accommodate the new values, if necessary. so it grows on demand, like your tbr pile πŸ“š
  • void set1Value(int index, short newValue) β€” sets the index'th value in the array to newValue. the array will be automatically expanded, if necessary. one value, one index, no stress.
  • short operator =(short newValue) and void setValue(short newValue) β€” sets the first value in the array to newValue, and deletes the second and subsequent values. so it becomes a one-value field, and the rest are gone. periodt.
  • int operator ==(const SoMFShort &f) const and int operator !=(const SoMFShort &f) const β€” returns TRUE if all of the values of this field equal (do not equal) those of the given field. if the fields are different types FALSE will always be returned (even if one field is an SoMFFloat with one value of 1.0 and the other is an SoMFInt with a value of 1, for example). so type matters, bestie, don't get it twisted.
  • short * startEditing() and void finishEditing() β€” startEditing() returns a pointer to the internally-maintained array that can be modified. the values in the array may be changed, but values cannot be added or removed. it is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. set1Value(), setValue(), etc). like, don't even try it, the vibes will be off.

Fields, engines or sensors connected to this field and sensors are not notified that this field has changed until finishEditing() is called. calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed. so it's like a dramatic reveal, even if nothing changed, the notification still goes out πŸ’…


that's the whole page, bestie! this manual page is SoMFShort(3IV)() β€” that's the source/version and date, no cap. mwah πŸ’‹βœ¨