64struct SoFieldAuditorInfo;
244 {
return flags.connectionEnabled; }
259 {
return (flags.connected && flags.fromEngine); }
262 {
return (flags.connected && ! flags.fromEngine); }
289 bool set(
const char *valueString);
306 {
return isSame(f); }
310 {
return ! isSame(f); }
323 void setDefault(
bool def) { flags.hasDefault = (def ? 1 : 0 ); }
347 {
return flags.notifyEnabled; }
363 {
return flags.notifyContainerEnabled; }
419 {
if (flags.dirty) evaluateConnection(); }
445 static SoType classTypeId;
448 static char *fieldBuf;
449 static int fieldBufSize;
480 void createAuditorInfo();
487 void reallyDisconnect();
498 static void * reallocFieldBuf(
void *ptr,
size_t newSize);
555 static SoType classTypeId;
558 virtual bool readValue(
SoInput *in) = 0;
561 virtual void writeValue(
SoOutput *out)
const = 0;
635 int getNum()
const { evaluate();
return num; }
658 bool set1(
int index,
const char *valueString);
683 static SoType classTypeId;
686 static char *fieldBuf;
687 static int fieldBufSize;
691 virtual void allocValues(
int num) = 0;
694 virtual void deleteAllValues() = 0;
697 virtual void copyValue(
int to,
int from) = 0;
700 virtual bool readValue(
SoInput *in);
703 virtual bool read1Value(
SoInput *in,
int index) = 0;
706 virtual void writeValue(
SoOutput *out)
const;
709 virtual void write1Value(
SoOutput *out,
int index)
const = 0;
712 virtual bool readBinaryValues(
SoInput *in,
int numToRead);
715 virtual void writeBinaryValues(
SoOutput *out)
const;
718 virtual int getNumValuesPerLine()
const;
722 static void * reallocFieldBuf(
void *ptr,
size_t newSize);
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
INVENTOR_API bool operator!=(const SbBox3f &b1, const SbBox3f &b2)
INVENTOR_API bool operator==(const SbBox3f &b1, const SbBox3f &b2)
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
Character string stored in a hash table.
Class for smart character strings.
Class for all engine outputs.
Abstract base class for objects that contain fields.
Abstract base class for all field converter engines.
Maintains a list of pointers to fields.
Base class for all fields.
virtual bool readValue(SoInput *in)=0
Reads value(s) of field.
virtual void connectionStatusChanged(int numConnections)
Indicates to a field that a change has been made involving a connection from it (as source) to anothe...
bool isIgnored() const
Gets the ignore flag for this field.
void setIgnored(bool ig)
Sets the ignore flag for this field.
virtual bool read(SoInput *in, const SbName &name)
Reads value of field (with given name) from file as defined by SoInput.
virtual SoType getTypeId() const =0
Return the type identifier for this field instance (SoField *).
bool isConnectedFromField() const
Returns TRUE if the field is connected to another field.
virtual void fixCopy(bool copyConnections)
After a field value has been copied using copyFrom(), this is called to allow fields to update the co...
unsigned int notifyEnabled
Notification is enabled.
virtual void writeConnection(SoOutput *out) const
Writes field connection.
bool connectFrom(SoField *field)
virtual void copyFrom(const SoField &f)=0
Copies the value from one field to another, assuming same subclass.
bool getConnectedField(SoField *&field) const
Returns TRUE if this field is being written into by another field, and returns the field it is connec...
bool connectFrom(SoEngineOutput *engineOutput)
Connects the field to the given output of an engine or to another field.
unsigned int hasAuditors
Connected, or FieldSensor.
bool isOfType(SoType type) const
Returns TRUE if this field is the given type or derived from that type.
bool set(const char *valueString)
Sets the field to the given value, which is an ASCII string in the Inventor file format.
virtual bool referencesCopy() const
This returns TRUE if this field contains a reference to a node or engine that is copied during a copy...
void enableConnection(bool flag)
Field connections may be enabled and disabled.
unsigned int notifyContainerEnabled
If set to 0, the container is not notified on Field changed.
virtual void startNotify()
Initiates or propagates notification through container.
void disconnect()
Disconnect the field from whatever it was connected to.
virtual bool readConnection(SoInput *in)
Reads connection.
bool enableNotify(bool flag)
Indicates whether notification will propagate as the result of setting the field value.
SoFieldAuditorInfo * auditorInfo
void addAuditor(void *auditor, SoNotRec::Type type)
Adds/removes an auditor to/from list.
unsigned int fromEngine
Connection is from engine.
bool isReadOnly() const
If this returns TRUE, it means we're in the middle of doing a setValue()+valueChanged() and values fr...
unsigned int connected
Field connected from something.
unsigned int readOnly
Must not write into this field.
unsigned int isEngineModifying
Engine evaluating.
bool isConnectedFromEngine() const
Returns TRUE if the field is connected to an engine's output.
SoFieldContainer * container
void evaluate() const
Evaluates the field from whatever it's connected to.
bool shouldWrite() const
Returns TRUE if the field really needs to be written out.
virtual void touch()
Simulates a change to the field, causing attached sensors to fire, connected fields and engines to be...
bool getConnectedEngine(SoEngineOutput *&engineOutput) const
Returns TRUE if this field is being written into by an engine, and returns the engine output it is co...
bool isConnectionEnabled() const
Returns FALSE if connections to this field are disabled.
bool isDefault() const
Gets the state of default flag of the field.
virtual void write(SoOutput *out, const SbName &name) const
Writes field (with given name) to file as defined by SoOutput.
void removeAuditor(void *auditor, SoNotRec::Type type)
void setContainer(SoFieldContainer *cont)
Sets the containing node.
unsigned int hasDefault
Field is set to default value.
bool isNotifyEnabled() const
virtual void evaluateConnection() const
Evaluates the field or engine the field is connected to, storing the result in the field.
virtual ~SoField()
Destructor.
static void initClasses()
Initialize ALL Inventor node classes.
bool enableContainerNotify(bool flag)
Indicates whether notification will propagate to the SoFieldContainer that owns the field.
unsigned int ignored
Field value is to be ignored.
virtual void notify(SoNotList *list)
static SoType getClassTypeId()
Return the type identifier for this field class.
int getForwardConnections(SoFieldList &list) const
Adds pointers to all of the fields that this field is writing into (either fields in nodes,...
bool isContainerNotifyEnabled() const
virtual void countWriteRefs(SoOutput *out) const
Counts write-references on field to prepare for writing.
void valueChanged(bool resetDefault=TRUE)
Called by an instance to indicate that a value has changed.
void get(SbString &valueString)
Returns the value of the field in the Inventor file format, even if the field has its default value.
void copyConnection(const SoField *fromField)
Copies connection from one field to another.
unsigned int converted
Connection required converter.
unsigned int dirty
Field was notified and needs evaluation.
unsigned int connectionEnabled
Connection is enabled.
virtual void writeValue(SoOutput *out) const =0
Writes value(s) of field.
virtual bool isSame(const SoField &f) const =0
Returns TRUE if the given field is of the same type and has the same value(s) as this.
void setDefault(bool def)
Sets default flag.
SoFieldContainer * getContainer() const
Returns the containing node or engine.
bool isConnected() const
Returns TRUE if the field is connected to anything.
Base class for all multiple-valued fields.
virtual ~SoMField()
Destructor.
virtual void makeRoom(int newNum)
Make sure there is room for newNum vals.
int getNum() const
Returns the number of values currently in the field.
void get1(int index, SbString &valueString)
This is equivalent to the get() method of SoField, but operates on only one value.
virtual void insertSpace(int start, int num)
Inserts space for num values at index start.
static void * createInstance()
void setNum(int num)
Forces this field to have exactly num values, inserting or deleting values as necessary.
static SoType getClassTypeId()
Return the type identifier for this field class.
int maxNum
Number of values allocated.
virtual void deleteValues(int start, int num=-1)
Deletes num values beginning at index start (index start through start+num-1 will be deleted,...
bool set1(int index, const char *valueString)
This is equivalent to the set() method of SoField, but operates on only one value.
Holds a list of SoNotRec notification records.
Type
Notification types (what receives notification).
Used to write Inventor data files.
Abstract base class for all single-value fields.
static SoType getClassTypeId()
Return the type identifier for this field class.
virtual ~SoSField()
Destructor.
static void * createInstance()
SoType has no virtual functions to keep it small...