SoFile Class Reference

Node that reads children from a named file. More...

#include <Inventor/nodes/SoFile.h>

Inheritance diagram for SoFile:
SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Member Functions

virtual SoType getTypeId () const
 SoFile ()
SoGroupcopyChildren () const

Static Public Member Functions

static SoType getClassTypeId ()
static void setSearchOK (SbBool flag)
static SbBool getSearchOK ()

Public Attributes

SoSFFilePathString name

Detailed Description

Node that reads children from a named file.

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 an editable copy of the file node's children. Note that this does not affect the original file on disk, however.




SoInput, SoPath

Constructor & Destructor Documentation

SoFile::SoFile (  ) 

Creates a file node with default settings.

Member Function Documentation

SoGroup* SoFile::copyChildren (  )  const

Returns a new SoGroup containing copies of all of the file node's children.

static SoType SoFile::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoNode.

static SbBool SoFile::getSearchOK (  )  [inline, static]

Queries whether the search action will traverse the hidden children.

virtual SoType SoFile::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoNode.

static void SoFile::setSearchOK ( SbBool  flag  )  [static]

If flag is TRUE, the search action will traverse hidden children.

Default is FALSE (children will not be searched).

Member Data Documentation

Name of file from which to read children.

The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 12 Sep 2022
Copyright © Thermo Fisher Scientific All rights reserved.