---
name: "SoSFEngine"
section: "3iv"
platform: "linux"
package: "inventor-doc"
version: "2.1.6+ds-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SoSFEngine/3iv"
---

# SoSFEngine(3iv)

field containing a pointer to a engine

## NAME

SoSFEngine — field containing a pointer to a engine

## INHERITS FROM

SoField \> SoSField \> SoSFEngine

## SYNOPSIS

**#include \<Inventor/fields/SoSFEngine.h\>**

Methods from class SoSFEngine:

**static SoType**	**getClassTypeId()**\
 **virtual void**	**getTypeId() const**\
 **SoEngine \***	**getValue() const**\
 **SoEngine \***	**operator =(SoEngine \* newValue)**\
 **void**	**setValue(SoEngine \* newValue)**\
 **int**	**operator ==(const SoSFEngine &f) const**\
 **int**	**operator !=(const SoSFEngine &f) const**

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

**This field maintains a pointer to an SoEngine** instance, correctly maintaining its reference count.

**SoSFEngines** are written to file as the engine they are pointing to. For example:

```
mySoSFEngineField ElapsedTime {}
```

is an **SoSFEngine** field named 'mySoSFEngineField', pointing to an **SoElapsedTime** engine. If the engine is used elsewhere, the regular DEF/USE instancing mechanism applies:

```
anotherSoSFEngineField USE calculator
```

is an **SoSFEngine** field that points to a engine named 'calculator' that was DEF'ed earlier in the scene.

## METHODS

**static SoType**	**getClassTypeId()**\
 **virtual void**	**getTypeId() const**\
 Returns the type for this class or a particular object of this class.

**SoEngine \***	**getValue() const**\
 Returns this field's value.

**SoEngine \***	**operator =(SoEngine \* newValue)**\
 **void**	**setValue(SoEngine \* newValue)**\
 Sets this field to **newValue**.

**int**	**operator ==(const SoSFEngine &f) const**\
 **int**	**operator !=(const SoSFEngine &f) const**\
 Returns TRUE if **f** is of the same type and has the same value as this field.

## SEE ALSO

**SoField, SoSField, SoMFEngine, SoEngine**
