man SoFile () - node that reads children from a named file


SoFile - node that reads children from a named file


SoBase > SoFieldContainer > SoNode > SoFile


#include <Inventor/nodes/SoFile.h> Fields from class SoFile: c } c } name Methods from class SoFile: c } c } SoFile()

c } c } copyChildren() const

c } c } getClassTypeId() Methods from class SoNode: c } c } setOverride(SbBool state)

c } c } isOverride() const

c } c } copy(SbBool copyConnections = FALSE) const

c } c } affectsState() const

c } c } getByName(const SbName &name)

c } c } getByName(const SbName &name, SoNodeList &list) Methods from class SoFieldContainer: c } c } setToDefaults()

c } c } hasDefaultValues() const

c } c } fieldsAreEqual(const SoFieldContainer *fc) const

c } c } copyFieldValues(const SoFieldContainer *fc, SbBool copyConnections = FALSE)

c } c } set(const char *fieldDataString)

c } c } get(SbString &fieldDataString)

c } c } getFields(SoFieldList &resultList) const

c } c } getField(const SbName &fieldName) const

c } c } getFieldName(const SoField *field, SbName &fieldName) const

c } c } isNotifyEnabled() const

c } c } enableNotify(SbBool flag) Methods from class SoBase: c } c } ref()

c } c } unref() const

c } c } unrefNoDelete() const

c } c } touch()

c } c } getTypeId() const

c } c } isOfType(SoType type) const

c } c } setName(const SbName &name)

c } c } getName() const


This node represents a subgraph that was read from a named input file. When an SoFile node is written out, just the field containing the name of the file is written; no children are written out. When an SoFile is encountered during reading, reading continues from the named file, and all nodes read from the file are added as hidden children of the file node. Whenever the name field changes, any existing children are removed and the contents of the new file is read in. The file node remembers what directory the last file was read from and will read the new file from the same directory after checking the standard list of directories (see SoInput), assuming the field isn't set to an absolute path name. The children of an SoFile node are hidden; there is no way of accessing or editing them. If you wish to edit the contents of an SoFile node, you can modify the contents of the named file and then "touch" the name field (see SoField). Alternatively, you can use the copyChildren() method to get a editable copy of the file node's children. Note that this does not affect the original file on disk, however.


c } c } name

Name of file from which to read children.


c } c } SoFile()

Creates a file node with default settings. c } c } copyChildren() const

Returns a new SoGroup containing copies of all of the file node's children. c } c } getClassTypeId()

Returns type identifier for this class.


SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMatrixAction, SoHandleEventAction

Traverses its children just as SoGroup does. SoRayPickAction

Traverses its hidden children, but, if intersections are found, generates paths that end at the SoFile node. SoWriteAction

Writes just the name field and no children.


File {
name	"<Undefined file>"


SoInput, SoPath