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.
Hierarchy
- TObject
- TPersistent
- TX3DFileItem
- TX3DInterfaceDeclaration
Overview
Methods
constructor Create(AParentNode: TX3DNode); |
|
destructor Destroy; override; |
|
procedure AddFieldOrEvent(Node: TX3DNode); |
|
procedure Parse(Lexer: TX3DLexer; Reader: TX3DReaderNames; FieldValue, IsClauseAllowed: boolean); |
|
procedure ParseXML(Element: TDOMElement; Reader: TX3DReaderNames; FieldValue: boolean); |
|
procedure IDeclSaveToStream(Writer: TX3DWriter; FieldValue: boolean); |
|
procedure SaveToStream(Writer: TX3DWriter); override; |
|
function AccessType: TX3DAccessType; |
|
function DeepCopy(const NewParentNode: TX3DNode; const CopyState: TX3DNodeDeepCopyState): TX3DInterfaceDeclaration; |
Properties
property ParentNode: TX3DNode read FParentNode; |
|
property FieldOrEvent: TX3DFieldOrEvent
read FFieldOrEvent write SetFieldOrEvent; |
|
property Field: TX3DField read FField; |
|
property Event: TX3DEvent read FEvent; |
Description
Methods
constructor Create(AParentNode: TX3DNode); |
|
This item has no description. |
destructor Destroy; override; |
|
This item has no description. |
procedure AddFieldOrEvent(Node: TX3DNode); |
|
Copies only reference to FieldOrEvent, adding it to Node.Fields or Node.Events. |
procedure Parse(Lexer: TX3DLexer; Reader: TX3DReaderNames; FieldValue, IsClauseAllowed: boolean); |
|
This item has no description. |
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 |
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
|
procedure SaveToStream(Writer: TX3DWriter); override; |
|
Save this interface declaration to stream. See also
|
function AccessType: TX3DAccessType; |
|
Returns access type, corresponding to current Event and Field values. Result is undefined if both Event and Field are |
function DeepCopy(const NewParentNode: TX3DNode; const CopyState: TX3DNodeDeepCopyState): TX3DInterfaceDeclaration; |
|
This item has no description. |
Properties
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. |
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 |
property Field: TX3DField read FField; |
|
Return FieldOrEvent casted as appropriate class. |
property Event: TX3DEvent read FEvent; |
|
This item has no description. |
Generated by PasDoc 0.16.0-snapshot.