1SoFile(3IV)() SoFile(3IV)()
2
3
4
6 SoFile — node that reads children from a named file
7
9 SoBase > SoFieldContainer > SoNode > SoFile
10
12 #include <Inventor/nodes/SoFile.h>
13
14 Fields from class SoFile:
15
16 SoSFString name
17
18 Methods from class SoFile:
19
20 SoFile()
21 SoGroup * copyChildren() const
22 static SoType getClassTypeId()
23
24 Methods from class SoNode:
25
26 void setOverride(SbBool state)
27 SbBool isOverride() const
28 SoNode * copy(SbBool copyConnections = FALSE) const
29 virtual SbBool affectsState() const
30 static SoNode * getByName(const SbName &name)
31 static int getByName(const SbName &name, SoNodeList &list)
32
33 Methods from class SoFieldContainer:
34
35 void setToDefaults()
36 SbBool hasDefaultValues() const
37 SbBool fieldsAreEqual(const SoFieldContainer *fc) const
38 void copyFieldValues(const SoFieldContainer *fc, SbBool
39 copyConnections = FALSE)
40 SbBool set(const char *fieldDataString)
41 void get(SbString &fieldDataString)
42 virtual int getFields(SoFieldList &resultList) const
43 virtual SoField * getField(const SbName &fieldName) const
44 SbBool getFieldName(const SoField *field, SbName &fieldName)
45 const
46 SbBool isNotifyEnabled() const
47 SbBool enableNotify(SbBool flag)
48
49 Methods from class SoBase:
50
51 void ref()
52 void unref() const
53 void unrefNoDelete() const
54 void touch()
55 virtual SoType getTypeId() const
56 SbBool isOfType(SoType type) const
57 virtual void setName(const SbName &name)
58 virtual SbName getName() const
59
60
62 This node represents a subgraph that was read from a named input file.
63 When an SoFile node is written out, just the field containing the name
64 of the file is written; no children are written out. When an SoFile is
65 encountered during reading, reading continues from the named file, and
66 all nodes read from the file are added as hidden children of the file
67 node.
68
69 Whenever the name field changes, any existing children are removed and
70 the contents of the new file is read in. The file node remembers what
71 directory the last file was read from and will read the new file from
72 the same directory after checking the standard list of directories (see
73 SoInput), assuming the field isn't set to an absolute path name.
74
75 The children of an SoFile node are hidden; there is no way of accessing
76 or editing them. If you wish to edit the contents of an SoFile node,
77 you can modify the contents of the named file and then "touch" the name
78 field (see SoField). Alternatively, you can use the copyChildren()
79 method to get a editable copy of the file node's children. Note that
80 this does not affect the original file on disk, however.
81
83 SoSFString name
84 Name of file from which to read children.
85
86
88 SoFile()
89 Creates a file node with default settings.
90
91 SoGroup * copyChildren() const
92 Returns a new SoGroup containing copies of all of the file node's
93 children.
94
95 static SoType getClassTypeId()
96 Returns type identifier for this class.
97
98
100 SoGLRenderAction, SoCallbackAction, SoGetBoundingBoxAction, SoGetMa‐
101 trixAction, SoHandleEventAction
102 Traverses its children just as SoGroup does.
103
104 SoRayPickAction
105 Traverses its hidden children, but, if intersections are found, gen‐
106 erates paths that end at the SoFile node.
107
108 SoWriteAction
109 Writes just the name field and no children.
110
111
113 File {
114 name "<Undefined file>"
115 }
116
118 SoInput, SoPath
119
120
121
122
123 SoFile(3IV)()