Class TX3DReaderNames

Unit

Declaration

type TX3DReaderNames = class(TX3DReader)

Description

Container tracking VRML/X3D node and prototype names during parsing. Used by both classic and XML VRML/X3D readers.

Hierarchy

Overview

Methods

Public constructor Create(const AAutoRemoveNodes: boolean; const ABaseUrl: string; const AVersion: TX3DVersion);
Public constructor CreateCopy(const AAutoRemoveNodes: boolean; Source: TX3DReader);
Public destructor Destroy; override;
Public procedure ExtractNames(out APrototypes: TX3DPrototypeNames; out AExported: TX3DExportList; out AImported: TX3DNodeNames);
Public procedure DoExport(const E: TX3DExport; const ExportedNodeName: String);
Public procedure DoImport(const I: TX3DImport);
Public function Bound(const Name: string; out NodeFinished: Boolean; const WarningIfImported: Boolean): TX3DNode;

Properties

Public property Nodes: TX3DNodeNames read FNodes;
Public property Prototypes: TX3DPrototypeNames read FPrototypes;
Public property Imported: TX3DNodeNames read FImported;
Public property Exported: TX3DExportList read FExported;
Public property Importable: TX3DImportableNames read FImportable;

Description

Methods

Public constructor Create(const AAutoRemoveNodes: boolean; const ABaseUrl: string; const AVersion: TX3DVersion);
 
Public constructor CreateCopy(const AAutoRemoveNodes: boolean; Source: TX3DReader);
 
Public destructor Destroy; override;
 
Public procedure ExtractNames(out APrototypes: TX3DPrototypeNames; out AExported: TX3DExportList; out AImported: TX3DNodeNames);

Extract names, before destructing this object. This method can be used only right before calling the destructor. It copies the prototype, exported, imported names list (names visible from the outside), and sets them to Nil (to avoid releasing them at destruction).

Public procedure DoExport(const E: TX3DExport; const ExportedNodeName: String);

Set E.ExportedNode based on ExportedNodeName, and modify Exported list to handle the export.

Public procedure DoImport(const I: TX3DImport);

modify Imported list to handle the export.

Public function Bound(const Name: string; out NodeFinished: Boolean; const WarningIfImported: Boolean): TX3DNode;

Find node bound to given name. Looks in Nodes and Imported. Returns Nil if none.

Properties

Public property Nodes: TX3DNodeNames read FNodes;

Current namespace for DEF/USE.

This is a list without duplicates with all currently known node names. Objects[] of this list point to actual TX3DNode instances. If many instances had the same NodeName, only the last instance will be referenced here, following VRML spec (last DEF takes precedence).

Internal notes: ParseNode doesn't modify this, only TX3DNode.Parse can do this.

Public property Prototypes: TX3DPrototypeNames read FPrototypes;

Current namespace of PROTO names.

Public property Imported: TX3DNodeNames read FImported;

Currently IMPORTed nodes.

The nodes on this list are "bound" to their aliases, as this is the name under which they are visible in the current namespace. Alias is the identifier after the "AS" keyword in the "IMPORT" declaration (or, if no "AS xxx" clause was present, then alias is just the name under which node was exported).

Public property Exported: TX3DExportList read FExported;

Currently EXPORTed nodes from this scene.

Public property Importable: TX3DImportableNames read FImportable;

Currently loaded Inlines with importable nodes.

The mechanism is that when you load an Inline node, the resulting "Exported" nodes (from the namespace within the Inline) get added to this "Importable" list. Then the "IMPORT" clause in this namespace can make "Importable" nodes into actually "Imported".

This is a list with strings representing Inline node names (there's no way to IMPORT from unnamed Inline nodes). Objects[] of this list are instances of TX3DNodeNames corresponding to exported names within the inline.


Generated by PasDoc 0.16.0.