Class TAbstractNode

Unit

Declaration

type TAbstractNode = class(TX3DNode)

Description

Base X3D node that can have some metadata.

Hierarchy

Overview

Methods

Public procedure InternalInsertMetadata(const M: TAbstractMetadataNode);
Public function FindMetadata(const Key: String): TAbstractMetadataNode;
Public procedure CreateNode; override;
Public class function ClassX3DType: String; override;

Properties

Public property MetadataBoolean[const Key: String]: Boolean read GetMetadataBoolean write SetMetadataBoolean;
Public property MetadataBooleanArray[const Key: String; const Index: Cardinal]: Boolean read GetMetadataBooleanArray write SetMetadataBooleanArray;
Public property MetadataString[const Key: String]: String read GetMetadataString write SetMetadataString;
Public property MetadataStringArray[const Key: String; const Index: Cardinal]: String read GetMetadataStringArray write SetMetadataStringArray;
Public property MetadataInteger[const Key: String]: Integer read GetMetadataInteger write SetMetadataInteger;
Public property MetadataIntegerArray[const Key: String; const Index: Cardinal]: Integer read GetMetadataIntegerArray write SetMetadataIntegerArray;
Public property MetadataDouble[const Key: String]: Double read GetMetadataDouble write SetMetadataDouble;
Public property MetadataDoubleArray[const Key: String; const Index: Cardinal]: Double read GetMetadataDoubleArray write SetMetadataDoubleArray;
Public property FdMetadata: TSFNode read FFdMetadata;
Public property Metadata: TAbstractMetadataNode read GetMetadata write SetMetadata;

Description

Methods

Public procedure InternalInsertMetadata(const M: TAbstractMetadataNode);

This item has no description.

Public function FindMetadata(const Key: String): TAbstractMetadataNode;

Find a "metadata" information within this node with given key. Returns Nil if not found.

This seeks for a TAbstractMetadataNode instance within the X3D "metadata" field of this node. Looks for TAbstractMetadataNode with TAbstractMetadataNode.NameField matching the parameter Key. Note that X3D spec allows multiple metadata nodes to share the same key, this method only finds the first one.

It ignores TMetadataSet when searching, as TMetadataSet doesn't contain any simple data, it serves only as container for other metadata nodes.

Public procedure CreateNode; override;

Create node fields and events.

Public class function ClassX3DType: String; override;

This item has no description. Showing description inherited from TX3DNode.ClassX3DType.

Node type name in VRML/X3D, for this class. Normal VRML/X3D node classes should override this to return something non-empty, and then X3DType automatically will return the same value.

Empty for classes that don't have a hardcoded VRML/X3D node name, like a special TX3DUnknownNode. Such special classes should override then X3DType to return actual non-empty name there.

You usually should call X3DType. The only use of this method is that it works on classes (it's "class function"), without needing at actual instance.

Properties

Public property MetadataBoolean[const Key: String]: Boolean read GetMetadataBoolean write SetMetadataBoolean;

Get/set metadata, identified by a given Key, as a Boolean. "Metadata" is any value you want to save with this node, it has no effect on the rendering/behavior. This property hides various complexities of the X3D metadata nodes.

This property looks for a TMetadataBooleanNode node inside the "metadata" of this node using FindMetadata. If found, it allows to operate TMetadataBooleanNode.FdValue array. The MetadataBooleanArray allows to get/set appropriate items of this array. The MetadataBoolean simply gets/sets the first array item.

If such metadata node is not found, or it's TMetadataBooleanNode.FdValue array is too short, this returns false. When setting, it adds such metadata node if necessary, and increases the TMetadataBooleanNode.FdValue array length if necessary.

Public property MetadataBooleanArray[const Key: String; const Index: Cardinal]: Boolean read GetMetadataBooleanArray write SetMetadataBooleanArray;

This item has no description.

Public property MetadataString[const Key: String]: String read GetMetadataString write SetMetadataString;

Get/set metadata, identified by a given Key, as a String. "Metadata" is any value you want to save with this node, it has no effect on the rendering/behavior. This property hides various complexities of the X3D metadata nodes.

This property looks for a TMetadataStringNode node inside the "metadata" of this node using FindMetadata. If found, it allows to operate TMetadataStringNode.FdValue array. The MetadataStringArray allows to get/set appropriate items of this array. The MetadataString simply gets/sets the first array item.

If such metadata node is not found, or it's TMetadataStringNode.FdValue array is too short, this returns ''. When setting, it adds such metadata node if necessary, and increases the TMetadataStringNode.FdValue array length if necessary.

Public property MetadataStringArray[const Key: String; const Index: Cardinal]: String read GetMetadataStringArray write SetMetadataStringArray;

This item has no description.

Public property MetadataInteger[const Key: String]: Integer read GetMetadataInteger write SetMetadataInteger;

Get/set metadata, identified by a given Key, as a Integer. "Metadata" is any value you want to save with this node, it has no effect on the rendering/behavior. This property hides various complexities of the X3D metadata nodes.

This property looks for a TMetadataIntegerNode node inside the "metadata" of this node using FindMetadata. If found, it allows to operate TMetadataIntegerNode.FdValue array. The MetadataIntegerArray allows to get/set appropriate items of this array. The MetadataInteger simply gets/sets the first array item.

If such metadata node is not found, or it's TMetadataIntegerNode.FdValue array is too short, this returns 0. When setting, it adds such metadata node if necessary, and increases the TMetadataIntegerNode.FdValue array length if necessary.

Public property MetadataIntegerArray[const Key: String; const Index: Cardinal]: Integer read GetMetadataIntegerArray write SetMetadataIntegerArray;

This item has no description.

Public property MetadataDouble[const Key: String]: Double read GetMetadataDouble write SetMetadataDouble;

Get/set metadata, identified by a given Key, as a Double. "Metadata" is any value you want to save with this node, it has no effect on the rendering/behavior. This property hides various complexities of the X3D metadata nodes.

This property looks for a TMetadataDoubleNode or TMetadataFloatNode node inside the "metadata" of this node using FindMetadata. If found, it allows to operate TMetadataDoubleNode.FdValue array or TMetadataFloatNode.FdValue array. The MetadataDoubleArray allows to get/set appropriate items of this array. The MetadataDouble simply gets/sets the first array item.

If such metadata node is not found, or it's TMetadataDoubleNode.FdValue array is too short, this returns 0.0. When setting, it adds such metadata node if necessary, and increases the TMetadataDoubleNode.FdValue array length if necessary.

Public property MetadataDoubleArray[const Key: String; const Index: Cardinal]: Double read GetMetadataDoubleArray write SetMetadataDoubleArray;

This item has no description.

Public property FdMetadata: TSFNode read FFdMetadata;

Internal wrapper for property Metadata. This wrapper API may change, we advise to access simpler Metadata instead, if it is defined (TODO: for now, some field types do not have a simpler counterpart).

Public property Metadata: TAbstractMetadataNode read GetMetadata write SetMetadata;

This item has no description.


Generated by PasDoc 0.16.0-snapshot.