#include <Inventor/fields/SoFieldData.h>
Public Methods | |
SoFieldData (void) | |
SoFieldData (const SoFieldData &fd) | |
SoFieldData (const SoFieldData *fd) | |
SoFieldData (int numfields) | |
~SoFieldData () | |
void | addField (SoFieldContainer *base, const char *name, const SoField *field) |
void | overlay (SoFieldContainer *to, const SoFieldContainer *from, SbBool copyconnections) const |
int | getNumFields (void) const |
const SbName & | getFieldName (int index) const |
SoField * | getField (const SoFieldContainer *object, int index) const |
int | getIndex (const SoFieldContainer *fc, const SoField *field) const |
void | addEnumValue (const char *enumname, const char *valuename, int value) |
void | getEnumData (const char *enumname, int &num, const int *&values, const SbName *&names) |
SbBool | read (SoInput *in, SoFieldContainer *object, SbBool erroronunknownfield, SbBool ¬builtin) const |
SbBool | read (SoInput *in, SoFieldContainer *object, const SbName &fieldname, SbBool &foundname) const |
void | write (SoOutput *out, const SoFieldContainer *object) const |
void | copy (const SoFieldData *src) |
SbBool | isSame (const SoFieldContainer *c1, const SoFieldContainer *c2) const |
SbBool | readFieldDescriptions (SoInput *in, SoFieldContainer *object, int numdescriptionsexpected) const |
void | writeFieldDescriptions (SoOutput *out, const SoFieldContainer *object) const |
This class is instantiated once for each class of objects which use fields, and which needs to be able to import and export them.
Each field of a class is stored with the name it has been given within its "owner" class and a pointer offset to the dynamic instance of the field itself.
Enumeration sets are stored with (name, value) pairs, to make it possible to address, read and save enum type fields by name.
It is unlikely that application programmers should need to use any of the methods of this class directly.
|
Default constructor. |
|
Copy constructor. |
|
Copy constructor taking a pointer value as an argument. Handles |
|
Constructor. Takes an indication on the number of fields which should be stored, to make sure the memory handling is efficient. |
|
Destructor. |
|
Add a new field to our internal list. The name will be stored along with an pointer offset between base and field, which will be valid for all instances of the class type of base. |
|
Copy fields from container from to container to. If copyconnections is
If you think the method signature is a bit strange, you're correct. This should really have been a static method (the owner |
|
Returns number of fields contained within this instance. |
|
Returns the name of the field at index. |
|
Returns a pointer to the field at index within the object instance. |
|
Returns the internal index value of field in fc. If field is not part of fc, returns -1. |
|
Either adds a new enum set (with an initial member), or adds a new value member to an existing enum set. |
|
Returns the names and values of enumeration entry with the enumname. The number of (name, value) pairs available in the enumeration is returned in num. |
|
Read field data from the in stream for fields belonging to object. Returns
erroronunknownfield decides whether or not
If notbuiltin is |
|
Find field fieldname in object, and if it is available, set foundname to
If fieldname is not part of object, returns |
|
Write to out field names and field values for the fields of object. |
|
Copy contents of src into this instance. If there was any data set up in this instance before the method was called, the old data is removed first. Note that this only copies the field set template specification from src, not any actual fields. |
|
Compares c1 and c2 to see if they have the same field data set and if the fields of c1 have the same values as the fields of c2.
Field connections are not considered (i.e. we will return
If you think the method signature is a bit strange, you're correct. This should really have been a static method (the owner |
|
Reads a set of field specifications from in for an unknown nodeclass type, in the form "[ FIELDCLASS FIELDNAME, FIELDCLASS FIELDNAME, ... ]". numdescriptionsexpected is used for binary format import to know how many descriptions should be parsed. |
|
Write a set of field specifications to out for an unknown nodeclass type, in the form "[ FIELDCLASS FIELDNAME, FIELDCLASS FIELDNAME, ... ]". |