Open Inventor Reference
|
Node that reads children from a named file. More...
#include <Inventor/nodes/SoFile.h>
Public Member Functions | |
SoFile () | |
Creates a file node with default settings. | |
SoGroup * | copyChildren () const |
Method that returns a copy of the File node's children added to a group. | |
virtual void | doAction (SoAction *action) |
Traversal methods for all the actions: | |
virtual void | callback (SoCallbackAction *action) |
virtual void | GLRender (SoGLRenderAction *action) |
These virtual functions implement all of the actions for nodes, Most of the default implementations do nothing. | |
virtual void | getBoundingBox (SoGetBoundingBoxAction *action) |
virtual void | getMatrix (SoGetMatrixAction *action) |
virtual void | handleEvent (SoHandleEventAction *action) |
virtual void | pick (SoPickAction *action) |
virtual SoChildList * | getChildren () const |
Returns pointer to children. | |
virtual void | copyContents (const SoFieldContainer *fromFC, SbBool copyConnections) |
Copies the contents of the given node into this instance. | |
Static Public Member Functions | |
static void | initClass () |
Initializes base node class. | |
Public Attributes | |
Fields | |
SoSFString | name |
Name of file from which to read children. | |
Protected Member Functions | |
virtual SbBool | readInstance (SoInput *in, unsigned short flags) |
Reads stuff into instance of SoFile. Returns FALSE on error. | |
virtual | ~SoFile () |
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.
File { name <Undefined file> }
SoFile::SoFile | ( | ) |
virtual SoFile::~SoFile | ( | ) | [protected, virtual] |
virtual void SoFile::callback | ( | SoCallbackAction * | action | ) | [virtual] |
Reimplemented from SoNode.
SoGroup* SoFile::copyChildren | ( | ) | const |
virtual void SoFile::copyContents | ( | const SoFieldContainer * | fromFC, |
SbBool | copyConnections | ||
) | [virtual] |
This copies without re-reading the file.
Reimplemented from SoNode.
virtual void SoFile::getBoundingBox | ( | SoGetBoundingBoxAction * | action | ) | [virtual] |
Reimplemented from SoNode.
virtual SoChildList* SoFile::getChildren | ( | ) | const [virtual] |
Reimplemented from SoNode.
virtual void SoFile::getMatrix | ( | SoGetMatrixAction * | action | ) | [virtual] |
Reimplemented from SoNode.
virtual void SoFile::GLRender | ( | SoGLRenderAction * | action | ) | [virtual] |
Reimplemented from SoNode.
virtual void SoFile::handleEvent | ( | SoHandleEventAction * | action | ) | [virtual] |
Reimplemented from SoNode.
static void SoFile::initClass | ( | ) | [static] |
Reimplemented from SoNode.
virtual void SoFile::pick | ( | SoPickAction * | action | ) | [virtual] |
Reimplemented from SoNode.
Reimplemented from SoFieldContainer.