Class TX3DInterfaceDeclaration
Unit
Declaration
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.
Source: scene/x3d/x3dnodes_x3dinterfacedeclaration.inc (line 38).
Hierarchy
- TObject
- TPersistent
- TX3DFileItem
- TX3DInterfaceDeclaration
Overview
Methods
| Public | constructor Create(AParentNode: TX3DNode); |
| Public | destructor Destroy; override; |
| Public | procedure AddFieldOrEvent(Node: TX3DNode); |
| Public | procedure Parse(Lexer: TX3DLexer; Reader: TX3DReaderNames; FieldValue, IsClauseAllowed: boolean); |
| Public | procedure ParseXML(Element: TDOMElement; Reader: TX3DReaderNames; FieldValue: boolean); |
| Public | procedure IDeclSaveToStream(Writer: TX3DWriter; FieldValue: boolean); |
| Public | procedure SaveToStream(Writer: TX3DWriter); override; |
| Public | function AccessType: TX3DAccessType; |
| Public | function DeepCopy(const NewParentNode: TX3DNode; const CopyState: TX3DNodeDeepCopyState): TX3DInterfaceDeclaration; |
Properties
| Public | property ParentNode: TX3DNode read FParentNode; |
| Public | property FieldOrEvent: TX3DFieldOrEvent
read FFieldOrEvent write SetFieldOrEvent; |
| Public | property Field: TX3DField read FField; |
| Public | property Event: TX3DEvent read FEvent; |
Description
Methods
| Public | constructor Create(AParentNode: TX3DNode); |
|
This item has no description. Source: scene/x3d/x3dnodes_x3dinterfacedeclaration.inc (line 64). | |
| Public | destructor Destroy; override; |
|
This item has no description. Source: scene/x3d/x3dnodes_x3dinterfacedeclaration.inc (line 65). | |
| Public | procedure AddFieldOrEvent(Node: TX3DNode); |
|
Copies only reference to FieldOrEvent, adding it to Node.Fields or Node.Events. Source: scene/x3d/x3dnodes_x3dinterfacedeclaration.inc (line 85). | |
| Public | procedure Parse(Lexer: TX3DLexer; Reader: TX3DReaderNames; FieldValue, IsClauseAllowed: boolean); |
|
This item has no description. Source: scene/x3d/x3dnodes_x3dinterfacedeclaration.inc (line 95). | |
| Public | procedure ParseXML(Element: TDOMElement; Reader: TX3DReaderNames; FieldValue: boolean); |
|
Parse interface declaration encoded in XML. Note that classic VRML parser has here IsClauseAllowed: boolean parameter, this was set to Source: scene/x3d/x3dnodes_x3dinterfacedeclaration.inc (line 108). | |
| Public | procedure IDeclSaveToStream(Writer: TX3DWriter; FieldValue: boolean); |
|
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
Source: scene/x3d/x3dnodes_x3dinterfacedeclaration.inc (line 126). | |
| Public | procedure SaveToStream(Writer: TX3DWriter); override; |
|
Save this interface declaration to stream. See also
Source: scene/x3d/x3dnodes_x3dinterfacedeclaration.inc (line 130). | |
| Public | function AccessType: TX3DAccessType; |
|
Returns access type, corresponding to current Event and Field values. Result is undefined if both Event and Field are Source: scene/x3d/x3dnodes_x3dinterfacedeclaration.inc (line 139). | |
| Public | function DeepCopy(const NewParentNode: TX3DNode; const CopyState: TX3DNodeDeepCopyState): TX3DInterfaceDeclaration; |
|
This item has no description. Source: scene/x3d/x3dnodes_x3dinterfacedeclaration.inc (line 141). | |
Properties
| Public | property ParentNode: TX3DNode read FParentNode; |
|
Containing node, if any, for this VRML interface declaration. This must also be set to FieldOrEvent.ParentNode created for this interface declaration. Source: scene/x3d/x3dnodes_x3dinterfacedeclaration.inc (line 70). | |
| Public | property FieldOrEvent: TX3DFieldOrEvent
read FFieldOrEvent write SetFieldOrEvent; |
|
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 Source: scene/x3d/x3dnodes_x3dinterfacedeclaration.inc (line 80). | |
| Public | property Field: TX3DField read FField; |
|
Return FieldOrEvent casted as appropriate class. Source: scene/x3d/x3dnodes_x3dinterfacedeclaration.inc (line 91). | |
| Public | property Event: TX3DEvent read FEvent; |
|
This item has no description. Source: scene/x3d/x3dnodes_x3dinterfacedeclaration.inc (line 92). | |
Generated by PasDoc 0.17.0.snapshot.