logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SoFile — node that reads children from a named file

Action Behavior

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.

Description

       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.

Fields

SoSFStringname
          Name of file from which to read children.

File Format/Defaults

File{name"<Undefinedfile>"}

Inherits From

       SoBase > SoFieldContainer > SoNode > SoFile

Methods

SoFile()
          Creates a file node with default settings.

     SoGroup*copyChildren()const
          Returns a new SoGroup containing copies of all of the file node's children.

     staticSoTypegetClassTypeId()
          Returns type identifier for this class.

Name

       SoFile — node that reads children from a named file

See Also

SoInput,SoPathSoFile(3IV)()

Synopsis

#include<Inventor/nodes/SoFile.h>

          Fields from class SoFile:

     SoSFStringname

          Methods from class SoFile:

                         SoFile()SoGroup*copyChildren()conststaticSoTypegetClassTypeId()

          Methods from class SoNode:

     voidsetOverride(SbBoolstate)SbBoolisOverride()constSoNode*copy(SbBoolcopyConnections=FALSE)constvirtualSbBoolaffectsState()conststaticSoNode*getByName(constSbName&name)staticintgetByName(constSbName&name,SoNodeList&list)

          Methods from class SoFieldContainer:

     voidsetToDefaults()SbBoolhasDefaultValues()constSbBoolfieldsAreEqual(constSoFieldContainer*fc)constvoidcopyFieldValues(constSoFieldContainer*fc,SbBoolcopyConnections=FALSE)SbBoolset(constchar*fieldDataString)voidget(SbString&fieldDataString)virtualintgetFields(SoFieldList&resultList)constvirtualSoField*getField(constSbName&fieldName)constSbBoolgetFieldName(constSoField*field,SbName&fieldName)constSbBoolisNotifyEnabled()constSbBoolenableNotify(SbBoolflag)

          Methods from class SoBase:

     voidref()voidunref()constvoidunrefNoDelete()constvoidtouch()virtualSoTypegetTypeId()constSbBoolisOfType(SoTypetype)constvirtualvoidsetName(constSbName&name)virtualSbNamegetName()const

See Also