SoFile(3IV)NAMESoFile (SoFile) - node that reads children from a named file
INHERITS FROM
SoBase > SoFieldContainer > SoNode > SoFileSYNOPSIS
#include <Inventor_c/nodes/SoFile.h>
Fields from class SoFile:
SoSFString name
Functions from class SoFile:
SoFile * SoFileCreate()
SoGroup * SoFileCopyChildren(const SoFile *this)
SoType SoFileGetClassTypeId()
Functions from class SoNode:
void SoFileSetOverride(SoFile *this, SbBool state)
SbBool SoFileIsOverride(const SoFile *this)
SoNode * SoFileCopy(const SoFile *this, SbBool copyConnections
= FALSE)
SbBool SoFileAffectsState(const SoFile *this)
SoNode * SoFileGetByName(const char *name)
int SoFileGetByNameList(const char *name, SoNodeList
*list)
Functions from class SoFieldContainer:
void SoFileSetToDflts(SoFile *this)
SbBool SoFileHasDfltVals(const SoFile *this)
SbBool SoFileFldsAreEq(const SoFile *this, const
SoFieldContainer *fc)
void SoFileCopyFieldVals(SoFile *this, const
SoFieldContainer *fc, SbBool copyConnections =
FALSE)
SbBool SoFileSet(SoFile *this, const char *fieldDataString)
void SoFileGet(SoFile *this, SbString *fieldDataString)
int SoFileGetFields(const SoFile *this, SoFieldList
*resultList)
SoField * SoFileGetField(const SoFile *this, const char
*fieldName)
SbBool SoFileGetFieldName(const SoFile *this, const SoField
*field, SbName *fieldName)
SbBool SoFileIsNotifyEnabled(const SoFile *this)
SbBool SoFileEnableNotify(SoFile *this, SbBool flag)
Functions from class SoBase:
Page 1SoFile(3IV)
void SoFileRef(SoFile *this)
void SoFileUnref(const SoFile *this)
void SoFileUnrefNoDelete(const SoFile *this)
void SoFileTouch(SoFile *this)
SoType SoFileGetTypeId(const SoFile *this)
SbBool SoFileIsOfType(const SoFile *this, SoType type)
void SoFileSetName(SoFile *this, const char *name)
SbName SoFileGetName(const SoFile *this)
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 SoFileCopyChildren()
function to get a editable copy of the file node's children. Note that
this does not affect the original file on disk, however.
FIELDS
SoSFString name
Name of file from which to read children.
FUNCTIONSSoFile * SoFileCreate()
Creates a file node with default settings.
SoGroup * SoFileCopyChildren(const SoFile *this)
Returns a new SoGroup containing copies of all of the file node's
children.
SoType SoFileGetClassTypeId()
Returns type identifier for this class.
ACTION BEHAVIOR
SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction,
SoGetMatrixAction, SoHandleEventAction
Traverses its children just as SoGroup does.
Page 2SoFile(3IV)
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 FORMAT/DEFAULTS
File {
name "<Undefined file>"
}
SEE ALSO
SoInput, SoPath
Page 3