Class TX3DMultField

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TX3DMultField = class(TX3DField)

Description

no description available, TX3DField description follows

Base class for all VRML/X3D fields.

Common notes for all descendants: most of them expose field or property "Value", this is (surprise, surprise!) the value of the field. Many of them also expose DefaultValue and DefaultValueExists fields/properties, these should be the default VRML value for this field. You can even change DefaultValue after the object is created.

Most of descendants include constructor that initializes both DefaultValue and Value to the same thing, as this is what you usually want.

Some notes about Assign method (inherited from TPersistent and overridied appropriately in TX3DField descendants):

  1. There are some exceptions, but usually assignment is possible only when source and destination field classes are equal.

  2. Assignment (by Assign, inherited from TPersistent) tries to copy everything: name (with alternative names), default value, IsClauseNames, ValueFromIsClause, Exposed, and of course current value.

    Exceptions are things related to hierarchy of containers: ParentNode, ParentInterfaceDeclaration. Also ExposedEventsLinked.

    If you want to copy only the current value, use AssignValue (or AssignLerp, where available).

Hierarchy

Overview

Methods

Protected function GetCount: Integer; virtual; abstract;
Protected procedure SetCount(const Value: Integer); virtual; abstract;
Public procedure CheckCountEqual(SecondValue: TX3DMultField);

Properties

Public property Count: Integer read GetCount write SetCount;

Description

Methods

Protected function GetCount: Integer; virtual; abstract;

Get or set the number of items, see Count.

Protected procedure SetCount(const Value: Integer); virtual; abstract;
 
Public procedure CheckCountEqual(SecondValue: TX3DMultField);

If SecondValue.Count <> Count, raises EX3DMultFieldDifferentCount

Properties

Public property Count: Integer read GetCount write SetCount;

Number of items in this field.

Remember that increasing this generally sets new items to undefined values (see SetCount documentation of particular descendant for docs). So you usually want to initialize them afterwards to something correct.