type TX3DInterfaceDeclaration = class(TX3DFileItem)
Description
Interface declaration, used in VRML/X3D (exposed) prototypes and for nodes with dynamic fields (Script, ComposedShader). See VRML 2.0 and X3D specs.
Each interface specification is a field or an event, stored in FieldOrEvent. FieldOrEvent is Nil before parsing.
Field value is not initialized if you passed FieldValue = False to Parse (although IsClauseNames will always be initialized). FieldValue = True is used for prototype (not external) declarations and nodes with interface declarations (Script, ComposedShader etc.). In the future maybe some property like FieldValueInitialized will be exposed here, if needed at some point.
Interface declaration doesn't have much properties, since all the information is contained within FieldOrEvent instance, like Name, field class type, out or in (in case of event), exposed or not (in case of field), IsClauseNames.
Create a copy of current FieldOrEvent. Sets NewParentNode as Result.ParentNode. Note the new copy will not have ParentIntefaceDeclaration set (as the idea is that you own created copy, not this TX3DInterfaceDeclaration instance).
Note that classic VRML parser has here IsClauseAllowed: boolean parameter, this was set to True when parsing InterfaceDeclarations of special nodes (Script, ComposedShader etc.), since they could have IS clause (at least, as far as I understood the spec). But for X3D XML encoding, it's not available, since (AFAI understand the X3D XML encoding spec) the <IS> element inside node body may point from nodeField to any interface field of this node, including InterfaceDeclarations. So ParseISStatement handles this.
Save this interface declaration to stream. This assumes that it starts at the beginning of the line, and at the end always writes NL, so at the end it's also at the beginning of some line.
For XML encoding, IS clauses are not saved here. They must be saved by containing node.
Parameters
FieldValue
If True then we will always save Field value or (if classic encoding) IS clauses to stream, along with this interface declaration (if this interface declaration has the Field set). Otherwise, field's value will not be saved, only IS clauses if present.
Returns access type, corresponding to current Event and Field values.
Result is undefined if both Event and Field are Nil (which may happen when it's not initialized (e.g. parsed) yet) or when both are non-nil (which should never happen).
Field or event of this interface declaration. Is non-nil after parsing.
You can assign to this property, to constructs interface declarations (and so also prototypes) in your own code (e.g. this is used X3D XML reader). Just be careful, and remember that this object owns FieldOrEvent (that is, will free it at destruction).
Return FieldOrEvent casted as appropriate class. Nil if such cast is not possible, for example when FieldOrEvent is an event and you try to use Field method.