Class TSFEnum
Unit
Declaration
type TSFEnum = class(TX3DSingleField)
Description
Warning: this symbol is deprecated.
VRML 1.0 (deprecated) field representing an enumerated value, which means that you choose one (named) value from a set of possible values. This is deprecated, as VRML 1.0 is an ancient format now.
Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 126).
Hierarchy
- TObject
- TPersistent
- TX3DFileItem
- TX3DFieldOrEvent
- TX3DField
- TX3DSingleField
- TSFEnum
Overview
Fields
| Public | Value: integer; |
| Public | DefaultValue: integer; |
| Public | DefaultValueExists: boolean; |
Methods
| Public | constructor Create(const AParentNode: TX3DFileItem; const AExposed: boolean; const AName: String; const AEnumNames: PConstantStringArray; const AEnumNamesCount: Cardinal; const AValue: integer); |
| Public | procedure ParseValue(Lexer: TX3DLexer; Reader: TX3DReader); override; |
| Public | function EqualsDefaultValue: boolean; override; |
| Public | function Equals(SecondValue: TX3DField): boolean; override; |
| Public | procedure Assign(Source: TPersistent); override; |
| Public | procedure AssignValue(Source: TX3DField); override; |
| Public | procedure AssignDefaultValueFromValue; override; |
| Public | procedure UnassignDefaultValue; override; |
| Public | class function X3DType: String; override; |
| Public | procedure Send(const AValue: Int32); overload; |
Properties
| Public | property EnumNames[i: integer]: string read GetEnumNames; |
| Public | property EnumNamesCount: Cardinal read FEnumNamesCount; |
Description
Fields
| Public | Value: integer; |
|
Value between 0 .. EnumNamesCount - 1. By default 0. Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 135). | |
| Public | DefaultValue: integer; |
|
This item has no description. Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 137). | |
| Public | DefaultValueExists: boolean; |
|
This item has no description. Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 138). | |
Methods
| Public | constructor Create(const AParentNode: TX3DFileItem; const AExposed: boolean; const AName: String; const AEnumNames: PConstantStringArray; const AEnumNamesCount: Cardinal; const AValue: integer); |
|
This item has no description. Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 140). | |
| Public | procedure ParseValue(Lexer: TX3DLexer; Reader: TX3DReader); override; |
|
This item has no description. Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 151). | |
| Public | function EqualsDefaultValue: boolean; override; |
|
This item has no description. Showing description inherited from TX3DField.EqualsDefaultValue.
Whether the value is equal to default. Returns always Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 153). | |
| Public | function Equals(SecondValue: TX3DField): boolean; override; |
|
This item has no description. Showing description inherited from TX3DField.Equals.
All descendants (that add some property that should be compared) should override this like Result := (inherited Equals(SecondValue)) and (SecondValue is TMyType) and (TMyType(SecondValue).MyProperty = MyProperty);
The floating-point fields may be compared with a small epsilon tolerance by this method. Note that this *doesn't* compare the default values of two fields instances. This compares only the current values of two fields instances, and eventually some other properties that affect parsing (like names for TSFEnum and TSFBitMask) or allowed future values (like TSFFloat.MustBeNonnegative). Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 154). | |
| Public | procedure Assign(Source: TPersistent); override; |
|
This item has no description. Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 156). | |
| Public | procedure AssignValue(Source: TX3DField); override; |
|
This item has no description. Showing description inherited from TX3DField.AssignValue. Copies the current field value. Contrary to TPersistent.Assign, this doesn't copy the rest of properties. After setting, our ValueFromIsClause is always changed to
Descendants implementors notes: In this class, implementation takes care of setting our ValueFromIsClause to if Source is <appropriate class> then begin inherited; Value := Source.value; end else AssignValueRaiseInvalidClass(Source); Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 157). | |
| Public | procedure AssignDefaultValueFromValue; override; |
|
This item has no description. Showing description inherited from TX3DField.AssignDefaultValueFromValue. Set field's default value from the current value. Note that for now this doesn't guarantee that every possible field's value can be stored as default value. In case of trouble, it will silently record "no default is known" information, so e.g. EqualsDefaultValue will always return Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 158). | |
| Public | procedure UnassignDefaultValue; override; |
|
This item has no description. Showing description inherited from TX3DField.UnassignDefaultValue.
Remove default value, recording that "no default is known". In effect EqualsDefaultValue will always return Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 159). | |
| Public | class function X3DType: String; override; |
|
This item has no description. Showing description inherited from TX3DField.X3DType.
Field type in X3D, like Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 161). | |
| Public | procedure Send(const AValue: Int32); overload; |
|
This item has no description. Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 163). | |
Properties
| Public | property EnumNames[i: integer]: string read GetEnumNames; |
|
Names of the enumerated values. Note that this cannot be initialized by CreateUndefined, so you always must initialize this field using the Create overload that takes AEnumNames parameter. Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 149). | |
| Public | property EnumNamesCount: Cardinal read FEnumNamesCount; |
|
This item has no description. Source: scene/x3d/castlefields_x3dsinglefield_descendants.inc (line 150). | |
Generated by PasDoc 0.17.0.snapshot.